Skip to main content
POST
/
v1
/
grants
/
delegate
Delegate a grant to a sub-agent
curl --request POST \
  --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app/v1/grants/delegate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parentGrantToken": "<string>",
  "subAgentId": "<string>",
  "scopes": [
    "<string>"
  ],
  "expiresIn": "1h"
}
'
{
  "grantToken": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "scopes": [
    "<string>"
  ],
  "grantId": "<string>"
}

Authorizations

Authorization
string
header
required

Developer API key

Body

application/json
parentGrantToken
string
required

Parent agent's grant token (JWT)

subAgentId
string
required
scopes
string[]
required

Must be a subset of the parent grant's scopes

expiresIn
string
default:1h

Response

Delegated grant created

grantToken
string
expiresAt
string<date-time>
scopes
string[]
grantId
string