Delegations
Delegation grants, filtered by user, agent and organization (D23), each with its organization, scopes and expiry. Needs sys:delegation:read on the instance root.
x-pontive-instance-id<token>Instance ID for the request
user_id?stringThe delegating user (usr_)
agent_id?stringThe agent delegated to (agt_)
organization_id?stringThe organization the grant is bounded to
page?integerPage number
limit?integerItems per page
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/delegations'{ "data": [ { "agent_id": "string", "created_at": "string", "created_by": { "id": "string", "name": "string", "type": "string" }, "expires_at": "string", "id": "string", "instance_id": "string", "last_used_at": "string", "object": "string", "organization_id": "string", "scopes": [ "string" ], "updated_at": "string", "user_id": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Authorize an agent to act for a user (pontive-spec 20 C4): in one organization, where both the user is a member and the agent is installed, or with no organization_id at the instance root, which needs a root installation. Creating a grant the (user, agent, organization) already has replaces its scopes and expiry. The agent then exchanges the user's token, or this grant, for a token acting for the user — allowed only what the user and the agent both are. Needs sys:delegation:manage on the instance root. A token acting for its subject is refused (actor_refused): a delegation is an authority grant, the user's own to give.
x-pontive-instance-id<token>Instance ID for the request
User, agent, organization, scopes and expiry
application/json- body
User, agent, organization, scopes and expiry
agent_id*stringexpires_at?stringExpiresAt, RFC 3339 and in the future, ends the grant; omit it for none.
organization_id?stringOrganizationID is the organization the agent acts for the user in; omit it for the instance root, which needs a root installation.
scopes*array<string>Scopes are what the agent's exchanged tokens may carry: at most 100, each within the agent's client grants on the instance's APIs.
user_id*stringUserID is the user who delegates (usr_): the grant is theirs (D5).
Created
application/json- response
agent_id?stringcreated_at?stringcreated_by?CreatedBy is who created the grant, or last replaced it.
expires_at?stringid?stringinstance_id?stringlast_used_at?stringobject?stringorganization_id?stringOrganizationID is the organization the agent may act for the user in; empty for the instance root.
scopes?array<string>updated_at?stringuser_id?stringUserID is the delegator.
curl -X POST 'https://api.us.pontive.com/v1/delegations' \ -H 'Content-Type: application/json' \ -d '{ "agent_id": "string", "scopes": [ "string" ], "user_id": "string"}'{ "agent_id": "string", "created_at": "string", "created_by": { "id": "string", "name": "string", "type": "string" }, "expires_at": "string", "id": "string", "instance_id": "string", "last_used_at": "string", "object": "string", "organization_id": "string", "scopes": [ "string" ], "updated_at": "string", "user_id": "string"}One delegation grant. Needs sys:delegation:read on the instance root.
x-pontive-instance-id<token>Instance ID for the request
delegation_id*stringDelegation ID (dlg_)
OK
application/json- response
agent_id?stringcreated_at?stringcreated_by?CreatedBy is who created the grant, or last replaced it.
expires_at?stringid?stringinstance_id?stringlast_used_at?stringobject?stringorganization_id?stringOrganizationID is the organization the agent may act for the user in; empty for the instance root.
scopes?array<string>updated_at?stringuser_id?stringUserID is the delegator.
curl -X GET 'https://api.us.pontive.com/v1/delegations/string'{ "agent_id": "string", "created_at": "string", "created_by": { "id": "string", "name": "string", "type": "string" }, "expires_at": "string", "id": "string", "instance_id": "string", "last_used_at": "string", "object": "string", "organization_id": "string", "scopes": [ "string" ], "updated_at": "string", "user_id": "string"}Delete a delegation grant: the agent's next exchange on it is refused, and a token it already exchanged stops being answered on Pontive's checks and listings at once. Needs sys:delegation:manage on the instance root.
x-pontive-instance-id<token>Instance ID for the request
delegation_id*stringDelegation ID (dlg_)
No Content
curl -X DELETE 'https://api.us.pontive.com/v1/delegations/string'The delegation grants in the organization: which users let which agents act for them there. Needs sys:agent:read on the organization (pontive-spec 20 G2): its owners and admins hold it, an instance administrator through inheritance, and an end user's token with pontive:org:agent:read reaches it for their own organization.
x-pontive-instance-id<token>Instance ID for the request
organization*stringThe organization's id, or its slug
page?integerPage number
limit?integerItems per page
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/organizations/string/delegations'{ "data": [ { "agent_id": "string", "created_at": "string", "created_by": { "id": "string", "name": "string", "type": "string" }, "expires_at": "string", "id": "string", "instance_id": "string", "last_used_at": "string", "object": "string", "organization_id": "string", "scopes": [ "string" ], "updated_at": "string", "user_id": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}An organization administrator revokes a delegation grant in their organization (pontive-spec 20 G2, C4): the agent's next exchange on it is refused, and a token it already exchanged stops being answered on Pontive's checks and listings at once. 404 for a grant in another organization or in none. Needs sys:agent:install on the organization.
x-pontive-instance-id<token>Instance ID for the request
organization*stringThe organization's id, or its slug
delegation_id*stringDelegation ID (dlg_)
No Content
curl -X DELETE 'https://api.us.pontive.com/v1/organizations/string/delegations/string'