Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
access
Share an agent with a principal (create binding)
curl --request POST \
  --url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/access \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "principal_type": "user",
  "principal_id": "<string>"
}
'
{
  "created": true,
  "binding": {
    "agent_id": "<string>",
    "principal_type": "user",
    "principal_id": "<string>",
    "email": "<string>",
    "orgSlug": "<string>",
    "granted_by": "<string>",
    "role_slug": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.

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.