Cancel a pending or running Dream.
POST /api/v1/forward/dreams/{id}/cancel
Only Dreams in the pending or running state can be canceled. Calling this endpoint again for an already canceled Dream returns the current object idempotently.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or admin SAT>. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Dream ID with the drm_ prefix. |
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
| Return value | object | The canceled Dream object, with status set to canceled. |
Errors
| HTTP | Type | Trigger |
|---|---|---|
400 | invalid_request_error | Invalid id, non-empty request body, or the Dream is in a terminal state that cannot be canceled. error.code can be invalid_dream_id, invalid_request_body, or dream_not_cancelable. |
401 | authentication_error | Authentication is missing, invalid, or expired. |
403 | permission_error | The token cannot manage Dreams. Identity SAT is not supported by this endpoint. |
404 | not_found_error | The Dream does not exist or is not visible to the caller. error.code is dream_not_found. |
429 | rate_limit_error | The request rate limit has been reached. |
500/502/503 | api_error | The service or an internal dependency is temporarily unavailable. |

