Skip to main content
This flow selects an active dashboard-managed Automation, creates a run for one contact, and tracks the asynchronous Automation run API resource.

Prerequisites

  • A server-side bt_live_ key with automations:run and automations:read.
  • An active Automation visible to the organization and one existing or inline contact reference.
  • A unique, nonsecret Idempotency-Key for the logical run.
  • An understanding that the Automation—not the API request—defines its agent, wait steps, retry rules, and branching.

Select an active Automation

List summaries with automations:read, then select an item whose status is active. Save JavaScript samples as .mjs or run them in an ESM project. Their top-level await requires ESM, and Node 18 or later provides the built-in fetch they use.
In the current API version, summaries declare no API inputs:

Start the run

Because input_fields is empty, omit input as the canonical sample does, or send {} only.
Starting this Automation run can place real PSTN calls according to the dashboard-managed Automation definition. Verify the Automation, contact, configured behavior, and timing before sending this mutation.
Only a nonempty input_fields declaration returned by the API permits input, and then only the exactly named fields may be sent.

Expected response

The API returns 202 Accepted. Save the Automation run API resource id.

Poll and cancel

Polling needs automations:read; cancellation needs automations:run. Cancellation accepts an optional Idempotency-Key and remains best-effort for a step already executing.

Common errors