Skip to content

REST API reference

Typelets exposes an HTTP API for managing workspaces and files. It is the same API the MCP server wraps, and you can call it directly with a personal access token.

https://typelets.com/api

Authenticate with a Bearer PAT:

Terminal window
curl https://typelets.com/api/workspaces \
-H "Authorization: Bearer pat_xxxxxxxx..."

Notes:

  • Non-members get 404 (not 403) for a workspace - existence is hidden.
  • Write endpoints accept a PAT without CSRF; browser (cookie) callers need the x-csrf-token header.
  • Roles referenced below: owner, admin, editor, viewer, interviewer, candidate.
MethodPathDescriptionRoles
POST/workspacesCreate a workspace. Body: { name, mode?: general|interview, shareScope?: private|org|public }. Creator becomes owner. Interview + public is rejected.verified user
GET/workspacesList workspaces you can access.any
GET/workspaces/:idFetch one workspace summary.member / org-shared / public
PATCH/workspaces/:idUpdate name, mode, shareScope, previewVisibility, defaultPreviewPort, previewPersistent, previewStartupCommand, previewSlug.owner, admin
DELETE/workspaces/:idDelete the workspace (cascades members + custom domains).owner
POST/workspaces/:id/moveMove to another org. Body: { destinationOrgId }.workspace owner + owner/admin of destination org
POST/workspaces/:id/importImport flat files. Body: { files: [{ path, content }] } (max 5000 files, 1 MiB/file).verified; owner, admin, editor, interviewer
POST/workspaces/:id/containerStart the sandbox runtime.any member

Text files are capped at 1 MiB; binary uploads at 25 MiB.

MethodPathDescriptionRoles
GET/workspaces/:id/filesList the tree (files only; ?includeFolders=true adds folders).owner, admin, editor, viewer
GET/workspaces/:id/files/:fileId/contentUTF-8 content of a file (binary -> 415).owner, admin, editor, viewer
POST/workspaces/:id/filesCreate a file. Body: { path, content? }. Intermediate folders auto-created. 409 on collision.owner, admin, editor
PUT/workspaces/:id/files/:fileId/contentOverwrite a file. Body: { content }.owner, admin, editor
PATCH/workspaces/:id/files/:fileId/appendAppend text. Body: { text }.owner, admin, editor
DELETE/workspaces/:id/files/:fileIdDelete a file (idempotent 204).owner, admin, editor
POST/workspaces/:id/files/moveMove/rename a node. Body: { nodeId, destinationPath }.owner, admin, editor
POST/workspaces/:id/foldersCreate a folder. Body: { path }.owner, admin, editor
DELETE/workspaces/:id/folders/:folderIdDelete a folder recursively.owner, admin, editor
POST/workspaces/:id/files/binary?path=&overwrite=Upload raw bytes (application/octet-stream, mime via x-file-mime).owner, admin, editor
GET/workspaces/:id/files/:fileId/binaryDownload a binary file.owner, admin, editor, viewer

These manage interview-mode workspaces; all are interviewer-side (owner / admin / interviewer) unless noted.

MethodPathDescription
PATCH/workspaces/:id/interviewSet prompt / rubric / criteria / tests / scores / solution files.
POST/workspaces/:id/interview/problemApply a library problem (destructive: replaces the tree). Body: { problemId }.
POST/workspaces/:id/interview/startStart the interview (requires a prompt).
POST/workspaces/:id/interview/endEnd it (locks out candidates).
POST/workspaces/:id/interview/reopenReopen (owner/admin) to restore candidate access.
  • See Personal access tokens for creating and managing credentials.
  • For agent-driven workflows, the MCP server wraps these endpoints as typed tools.
  • This is not an exhaustive list of every internal route - it covers the workspace, file, and interview surface intended for API consumers.