/api/orgs/{org_id}/identities/{identity_id}/grantsGrant or revoke many custom models
Grants (granted: true) or revokes many of the org's custom models for one group at once. Public catalog models are refused: use model access for those. Idempotent; changed counts the grants that flipped. Org admin or the provisioning key.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.identity_idstringrequiredIdentity id.
Request body
alias_idsarray<string>requiredgrantedbooleanrequiredTrue grants; false revokes.
Responses
200How many of
totalgrants changed.Response
grantedbooleanrequiredchangedintegerrequiredGrants that flipped.
totalintegerrequiredDistinct aliases in the request.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The body or query failed validation.
Response
detailarray<object>requireddetail
typestringlocarray<string | integer>msgstring
Request
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/grants' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"alias_ids": [
"model-5c7e9a1b-3d5f-4b7d-9f1b-3d5f7b9d1f36"
],
"granted": true
}'Response
{
"granted": true,
"changed": 1,
"total": 1
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/grants