Skip to main content
POST
Upsert user permissions

Authorizations

Authorization
string
header
required

API token from cargo-ai login. Send as Authorization: Bearer <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.

userUuids
string[]
required

Users to grant the permission to.

action
enum<string>
required

Permission action to grant.

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,
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: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
resourceUuid
string<uuid>
required

Resource the permission applies to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
emails
string[]

Emails of users to grant the permission to. Creates workspace users as needed.

Response

Upsert user permissions

The response is of type object.