Skip to main content
POST
Share an agent with a principal (create binding)

Authorizations

Authorization
string
header
required

User-bound credential carrying an identity: either a session JWT or a user access token (at:*) generated from the user settings UI. Send as Authorization: Bearer <token>. Org API keys (iak_*) are not accepted here - they carry no user identity. Use the x-prismeai-api-key header instead (see OrgApiKeyAuth).

Path Parameters

agentId
string
required
Maximum string length: 64

Body

application/json
principal_type
enum<string>
required
Available options:
user,
group,
org
Maximum string length: 32
principal_id
string
required

User id (or email for user type, resolved server-side), group id, or org slug.

Maximum string length: 128
role_slug
string

Role to grant. Defaults to admin.

Maximum string length: 64

Response

Binding created.

created
boolean
Example:

true

binding
object

Access binding granting a principal a role on an agent.