---
title: "POST /vault/token"
method: POST
path: "/vault/token"
---

# POST /vault/token

`POST /vault/token`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/vault/token`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Request body

- object: Input for creating an ephemeral scoped vault token
  - `agentId` union: Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.
    - string
    - string
  - `credentialId` string, required: Credential the token grants access to
  - `scope` 'autofill' | 'proxy' | 'export': What the token allows
  - `taskId` string: Optional task/conversation binding for traceability
  - `ttlSeconds` integer: Token TTL in seconds (10-3600, default 60)

## Response `200`

OK

- object: Created vault token (the raw token is only available at creation time)
  - `token` string, required: The ephemeral token (vtk_<hex>) — only returned at creation time
  - `credentialId` string, required: Credential the token grants access to
  - `scope` 'autofill' | 'proxy' | 'export', required: Token scope
  - `expiresAt` string, date-time, required: When the token expires

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
