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

ParameterTypeDescription
path: idstringrequired; Run ID (run_).
path: wait_idstringrequired; Wait ID (wait_) belonging to this run.

application/json

no additional fields.

FieldTypeDescription
idstringoptional; Optional event deduplication ID; repeating the same ID and payload for this wait returns replayed=true.
payloadnull / 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)objectRecursive 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:

: "${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

FieldTypeDescription
idstringrequired; Wait point id, prefixed wait_.
run_idstringrequired; 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.
tasknull / objectrequired; The workflow step {reference, name} that produced the wait; null when there is none.
task (variant 2).referencestringrequired; JSON Pointer of the step.
task (variant 2).namestringrequired; Step name, the key in the workflow YAML.
resume_atnull / stringrequired; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds.
event_typenull / stringrequired; For kind=event, the event type being awaited; null for other kinds.
child_run_idnull / stringrequired; For kind=child, the id of the child run being awaited; null for other kinds.
created_atstringrequired; Time the wait point was created (RFC 3339 UTC).
expires_atnull / stringrequired; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline.
resolved_atnull / stringrequired; Time the wait point was resolved (RFC 3339 UTC).
replayedbooleanrequired; 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

HTTPCodes and description
400INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. INPUT_INVALID: The input does not satisfy the target contract or validation rules.
404RUN_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.
409OPERATION_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.
410WAIT_EXPIRED: The wait point has expired.
413PAYLOAD_TOO_LARGE: The request exceeds the size allowed for this operation.
defaultRFC 9457 automation problem. 429 includes Retry-After.

Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.

Export

On this page