Create a token request
Ask for a personal token; the person signs it in at `verification_url`
POST /api/v1/tokens
CLI sign-in required · personal tokens cannot manage tokens
Needs a sign-in (theseus login); a personal token gets insufficient_scope.
Example request
Link to this section# Token management needs a CLI sign-in; personal tokens cannot do it.
# token create handles browser approval and collection.
theseus token create --name "Review reader" --scope read --workspace example-teamRequest body
Link to this sectionContent type application/json
namestring requiredMinimum length
1· Maximum length100scopesarray of string requiredMinimum items
1· Each item: One ofread,notes:write,runs:write,webhooks:manage,cli:downloadworkspacesarray of string requiredWorkspace IDs, as
GET /melists themMinimum items
1· Maximum items50· Each item: Minimum length1repositoriesarray of string or nullRepository IDs to limit it to; omit or null for every one
Default
null· Minimum items1· Maximum items100· Each item: Pattern^rep_expires_in_daysintegerDefault
90· Minimum1· Maximum365
Responses
Link to this sectionWaiting for the person to sign the token in
Response fields
Content type application/json
idstring requiredstatusstring requiredAlways
pendinguser_codestring requiredThe code the person confirms in the browser
verification_urlstring (uri) requiredWhere the person signs the token in
expires_atstring (date-time) requiredintervalinteger requiredSeconds to wait between collections
Example responses
Link to this sectionWaiting for browser approval
Illustrative response · complete
{
"id": "hnd_EXAMPLE",
"status": "pending",
"user_code": "<browser-confirmation-code>",
"verification_url": "https://app.theseus.dev/login/device",
"expires_at": "2026-10-08T12:10:00Z",
"interval": 5
}Errors
Link to this section400 · The request is not valid
401 · A valid bearer token is required
403 · The credential's scopes do not allow this
426 · Upgrade the CLI: run theseus update
429 · Too many requests
Headers
Retry-AfterintegerSeconds to wait before the next request, when known
500 · Theseus could not complete the request; retrying will not help
503 · Theseus is unavailable; retry the same request
Headers
Retry-AfterintegerSeconds to wait before the next request, when known
Error response fields
Content type application/problem+json
typestring (uri) requiredIdentifies the problem type; branch on
codeinsteadtitlestring requiredstatusinteger requireddetailstringcodestring requiredWhy the request failed. New codes may be added: treat an unknown one by its status
One of
invalid_request,unauthenticated,not_in_plan,insufficient_scope,admission_required,not_found,ambiguous,conflict,rate_limited,internal_error,unavailable,search_authorization_pending,search_unavailable,cli_upgrade_requiredrequest_idstring requiredQuote this when reporting the problem
errorsarray of FieldErrorWith
invalid_request: what is wrong with each fielderrors fields
pathstring requiredWhere in the request, as dotted segments
messagestring required
required_scopestringWith
insufficient_scope: the scope the operation needsnextstringRecovery action, such as theseus update
candidatesarray of CandidateWith
ambiguous: what the request could mean; ask whichcandidates fields
idstring requiredpathstring requiredkindstring requiredtitlestring requiredurlstring (uri) required