Automation
Complete a run wait
Complete only an event wait with a payload of at most 32 KiB satisfying its filter.
Complete only an event wait with a payload of at most 32 KiB satisfying its filter; timer and child waits cannot be completed manually. Reusing the same id and payload returns replayed=true; other repeats return WAIT_ALREADY_RESOLVED and expired waits return WAIT_EXPIRED.
POST /automation/v1/runs/{id}/waits/{wait_id}/complete
Authentication
Authorization: Bearer $PRAXIS_API_KEY
Request fields
| Parameter | Type | Description |
|---|---|---|
| path: id | string | required; Run ID (run_). |
| path: wait_id | string | required; Wait ID (wait_) belonging to this run. |
application/json
no additional fields.
| Field | Type | Description |
|---|---|---|
| id | string | optional; Optional event deduplication ID; repeating the same ID and payload for this wait returns replayed=true. |
| payload | null / string / number / boolean / object / null / string / number / boolean / object / JSON[][] | required; Event data, at most 32 KiB when JSON-encoded; must satisfy the wait filter. |
| payload (variant 5).* (variant 5) | object | Recursive JSON value. |
| payload (variant 5).* (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| payload (variant 6)[] (variant 5).* | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
| payload (variant 6)[] (variant 6)[] | null / string / number / boolean / object / JSON[] | Recursive JSON value. |
Examples
Set these environment variables to your own resources:
| Variable | Source |
|---|---|
| RUN_ID | Run id; suspend/resume require a workflow; cancel requires a nonterminal run |
| WAIT_ID | Wait id from the same run with kind=event and state=open |
: "${RUN_ID:?Set RUN_ID}"
: "${WAIT_ID:?Set WAIT_ID}"
curl --fail-with-body -X POST "https://api.deepraxis.ai/automation/v1/runs/${RUN_ID}/waits/${WAIT_ID}/complete" \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"payload": {
"answer": 42
}
}'import { createAutomationClient } from '@deepraxis/sdk/automation';
function env(name: string): string {
const value = process.env[name];
if (!value) throw new Error(`Set ${name}`);
return value;
}
const automation = createAutomationClient({
apiKey: env('PRAXIS_API_KEY'),
baseUrl: 'https://api.deepraxis.ai',
maxRetries: 0,
timeoutMs: 90_000,
});
const result = await automation.runs.waits.complete({
"path": {
"id": env("RUN_ID"),
"wait_id": env("WAIT_ID")
},
"body": {
"payload": {
"answer": 42
}
}
});
console.log(result);Response
HTTP 200
Success
application/json
| Field | Type | Description |
|---|---|---|
| id | string | required; Wait point id, prefixed wait_. |
| run_id | string | required; Id (run_) of the run the wait belongs to. |
| kind | "event" / "timer" / "child" | required; Wait kind. event waits for an external event; timer waits until a time; child waits for a child run. This endpoint only works on event waits. |
| state | "cancelled" / "open" / "resolved" / "expired" | required; Wait state after the call. open is still waiting; resolved was satisfied; expired passed its deadline; cancelled was cancelled. A successfully submitted event leaves it resolved. |
| task | null / object | required; The workflow step {reference, name} that produced the wait; null when there is none. |
| task (variant 2).reference | string | required; JSON Pointer of the step. |
| task (variant 2).name | string | required; Step name, the key in the workflow YAML. |
| resume_at | null / string | required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds. |
| event_type | null / string | required; For kind=event, the event type being awaited; null for other kinds. |
| child_run_id | null / string | required; For kind=child, the id of the child run being awaited; null for other kinds. |
| created_at | string | required; Time the wait point was created (RFC 3339 UTC). |
| expires_at | null / string | required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline. |
| resolved_at | null / string | required; Time the wait point was resolved (RFC 3339 UTC). |
| replayed | boolean | required; true when this was a repeated submission with the same id and payload, so the original result is returned instead of processing it again. |
Measured response
HTTP 200
{
"id": "wait_wf-eebc9ef34869206fa1bcc1e2ae6375990a7ab34c5ad485ac98a4f189c4b37346",
"run_id": "run_00mv67mkw52c7fa90cc9649b1053e66fd836b071f289acb667ff8ca853e65bc4608e9a45bd",
"kind": "event",
"state": "resolved",
"task": {
"reference": "/do/0/ready",
"name": "ready"
},
"resume_at": null,
"event_type": "ready",
"child_run_id": null,
"created_at": "2026-10-13T04:57:56.982Z",
"expires_at": "2026-10-14T04:57:50.405Z",
"resolved_at": "2026-10-13T04:58:03.972Z",
"replayed": false
}Errors
| HTTP | Codes and description |
|---|---|
| 400 | INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. INPUT_INVALID: The input does not satisfy the target contract or validation rules. |
| 404 | RUN_NOT_FOUND: The run does not exist or is not visible to this tenant. WAIT_NOT_FOUND: The wait point does not exist in this run. |
| 409 | OPERATION_NOT_SUPPORTED: This resource type does not support the operation. WAIT_ALREADY_RESOLVED: The wait point is closed, or a repeated event differs from the original submission. |
| 410 | WAIT_EXPIRED: The wait point has expired. |
| 413 | PAYLOAD_TOO_LARGE: The request exceeds the size allowed for this operation. |
| default | RFC 9457 automation problem. 429 includes Retry-After. |
Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.