Skip to main content
POST
Create temporary token

Authorizations

Authorization
string
header
required

API token from cargo-ai login. Send as Authorization: Bearer <token>.

Scopes

openid

OpenID Connect identity.

profile

Name and profile claims.

email

Email address.

offline_access

Refresh token.

Headers

Idempotency-Key
string

Client-generated key that makes this write safe to retry. Reusing the same key with the same request returns the original response instead of creating a second record. Reusing it with a different request returns 422. A concurrent retry while the first request is still running returns 409. Keys expire after 24 hours. Not accepted on multipart file uploads. Optional: a request without one is processed as it always was.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Body

application/json

Request body schema.

permissions
enum<string>[]
required

Permission actions the token holds, each granted to the caller across the workspace.

Minimum array length: 1
Available options:
ai:*,
ai:read,
ai:write,
ai:agent:*,
ai:agent:read,
ai:agent:write,
ai:mcpServer:*,
ai:mcpServer:read,
ai:mcpServer:write,
billing:*,
billing:read,
billing:write,
billing:credits:*,
billing:credits:write,
billing:paymentMethod:*,
billing:paymentMethod:write,
connection:*,
connection:read,
connection:write,
context:*,
context:read,
context:write,
domainManagement:*,
domainManagement:read,
domainManagement:write,
hosting:*,
hosting:read,
hosting:write,
hosting:app:*,
hosting:app:read,
hosting:app:write,
hosting:worker:*,
hosting:worker:read,
hosting:worker:write,
mailboxManagement:*,
mailboxManagement:read,
mailboxManagement:write,
observability:*,
observability:read,
observability:write,
orchestration:*,
orchestration:read,
orchestration:write,
orchestration:run:*,
orchestration:run:read,
orchestration:run:write,
orchestration:batch:*,
orchestration:batch:read,
orchestration:batch:write,
orchestration:workflow:*,
orchestration:workflow:read,
orchestration:workflow:write,
revenueOrganization:*,
revenueOrganization:read,
revenueOrganization:write,
segmentation:*,
segmentation:read,
segmentation:write,
storage:*,
storage:read,
storage:write,
content:*,
content:read,
content:write,
content:file:*,
content:file:read,
content:file:write,
systemOfRecordIntegration:*,
systemOfRecordIntegration:read,
systemOfRecordIntegration:write,
workspaceManagement:*,
workspaceManagement:read,
workspaceManagement:write,
workspaceManagement:folder:*,
workspaceManagement:folder:read,
workspaceManagement:folder:write,
workspaceManagement:state:*,
workspaceManagement:state:read,
workspaceManagement:state:write,
workspaceManagement:repository:*,
workspaceManagement:repository:read,
workspaceManagement:repository:write
ttlSeconds
integer

How long the token lives, from 60 to 900 seconds. Defaults to 900. Using it does not extend it.

Required range: 60 <= x <= 900

Response

Create temporary token

token
string
required

A temporary token holding only the permissions asked.

expiresAt
string
required

When the token stops working, as an ISO date.