API

Agent authorization

Let an agent register itself, get a person to claim it, and trade its assertion for access tokens. Also list and revoke the agents that you authorized.

GET
/oauth/authorization-server

Response Body

application/json

application/json

curl -X GET "https://example.com/oauth/authorization-server"
{  "issuer": "string",  "token_endpoint": "string",  "revocation_endpoint": "string",  "jwks_uri": "string",  "grant_types_supported": [    "string"  ],  "scopes_supported": [    "string"  ],  "token_endpoint_auth_methods_supported": [    "string"  ],  "agent_auth": {    "property1": null,    "property2": null  }}
GET
/oauth/protected-resource

Query Parameters

resource*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/oauth/protected-resource?resource=string"
{  "resource": "string",  "resource_name": "string",  "authorization_servers": [    "string"  ],  "scopes_supported": [    "string"  ],  "bearer_methods_supported": [    "string"  ],  "resource_documentation": "string"}
GET
/oauth2/jwks

Response Body

application/json

application/json

curl -X GET "https://example.com/oauth2/jwks"
{  "keys": [    {      "property1": null,      "property2": null    }  ]}
POST
/agent/identity

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agent/identity" \  -H "Content-Type: application/json" \  -d '{    "type": "anonymous"  }'
{  "registration_id": "string",  "registration_type": "anonymous",  "identity_assertion": "string",  "assertion_expires": "string",  "pre_claim_scopes": [    "string"  ],  "scopes": [    "string"  ],  "claim_url": "string",  "claim_token": "string",  "claim_token_expires": "string",  "post_claim_scopes": [    "string"  ],  "claim": {    "user_code": "string",    "verification_uri": "string",    "expires_in": 0,    "interval": 0  }}
POST
/agent/identity/claim

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agent/identity/claim" \  -H "Content-Type: application/json" \  -d '{    "claim_token": "string",    "email": "string"  }'
{  "registration_id": "string",  "claim_attempt_id": "string",  "status": "initiated",  "expires_at": "string",  "claim_attempt": {    "user_code": "string",    "verification_uri": "string",    "expires_in": 0,    "interval": 0  }}
POST
/oauth2/token

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/oauth2/token" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'grant_type=string'
{  "access_token": "string",  "token_type": "Bearer",  "expires_in": 0,  "scope": "string",  "refresh_token": "string",  "identity_assertion": "string",  "assertion_expires": "string"}
POST
/oauth2/revoke

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/oauth2/revoke" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'token=string'
Empty
POST
/agent/event/notify

Request Body

application/secevent+jwt

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

curl -X POST "https://example.com/agent/event/notify" \  -H "Content-Type: application/secevent+jwt" \  -d 'string'
Empty
POST
/agent/claims/resolve

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/agent/claims/resolve" \  -H "Content-Type: application/json" \  -d '{    "claimAttemptToken": "string"  }'
{  "state": "ready",  "signedInEmail": "string",  "boundEmail": "string",  "registration": {    "id": "string",    "kind": "anonymous",    "agentName": "string",    "providerName": "string"  },  "advisories": [    {      "kind": "first_time_account",      "providerName": "string"    }  ],  "grantOptions": {    "orgs": [      {        "id": "string",        "name": "string",        "role": "string",        "grantableScopes": [          "string"        ],        "projects": [          {            "id": "string",            "name": "string"          }        ]      }    ],    "defaultOrgId": "string",    "defaultExpiresInDays": 0,    "maxExpiresInDays": 0  },  "codeExpiresAt": 0,  "attemptsLeft": 0}
POST
/agent/claims/complete

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/agent/claims/complete" \  -H "Content-Type: application/json" \  -d '{    "orgId": "string",    "name": "string",    "claimAttemptToken": "string",    "userCode": "string"  }'
{  "status": "claimed",  "delegation": {    "id": "string",    "name": "string",    "source": "string",    "orgId": "string",    "projectId": "string",    "scopes": [      "string"    ],    "providerName": "string",    "createdAt": 0,    "expiresAt": 0,    "revokedAt": 0,    "lastUsedAt": 0  }}
GET
/agent-delegations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/agent-delegations"
{  "data": [    {      "id": "string",      "name": "string",      "source": "string",      "orgId": "string",      "projectId": "string",      "scopes": [        "string"      ],      "providerName": "string",      "createdAt": 0,      "expiresAt": 0,      "revokedAt": 0,      "lastUsedAt": 0    }  ]}
DELETE
/agent-delegations/{delegationId}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

delegationId*string
Length1 <= length

Response Body

application/json

application/json

curl -X DELETE "https://example.com/agent-delegations/string"
{  "kind": "revoked",  "delegationId": "string",  "revokedAt": 0,  "revokedTokens": 0}
POST
/oauth2/register

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/oauth2/register" \  -H "Content-Type: application/json" \  -d '{    "redirect_uris": [      "string"    ]  }'
{  "client_id": "string",  "client_id_issued_at": 0,  "client_name": "string",  "redirect_uris": [    "string"  ],  "grant_types": [    "string"  ],  "response_types": [    "string"  ],  "token_endpoint_auth_method": "none"}
POST
/oauth/authorizations

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/oauth/authorizations" \  -H "Content-Type: application/json" \  -d '{}'
{  "kind": "consent",  "requestId": "string",  "client": {    "clientId": "string",    "name": "string",    "clientUri": "string",    "registration": "dcr"  },  "redirectHost": "string",  "redirectIsLoopback": true,  "resource": "api",  "requestedScopes": [    "string"  ],  "offlineAccess": true,  "signedInEmail": "string",  "grantOptions": {    "orgs": [      {        "id": "string",        "name": "string",        "role": "string",        "grantableScopes": [          "string"        ],        "projects": [          {            "id": "string",            "name": "string"          }        ]      }    ],    "defaultOrgId": "string",    "defaultExpiresInDays": 0,    "maxExpiresInDays": 0  }}
POST
/oauth/authorizations/{requestId}/approve

Path Parameters

requestId*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/oauth/authorizations/string/approve" \  -H "Content-Type: application/json" \  -d '{    "orgId": "string"  }'
{  "redirectTo": "string"}
POST
/oauth/authorizations/{requestId}/deny

Path Parameters

requestId*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/oauth/authorizations/string/deny"
{  "redirectTo": "string"}

How is this page?