Developer documentation
Create an agent
POST/api/control/v1/agents
Request
Create an agent
Authenticate with Authorization: Bearer and a control API key with write scope. Set GATEWAY to your deployment origin and ID to the resource ID where needed. Replace sample values before sending a mutation.
Generated curl examples use GATEWAY for the deployment origin and ID for a path identifier. Set those shell variables before running the request. JSON examples show the request shape; replace each sample value with your own input.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Idempotency-Key | header | string | No | Retrying with the same key will not re-apply the mutation. |
| name | body | string | Yes | — |
| passportPubkey | body | string | Yes | base64url Ed25519 public key (you keep the private key) |
| passportProof | body | string | Yes | Canonical base64url Ed25519 proof of passport ownership, bound to this gateway and the control key owner. |
| expiresAt | body | string | null | No | Future expiry timestamp, or null for no expiry. Omission defaults to 365 days after creation. Format: date-time. |
| scopes | body | array | Yes | — |
| budget_tokens | body | integer | null | No | — |
| budget_cents | body | integer | null | No | — |
Request schema
The JSON body follows this schema. Nested required fields are listed inside each object.
Responses
Illustrative response bodies are generated from the schema. Sample IDs, dates, numbers and strings are placeholders. The schema below each status is the response contract.
| Status | Description | Media type |
|---|---|---|
| 201 | Created. | application/json |
| 400 | Error. | application/json |
| 401 | Error. | application/json |
| 403 | Error. | application/json |
| 409 | Error. | application/json |
| 413 | Error. | application/json |
| 415 | Error. | application/json |
| 422 | Error. | application/json |
| 429 | Shared control-key or IP request limit reached. Decision traces also have a workspace limit. | application/json |
| 500 | Error. | application/json |
| 503 | passport_audience_unset; the gateway has no configured passport-proof audience. | application/json |
Errors
400: Error. 401: Error. 403: Error. 409: Error. 413: Error. 415: Error. 422: Error. 429: Shared control-key or IP request limit reached. Decision traces also have a workspace limit. 500: Error. 503: passport_audience_unset; the gateway has no configured passport-proof audience.
A successful HTTP response is not permission. Check the returned status or decision and apply your service's access rule.
Rate limit
120 requests per control key per 60 seconds, using the shared total request count. Reads and writes increment the same counter; prior reads count toward the 120-request write ceiling. The pre-authentication IP guard is shared across operator endpoints: 1,000 requests per 60 seconds by default.
On 429, wait for Retry-After before retrying. An unavailable check must never be treated as a successful identity or mandate decision.