Deployments.ai Docs
Brains

Revoke a Brain grant

DELETE /v1/brains/{brainId}/grants/{grantId} · SDK revokeBrainGrant · CLI deployments brain-grant revoke

DELETE
/v1/brains/{brainId}/grants/{grantId}

Requires brains:admin. A suspended organization can still call it.

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}$
grantId*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
expectedVersion*integer
Range0 <= value

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 DELETE "https://example.com/v1/brains/string/grants/string" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "expectedVersion": 0  }'
{  "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}