Reference / Programmatic Access

Mint a short-lived, down-scoped token for an AI agent acting on the signed-in user's behalf.

POST /v1/auth/me/agent-tokens
End-user session operationId: create_agent_token

Authorization

Called from the browser with the publishable application id (x-application-id); the access token lives in memory.

Request body · required

  • agent string required

    The agent this token is for (recorded as a per-agent consent + in the token's `agent` claim).

  • scopes string[]
  • ttl_minutes integer<int64> int64

    Lifetime in minutes (default 15, max 60).

Responses

201 Agent token
{
  "data": {
    "access_token": "string",
    "agent": "string",
    "expires_in": 0,
    "scope": "string",
    "token_type": "string"
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}

Request

curl -X POST "https://api.identrahq.com/v1/auth/me/agent-tokens" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": "claude-mcp",
  "scopes": [
    "string"
  ],
  "ttl_minutes": 0
}'

Try it

live request
POST https://api.identrahq.com/v1/auth/me/agent-tokens

Request body

application/json