api keys

Mint a personal access token

The raw token is returned once, in api_key.key, and is stored only as an HMAC — it cannot be recovered. In bearer mode this route needs admin scope; a session works for any user. Only instance admins may mint admin-scoped tokens.

post/api/api_keys

Request

  • Base URL: https://telawiki.com
  • URL: https://telawiki.com/api/api_keys
  • Auth: one of:
    • HTTP bearer
    • API key in cookie tela_session

Request body

namestring required

Label, for your own bookkeeping.

scope'read' | 'write' | 'admin' required

read permits GET and HEAD; write and admin permit any method.

space_idinteger nullable

Pin the token to one space. Omit for instance-wide access.

expires_atstring nullable

YYYY-MM-DD HH:MM:SS UTC, must be in the future. Omit for a token that never expires.

Response

Created. api_key.key is the raw token — store it now.

Example response

{
  "api_key": {
    "created_at": "2026-09-09 14:03:21",
    "key": "tela_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.