Skip to main content
The GET /tokens endpoint returns all tokens that belong to your workspace. You can filter results by status or name, and paginate through large sets using the page and per_page query parameters. The response always includes a meta object so you know the total number of tokens and how many pages remain. Required scope: tokens:read

Query parameters

page
integer
default:"1"
The page number to retrieve. Starts at 1. Use alongside per_page to paginate through results.
per_page
integer
default:"25"
Number of tokens to return per page. Minimum is 1, maximum is 100.
status
string
Filter tokens by their current status. Accepted values are active, expired, and revoked. Omit this parameter to return tokens in all states.
name
string
Filter tokens by name using a partial, case-insensitive match. For example, ?name=ci returns tokens named ci-deploy and CI Pipeline Token.

Request

curl --request GET \
  --url "https://api.tooken.io/v1/tokens?page=1&per_page=25&status=active" \
  --header "Authorization: Bearer tok_live_xxxxxxxxxxxxxxxxxxxx"

Response

A successful request returns 200 OK with the following body.
data
array
An array of token objects for the current page.
meta
object
required
Pagination metadata for the current response.

Example response

{
  "data": [
    {
      "id": "tok_a1b2c3d4e5f6g7h8i9j0k1l2",
      "name": "CI Deploy Token",
      "scopes": ["tokens:read", "tokens:write"],
      "status": "active",
      "created_at": "2026-01-15T09:00:00Z",
      "expires_at": "2027-01-15T09:00:00Z",
      "last_used_at": "2026-04-27T14:32:00Z",
      "created_by": "alice@example.com"
    },
    {
      "id": "tok_b2c3d4e5f6g7h8i9j0k1l2m3",
      "name": "Read-Only Audit Key",
      "scopes": ["tokens:read"],
      "status": "active",
      "created_at": "2026-02-01T12:00:00Z",
      "expires_at": null,
      "last_used_at": null,
      "created_by": "bob@example.com"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 2
  }
}