Reference · Control plane API
Delegation — Control plane API
5 operations of the GebSecure Control Plane API (0.1.0), generated from docs/openapi/api.json.
Base URL: https://api.gebsecure.com · OpenAPI 3.1.0 · contract version 0.1.0 · generated from docs/openapi/api.json.
GET /v1/delegations#
- Endpoint:
GET https://api.gebsecure.com/v1/delegations - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
agentId |
query | string | ||
rootId |
query | string | ||
active |
query | boolean | ||
limit |
query | integer | default 100; range 1–500 |
Responses
200— Default Response
Errors are application/problem+json (error model).
curl -X GET "$GEBSECURE_API_URL/v1/delegations" \
-H "Authorization: Bearer $GEBSECURE_TOKEN"POST /v1/delegations#
Delegate a subset of authority to an agent
- Endpoint:
POST https://api.gebsecure.com/v1/delegations - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication - SDK: TypeScript
createDelegation· Pythoncreate_delegation· GoCreateDelegation· JavacreateDelegation· .NETCreateDelegationAsync
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
delegateAgentId |
string | yes | |
scopes |
array<"authorize" | "execute" | "mcp:connect" | "secrets:use" | "browser:use" | "database:use" | "delegations:manage"> | yes | items 1–7 |
actions |
array |
default []; items 0–100 |
|
resources |
array |
default []; items 0–100 |
|
constraints |
object | default {} |
|
constraints.maxAmount |
number | range 0–∞ | |
constraints.environments |
array |
items 0–20 | |
purpose |
string | default ""; length 0–1000 |
|
expiresInSeconds |
integer | default 3600; range 60–604800 |
|
maxDepth |
integer | default 3; range 1–10 |
Responses
200— Default Response
Response body: Delegation
| Field | Type | Required | Notes |
|---|---|---|---|
id |
string | yes | |
token |
string | yes | |
chain |
array |
||
depth |
integer | ||
maxDepth |
integer | ||
scopes |
array |
||
actions |
array |
||
resources |
array |
||
expiresAt |
string | ||
originatingUserId |
string | nullable |
Errors are application/problem+json (error model).
curl -X POST "$GEBSECURE_API_URL/v1/delegations" \
-H "Authorization: Bearer $GEBSECURE_TOKEN" \
-H 'content-type: application/json' \
-d '{"delegateAgentId":"<string>","scopes":["authorize"]}'GET /v1/delegations/graph#
Multi-agent delegation graph
- Endpoint:
GET https://api.gebsecure.com/v1/delegations/graph - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
rootId |
query | string | ||
agentId |
query | string | ||
includeInactive |
query | boolean |
Responses
200— Default Response
Errors are application/problem+json (error model).
curl -X GET "$GEBSECURE_API_URL/v1/delegations/graph" \
-H "Authorization: Bearer $GEBSECURE_TOKEN"GET /v1/delegations/{id}/chain#
- Endpoint:
GET https://api.gebsecure.com/v1/delegations/{id}/chain - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id |
path | string | yes |
Responses
200— Default Response
Errors are application/problem+json (error model).
curl -X GET "$GEBSECURE_API_URL/v1/delegations/{id}/chain" \
-H "Authorization: Bearer $GEBSECURE_TOKEN"POST /v1/delegations/{id}/revoke#
Revoke (cascades to derived delegations)
- Endpoint:
POST https://api.gebsecure.com/v1/delegations/{id}/revoke - Authentication: bearer access token (JWT) or API key (
gsk_…) — see authentication
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
id |
path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
reason |
string | default "revoked"; length 0–1000 |
Responses
200— Default Response
Errors are application/problem+json (error model).
curl -X POST "$GEBSECURE_API_URL/v1/delegations/{id}/revoke" \
-H "Authorization: Bearer $GEBSECURE_TOKEN" \
-H 'content-type: application/json' \
-d '{}'