Deployments.ai Docs
Brains

Create a Brain grant

POST /v1/brains/{brainId}/grants · SDK createBrainGrant · CLI deployments brain-grant create

POST
/v1/brains/{brainId}/grants

Requires brains:admin.

Authorization

tenantJwt
headerAuthorizationBearer <token>

Tenant JWT carrying organization, project, and environment claims.

Path Parameters

brainId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string

Limited to 500 UTF-8 bytes.

Length1 <= length <= 500

Request Body

application/json
  1. body
permission*string
Value in"curator""owner""reader""writer"
target*

Response Body

BrainGrantResponse

application/json
  1. response
brainId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
createdAt*string
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
ownershipGeneration?integer
Range0 <= value
permission*string
Value in"curator""owner""read""read-write""reader""writer"
revokedAt?string
status*string
Value in"active""revoked"
target*|||
updatedAt*string
version*integer
Range0 <= value
curl -X POST "https://example.com/v1/brains/string/grants" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "permission": "curator",    "target": {      "principalId": "string",      "type": "principal"    }  }'
{  "brainId": "string",  "createdAt": "string",  "id": "string",  "organizationId": "string",  "ownershipGeneration": 0,  "permission": "curator",  "revokedAt": "string",  "status": "active",  "target": {    "principalId": "string",    "type": "principal"  },  "updatedAt": "string",  "version": 0}