Skip to content
Last updated

Create a new access grant to give a user, department, or role access to an entity.

POSThttps://api.aitronos.com/v1/organizations/{organization_id}/access/grants

Creates a new access grant that gives the specified grantee access to the specified entity at the given access level. The grant is scoped to the organization.

Path Parameters

organization_id string required

The unique identifier of the organization (format: org_*).

Request Body

entity_type string required

The type of entity to grant access to. Allowed values: knowledge_slice, vector_store, assistant.

entity_id string required

The unique identifier of the entity.

grantee_type string required

The type of grantee receiving access. Allowed values: user, department, role.

grantee_id string required

The unique identifier of the grantee.

access_level string required

The level of access to grant. Allowed values: read, write, admin.


Returns

The newly created access grant object (HTTP 201).

cURL
curl -X POST https://api.aitronos.com/v1/organizations/org_xyz789/access/grants \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_type": "knowledge_slice",
    "entity_id": "kslice_abc123",
    "grantee_type": "user",
    "grantee_id": "usr_def456",
    "access_level": "read"
  }'