Skip to content
中文

Complete a run wait

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/{run_id}/waits/{wait_id}/complete

Authentication

Authorization: Bearer $PRAXIS_API_KEY

Request fields

Parameter Type Description
path: run_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:

: "${RUN_ID:?Set RUN_ID}"
: "${WAIT_ID:?Set WAIT_ID}"
curl --fail-with-body -X POST "https://api.deepraxis.com/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.com',
  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.
status "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.

Measured response

HTTP 200

{
  "id": "wait_wf-c06c2de24a35fcab7ef8c6451e48092c5195be9bad5191b4618f5c97ddf25cbc",
  "run_id": "run_00mvoxmwjzff0773d6c5a90811cfc2a1a2386d82fea8ebc2ed20fe05f5d7c63847de0dffdc",
  "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-26T07:25:53.267Z",
  "expires_at": "2026-10-27T07:25:46.703Z",
  "resolved_at": "2026-10-26T07:26:03.613Z",
  "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.