Skip to Content
Docs
API referenceManagement API

Delegations

List delegations

GET
/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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Query Parameters

user_id?string

The delegating user (usr_)

agent_id?string

The agent delegated to (agt_)

organization_id?string

The organization the grant is bounded to

page?integer

Page number

limit?integer

Items per page

Response Body

OK

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/delegations'
Example Response
{  "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  }}

Delegate to an agent

POST
/delegations

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Request Body

User, agent, organization, scopes and expiry

application/json
  1. body

User, agent, organization, scopes and expiry

agent_id*string
expires_at?string

ExpiresAt, RFC 3339 and in the future, ends the grant; omit it for none.

organization_id?string

OrganizationID 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*string

UserID is the user who delegates (usr_): the grant is theirs (D5).

Response Body

Created

application/json
  1. response
agent_id?string
created_at?string
created_by?

CreatedBy is who created the grant, or last replaced it.

expires_at?string
id?string
instance_id?string
last_used_at?string
object?string
organization_id?string

OrganizationID is the organization the agent may act for the user in; empty for the instance root.

scopes?array<string>
updated_at?string
user_id?string

UserID is the delegator.

Example Request
curl -X POST 'https://api.us.pontive.com/v1/delegations' \  -H 'Content-Type: application/json' \  -d '{  "agent_id": "string",  "scopes": [    "string"  ],  "user_id": "string"}'
Example Response
{  "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"}

Get a delegation

GET
/delegations/{delegation_id}

One delegation grant. Needs sys:delegation:read on the instance root.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

delegation_id*string

Delegation ID (dlg_)

Response Body

OK

application/json
  1. response
agent_id?string
created_at?string
created_by?

CreatedBy is who created the grant, or last replaced it.

expires_at?string
id?string
instance_id?string
last_used_at?string
object?string
organization_id?string

OrganizationID is the organization the agent may act for the user in; empty for the instance root.

scopes?array<string>
updated_at?string
user_id?string

UserID is the delegator.

Example Request
curl -X GET 'https://api.us.pontive.com/v1/delegations/string'
Example Response
{  "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"}

Revoke a delegation

DELETE
/delegations/{delegation_id}

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

delegation_id*string

Delegation ID (dlg_)

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/delegations/string'
Example Response
Empty
GET
/organizations/{organization}/delegations

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

organization*string

The organization's id, or its slug

Query Parameters

page?integer

Page number

limit?integer

Items per page

Response Body

OK

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/organizations/string/delegations'
Example Response
{  "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  }}
DELETE
/organizations/{organization}/delegations/{delegation_id}

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

organization*string

The organization's id, or its slug

delegation_id*string

Delegation ID (dlg_)

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/organizations/string/delegations/string'
Example Response
Empty