API reference
The Agent API runs coding and automation agents for your app in isolated workspaces. Every request goes to https://api.forgeling.io/v1 over HTTPS with JSON bodies and an API key as a bearer token (Authorization: Bearer fgk_...); the key's scopes decide which operations it may call. Errors, pagination, idempotency, versioning, rate limits and the signed webhooks are described in conventions.
Read the conventions first: errors, pagination, idempotency and versioning work the same way on every endpoint. The OpenAPI document this page is generated from is /openapi/v1.json.
App
Read the app the API key belongs to: its tier, quotas, usage and the key itself.
GET /v1/app
Get the calling app
Scope: any valid key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Webhooks
Register the endpoints that receive signed events and the endpoint that refreshes run credentials, and inspect or retry deliveries.
DELETE /v1/app/credential_refresh
Remove the credential-refresh endpoint
Scope: webhooks:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No content | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/app/credential_refresh
Get the credential-refresh endpoint
Scope: webhooks:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PUT /v1/app/credential_refresh
Set the credential-refresh URL
Scope: webhooks:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/app/credential_refresh/rotate_secret
Give the credential-refresh endpoint a new secret; the old one signs for another 24 hours
Scope: webhooks:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/webhook_deliveries
List webhook deliveries, newest first
Scope: webhooks:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint |
query | string or null | no | |
status |
query | string or null | no | |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/webhook_deliveries/{id}/retry
Send a delivery again now
Scope: webhooks:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook delivery id, whd_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/webhook_endpoints
List webhook endpoints
Scope: webhooks:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/webhook_endpoints
Register a webhook endpoint
Scope: webhooks:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
events |
array of string or null | no | |
url |
string | yes | |
workspace_ids |
array of string or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
DELETE /v1/webhook_endpoints/{id}
Delete a webhook endpoint
Scope: webhooks:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook endpoint id, whe_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No content | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/webhook_endpoints/{id}
Get a webhook endpoint
Scope: webhooks:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook endpoint id, whe_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PATCH /v1/webhook_endpoints/{id}
Change a webhook endpoint, or enable it again
Scope: webhooks:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook endpoint id, whe_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
events |
array of string or null | no | |
status |
enabled | disabled or null | no | |
url |
string or null | no | |
workspace_ids |
array of string or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/webhook_endpoints/{id}/rotate_secret
Give a webhook endpoint a new secret; the old one signs for another 24 hours
Scope: webhooks:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook endpoint id, whe_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/webhook_endpoints/{id}/test
Send a ping event to this endpoint alone
Scope: webhooks:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes | A webhook endpoint id, whe_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Bundles
Publish, list and yank the versions of the agent bundles that runs are created from.
GET /v1/bundles
List bundles
Scope: bundles:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/bundles/{name}/versions
List the versions of a bundle
Scope: bundles:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | The name of a bundle. |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/bundles/{name}/versions
Publish a version of a bundle from an inline spec
Scope: bundles:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | The name of a bundle. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
spec |
object | yes | |
version |
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/bundles/{name}/versions/{v}
Get a version of a bundle
Scope: bundles:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | The name of a bundle. |
v |
path | string | yes | A bundle version, such as 1.0.0. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/bundles/{name}/versions/{v}/yank
Yank a version: it starts no new runs
Scope: bundles:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | The name of a bundle. |
v |
path | string | yes | A bundle version, such as 1.0.0. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Workspaces
Create and manage the workspaces your end users work in, and the model credential each uses.
GET /v1/workspaces
List workspaces
Scope: workspaces:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
external_id |
query | string or null | no | |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/workspaces
Create a workspace, or return the live one for its external_id
Scope: workspaces:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
external_id |
string | yes | |
metadata |
object or null | no | |
name |
string or null | no | |
tz |
string or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
DELETE /v1/workspaces/{ws}
Delete a workspace and everything in it
Scope: workspaces:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
purge |
query | boolean | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/workspaces/{ws}
Get a workspace
Scope: workspaces:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PATCH /v1/workspaces/{ws}
Update a workspace's name, time zone or metadata
Scope: workspaces:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
metadata |
object or null | no | |
name |
string or null | no | |
tz |
string or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
DELETE /v1/workspaces/{ws}/model_credential
Remove a workspace's model credential
Scope: credentials:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No content | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/workspaces/{ws}/model_credential
Get a workspace's model credential
Scope: credentials:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PUT /v1/workspaces/{ws}/model_credential
Set a workspace's model credential
Scope: credentials:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
api_key |
string | yes | |
type |
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/workspaces/{ws}/resume
Resume a suspended workspace
Scope: workspaces:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/workspaces/{ws}/suspend
Suspend a workspace: no new runs, and its live runs end
Scope: workspaces:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Runs
Create a run in a workspace, follow it through its life, set its secrets and end it.
DELETE /v1/runs/{run}
Delete a run
Scope: runs:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/runs/{run}
Get a run
Scope: runs:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PATCH /v1/runs/{run}
Raise a run's budget, extend its expiry or replace its metadata
Scope: runs:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
budget |
Budget or null | no | |
expires_at |
string or null | no | |
metadata |
object or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/runs/{run}/cancel
Cancel a run
Scope: runs:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/runs/{run}/complete
Complete a run
Scope: runs:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
DELETE /v1/runs/{run}/secrets/{name}
Remove a run secret
Scope: runs:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
name |
path | string | yes | The name of a run secret. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No content | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
PUT /v1/runs/{run}/secrets/{name}
Set a run secret
Scope: runs:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
name |
path | string | yes | The name of a run secret. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
expires_at |
string or null | no | |
refreshable |
boolean | no | |
value |
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/workspaces/{ws}/runs
List a workspace's runs
Scope: runs:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
status |
query | string or null | no | |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/workspaces/{ws}/runs
Create a run
Scope: runs:write
Idempotency-Key: required
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ws |
path | string | yes | A workspace id, ws_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | yes | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. Required here. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
approvals |
Approvals | no | |
budget |
Budget or null | no | |
collect |
Collect | no | |
definition |
RunDefinition | yes | |
files |
array of InputFile | no | |
initial_turn |
TurnInput or null | no | |
lifecycle |
Lifecycle | no | |
limits |
RunLimits | no | |
metadata |
object | no | |
resources |
array of GitRepository | no | |
runtime |
current | previous | next | no | |
secrets |
object | no | |
size |
small | standard | large | no |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Turns
Post work to a run, read what came of it and cancel it.
POST /v1/runs/{run}/turns
Post a turn to a run
Scope: runs:write
Idempotency-Key: required
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | yes | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. Required here. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
actor |
TurnActor or null | no | |
context |
object or null | no | |
input |
array of InputPart | no | |
limits |
TurnLimits or null | no | |
metadata |
object or null | no | |
output_schema |
object or null | no | |
trigger |
TurnTrigger or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/turns
Find a run's turn by the Idempotency-Key it was posted with
Scope: runs:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
query | string | yes | |
idempotency_key |
query | string | yes | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/turns/{trn}
Get a turn
Scope: runs:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
trn |
path | string | yes | A turn id, trn_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/turns/{trn}/cancel
Cancel a turn
Scope: runs:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
trn |
path | string | yes | A turn id, trn_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Approvals
List the tool uses that agents are waiting on, and allow or deny them.
GET /v1/approvals
List approvals
Scope: approvals:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status |
query | string or null | no | |
workspace |
query | string or null | no | |
run |
query | string or null | no | |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
POST /v1/approvals/{apr}/decision
Allow or deny an approval
Scope: approvals:write
Idempotency-Key: optional
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
apr |
path | string | yes | An approval id, apr_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Idempotency-Key |
header | string | no | Makes the request safe to retry: a repeat with the same key and body within 24 hours returns the original response with Idempotent-Replayed: true, and a different body is a 409 idempotency_conflict. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
decision |
allow | deny | yes | |
note |
string or null | no |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Events
Read a run's replayable event log or the app-wide feed, or stream a run's events live.
GET /v1/events
List the app's events
Scope: events:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after |
query | string or null | no | |
workspace |
query | string or null | no | |
type |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/runs/{run}/events
List a run's events
Scope: events:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/runs/{run}/events/stream
Stream a run's events
Scope: events:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
after |
query | string or null | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Files
List the files a run produced and download them through short-lived signed links.
GET /v1/files/{f}
Get an output file
Scope: files:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
f |
path | string | yes | A file id, file_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/files/{f}/content
Download an output file
Scope: files:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
f |
path | string | yes | A file id, file_ and a ULID. |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 302 | Redirect to a signed URL | none |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
GET /v1/runs/{run}/files
List a run's output files
Scope: files:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run |
path | string | yes | A run id, run_ and a ULID. |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Usage
Read the model usage and cost of your app, by day or by run.
GET /v1/usage
Usage by day or by run
Scope: usage:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace |
query | string or null | no | |
from |
query | string or null | no | |
to |
query | string or null | no | |
group_by |
query | string | no | |
after |
query | string or null | no | |
limit |
query | integer | no | |
Forgeling-Version |
header | 2026-11-01 | no | The API version. The only version is the default. |
Forgeling-Beta |
header | string | no | Comma-separated beta features to use, such as runtime-next. May be repeated. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | ListResponse |
| 400 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 401 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 403 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 404 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 409 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 422 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
| 429 | The error envelope. error.type and error.code say what went wrong. The status is one of 400, 401, 403, 404, 409, 422 or 429; Retry-After comes with 429 only. |
ErrorEnvelope |
Calls to your app
These are the requests Forgeling sends to your app. credential.refresh is answered with a body; the others are events, and each links to its entry in the event catalog.
credential.refresh
The credential.refresh call
Request body
| Field | Type | Required | Description |
|---|---|---|---|
expires_at |
string | yes | When the secret's current value expires. |
run |
object | yes | |
secret |
string | yes | The name of the run secret to refresh. |
type |
any | yes | |
workspace |
object | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The new value of the secret and when it expires. | CredentialRefreshResponse |
| default | Not refreshed. The call is retried until the secret expires. | none |
approval.requested: The approval.requested eventapproval.resolved: The approval.resolved eventbudget.warning: The budget.warning eventbundle.version_ready: The bundle.version_ready eventbundle.version_rejected: The bundle.version_rejected eventmessage.completed: The message.completed eventoutput.created: The output.created eventping: The ping eventrun.cancelled: The run.cancelled eventrun.completed: The run.completed eventrun.expired: The run.expired eventrun.failed: The run.failed eventrun.idle: The run.idle eventrun.provisioning: The run.provisioning eventrun.queued: The run.queued eventrun.ready: The run.ready eventrun.resumed: The run.resumed eventrun.running: The run.running eventrun.suspended: The run.suspended eventsecret.refresh_failed: The secret.refresh_failed eventtool.completed: The tool.completed eventtool.started: The tool.started eventturn.cancelled: The turn.cancelled eventturn.completed: The turn.completed eventturn.failed: The turn.failed eventturn.interrupted: The turn.interrupted eventturn.queued: The turn.queued eventturn.started: The turn.started eventworkspace.credential_invalid: The workspace.credential_invalid event