Graine AI

List API keys

List this organization's API keys.

List this organization's API keys.

A secret is returned exactly once, by POST /v2/api-keys, and never again. Keys are addressed here by key_id — a stable sha256 prefix of the credential that cannot be reversed into a working key. Addressing a key by its full key_id selects exactly one key, so a revoke can never land on a neighbouring key that shares a prefix.

allowed_routes is deliberately absent from the response: it is unenforced everywhere except the key-management scope, so returning it would advertise a permission model the platform does not implement.

Errors: 401, 403 (wrong organization), 429, 503 (the key store is unreachable).

Rate limit: 1000 requests per minute per organization (bucket default). Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.

GET
/v2/api-keys
/v2/api-keys?page=1&page_size=20

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.

In: header

Query Parameters

organization_idOrganization Id

Optional; must match the key's organization.

pagePage

1-indexed page number (max 10000 — narrow the window instead)

Default: 1Minimum: 1Maximum: 10000

page_sizePage Size

Items per page (max 100)

Default: 20Minimum: 1Maximum: 100

Response Body

200

Masked key previews for this organization. Secrets are never returned.

data
Required
Data

This page of keys, newest first.

pagination
Required
Pagination

Where this page sits in the result set.

401

1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented instead of an API key.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

403

1102 — the key is valid but lacks the scope this endpoint requires, or names another organization. GET /v2/scopes reports what a key holds.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

422

1001 — the body or query failed validation; the message names the first offending field.

error
Required
integer

Stable integer code from the error table. Branch on this, not on the message.

message
Required
string

One human-readable sentence. Wording may change; the code will not.

429

1300 — the per-organization request rate or concurrent-call limit was reached. Carries Retry-After.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

503

1501 — a service this endpoint depends on is unreachable or returned a 5xx.

error
Required
Error

Stable integer code from the /v2 error table. Branch on this.

message
Required
Message

One human-readable sentence. Wording may change; the code will not.

curl -X GET "https://api.graine.ai/v2/api-keys?organization_id=string&page=1&page_size=20" \
  -H "Authorization: Bearer <token>"

Masked key previews for this organization. Secrets are never returned.

{
  "data": [
    {
      "key_id": "key_1a2b3c4d5e6f7890",
      "key_preview": "gat_exampleK...6Yc1",
      "developer_id": "dev_1a2b3c4d5e6f7a8b",
      "developer_name": "Production integration",
      "developer_email": "api-team@example.com",
      "plan": "growth",
      "rate_limit_tier": "growth",
      "token_type": "partner_api",
      "status": "active",
      "description": "Server-side integration for the booking app.",
      "created_at": "2026-08-20T13:06:01.724Z",
      "is_current": true,
      "scopes": [
        "agents:read",
        "calls:read",
        "calls:write"
      ],
      "scopes_source": "explicit"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 20,
    "total": 137,
    "total_pages": 7,
    "has_more": true
  }
}