Skip to main content
POST
/
vault
/
token
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/vault/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credentialId": "<string>",
  "agentId": "<string>",
  "scope": "autofill",
  "taskId": "<string>",
  "ttlSeconds": 60
}
'
{
  "token": "<string>",
  "credentialId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Input for creating an ephemeral scoped vault token

credentialId
string
required

Credential the token grants access to

agentId

Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.

Pattern: ^[0-9a-z]+$
scope
enum<string>
default:autofill

What the token allows

Available options:
autofill,
proxy,
export
taskId
string

Optional task/conversation binding for traceability

ttlSeconds
integer
default:60

Token TTL in seconds (10-3600, default 60)

Required range: 10 <= x <= 3600

Response

200 - application/json

OK

Created vault token (the raw token is only available at creation time)

token
string
required

The ephemeral token (vtk_) — only returned at creation time

credentialId
string
required

Credential the token grants access to

scope
enum<string>
required

Token scope

Available options:
autofill,
proxy,
export
expiresAt
string<date-time>
required

When the token expires