Skip to content

List your tokens

Your personal tokens, newest first

GET /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
Shell
# Token management needs a CLI sign-in; personal tokens cannot do it.
# token create handles browser approval and collection.
theseus token list
NameInTypeDescription
limitqueryintegerHow many items to return, from 1 to 100

Default 50 · Minimum 1 · Maximum 100

cursorquerystringA previous page's next_cursor, with the same filters

Minimum length 1 · Maximum length 2048

A page of tokens

Response fields

Content type application/json

  • data array of Token required

    data fields
    • id string required

      The token’s ID, which is not its secret

    • name string required

    • scopes array of string required

      What the token may do. New scopes may be added

    • workspaces array of string required

      The only workspaces it can reach

    • repositories array of string or null required

      The only repositories it can reach; null for every one in its workspaces

    • created_at string (date-time) required

    • expires_at string (date-time) required

    • last_used_at string (date-time) required

  • next_cursor string or null required

  • has_more boolean required

Example responses

Link to this section

Personal tokens

Illustrative response · selected fields

{
  "data": [
    {
      "id": "lgn_EXAMPLE",
      "name": "Review reader",
      "scopes": [
        "read"
      ],
      "workspaces": [
        "wsp_EXAMPLE"
      ],
      "repositories": null
    }
  ],
  "next_cursor": null,
  "has_more": false
}
400 · The request is not valid

Error response fields

401 · A valid bearer token is required

Error response fields

403 · The credential's scopes do not allow this

Error response fields

426 · Upgrade the CLI: run theseus update

Error response fields

429 · Too many requests

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

500 · Theseus could not complete the request; retrying will not help

Error response fields

503 · Theseus is unavailable; retry the same request

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

Error response fields

Content type application/problem+json

  • type string (uri) required

    Identifies the problem type; branch on code instead

  • title string required

  • status integer required

  • detail string

  • code string required

    Why 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_required

  • request_id string required

    Quote this when reporting the problem

  • errors array of FieldError

    With invalid_request: what is wrong with each field

    errors fields
    • path string required

      Where in the request, as dotted segments

    • message string required

  • required_scope string

    With insufficient_scope: the scope the operation needs

  • next string

    Recovery action, such as theseus update

  • candidates array of Candidate

    With ambiguous: what the request could mean; ask which

    candidates fields
    • id string required

    • path string required

    • kind string required

    • title string required

    • url string (uri) required