Skip to main content
POST
/
agents
/
{id}
/
tokens
Create agent token (API key holders only)
curl --request POST \
  --url https://api.getovra.com/agents/{id}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "scopes": [
    "*"
  ],
  "expiresInDays": 2
}
'
{
  "id": "<string>",
  "token": "<string>",
  "agentId": "<string>",
  "scopes": [
    "<string>"
  ],
  "expiresAt": "2023-11-07T05:31:56Z",
  "hint": "<string>"
}

Authorizations

Authorization
string
header
required

API key (sk_...) or Agent token (at_...)

Headers

Idempotency-Key
string

Unique key for idempotent request handling

Path Parameters

id
string
required

Body

application/json
label
string
scopes
string[]
expiresInDays
integer
Required range: x >= 1

Response

Token created. Store the token value securely.

id
string
token
string

Plaintext token. Only returned on creation.

agentId
string
scopes
string[]
expiresAt
string<date-time> | null
hint
string