Skip to main content
POST
FIXED · call Pass the customer’s verified from_number. With require_from_number_for_shared_agent off (default), omission selects the oldest eligible number by created_at then id; a disabled number is not eligible. With it on, two or more settled attachments, even disabled ones, require an explicit sender (400 from_number_required). A sole eligible number works; none gives 400 agent_missing_phone_number. Pending imports do not count. NOT OFFERED → do this instead · call Outbound developer instructions do not inherit the agent’s inbound system_prompt or the number’s custom_prompt. Include the business and purpose in prompt or the recipient’s prompt_override. Fixed call rules and enabled knowledge and tools can still apply. YOU CAN CHANGE · call Send agent_id, from_number, to_number and a meaningful prompt. Choose dynamic_vars for this call. SCOPE · call Track an outbound request using its receipt. Preserve the request ID across an uncertain response and check its status before another dial. Read GET /v1/organisation/outbound-settings. Where available, the Owner or organisation API key can PATCH the same path with require_from_number_for_shared_agent. Campaigns need a reviewed sender. If it changes, choose and confirm again. Read the compact AI rules Start one outbound call from an account-owned number assigned to an active agent. A 201 response means the call was initiated; it does not confirm connection, conversation, completion or a successful outcome.
Method: POST ·
Success: 200 / 201 ·
Scope: Owning account
The important part
  • Call purpose. Send at least 10 characters after trimming. The agent and phone-number prompts do not supply a fallback purpose.
  • Per recipient. You choose variable names. Always send the customer’s from_number on a shared agent. Omitting it selects the oldest eligible number.
  • Save one UUID request_id before a deliberate call intent if you need launch reconciliation.
  • A 201 means initiated. A same-ID 200 replay returns the existing call; pending or unknown must never trigger a new UUID automatically.
Supply at least ten trimmed characters of useful call purpose. Send prompt_validation: "strict" to have a shorter nonblank purpose refused with 400 prompt_too_short before anything is dialled. Without it, a short purpose is still dialled and the agent is told to apologise and end the call. The call purpose has no separate character limit. The whole JSON request must be under 100 KB (102,400 bytes); a larger request gets 413 payload_too_large. Keep call purposes short: a few hundred to a few thousand characters. The number’s SMS and website instruction limits apply to different fields.

Authentication

Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential. Send Content-Type: application/json.

Request fields

Send a JSON object. Only send to a recipient you are authorised to contact. This endpoint has no dry-run option. The examples use an explicit recipient variable and can place a real call when run. Optional recipient location values do not override suppression, contact hours or capacity rules. Use dynamic_vars for single-call substitutions; campaign recipient variables are a different field. There is no fallback to an agent-level phone_number. When from_number is omitted, selection uses the oldest eligible number by creation time then row ID. A number with outbound disabled is skipped. If no eligible number remains, the request gets 400 agent_missing_phone_number. If your organisation requires an explicit sender, two or more attached numbers, even disabled ones, need from_number (400 from_number_required). Selection does not bypass the final ownership and availability checks. Contact-hours refusals use error.code outside_hours or needs_timezone (409), or contact_policy_unavailable (503). Details include outcome:not_sent, sent:false and charged:false. Advisory messages can instead start “Outside calling hours” or “Weekend where they are” and contain the next local window. refused_before_dispatch is a dispatch outcome marker, not an HTTP status or a replacement error.code. An unknown outcome can still mean something was sent. Optional request_id is a UUID saved before one deliberate call intent. Required prompt and the existing behavior without a request ID remain unchanged. A same-ID accepted replay returns HTTP 200 with the same call_id and replayed:true; it does not return to/from. Pending/unknown repeats return 409 and never dispatch again. A 201 with request_status:unconfirmed still preserves the known call ID and safe_to_retry:false. Read the saved UUID through outbound request status.

Response fields

201 Created returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false. HTTP 200 is the accepted replay shape: call_id, request_id, status:"initiated" and replayed:true. Unlike the first 201 response, it does not require to or from.

Example request

Raw HTTP base URL: https://api.nixflex.com/v1. Node and Python SDK base URL: https://api.nixflex.com. The SDK adds /v1. Running the call example can place a real call. Set NIXFLEX_API_KEY, the owned agent and number, and an approved recipient before running. The cURL example also needs a durably saved NXF_REQUEST_ID. Keep the account credential private. The cURL tab demonstrates the new request UUID. The SDK/CLI examples require Node/CLI 0.11.0 or later or Python 0.4.0 or later; the examples below omit request_id and retain the older launch behaviour. For UUID reconciliation, use the cURL request or the SDK preparation workflow. No example retries a write.
A minimal UUID request body is shown below. The UUID is illustrative; never reuse a documentation UUID for live work.
Request shape

Example response

Illustrative accepted replay and first-launch responses. Save both identifiers privately.

Errors

Failures return an error object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.
Nixflex can refuse a call or recipient whose prompt placeholder has no value (409 missing_voice_details). This check is managed by Nixflex and may be off, so always validate rows yourself.

Retry and idempotency

Save one UUID before the first request for an intended call. Persist it with the request payload so a process restart cannot accidentally create a new intent. Supply it as the JSON field request_id, not an Idempotency-Key header. A 201 can also include request_status:"unconfirmed" and safe_to_retry:false: the call ID is known even though the final journal acknowledgement was lost. Never redial it. A new UUID is a new explicit call intent. Requests without request_id retain their existing behaviour and have no launch replay protection. Read outbound request status. A 404 or an empty history page does not confirm that an uncertain call was never placed.

Authorizations

Authorization
string
header
required

KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.

Body

application/json
agent_id
string
required

Owned active agent ID.

Minimum string length: 1
to_number
string
required

Recipient in E.164 format.

Minimum string length: 1
prompt
string
required

Send a purpose of at least 10 characters after trimming. No separate maximum; the whole JSON request must be under 100 KB. Without prompt_validation:"strict" a shorter nonblank purpose can pass request validation, but the call is instructed to end.

Minimum string length: 10
prompt_validation
enum<string>

Optional. Only "strict": a nonblank purpose under 10 trimmed characters gets 400 prompt_too_short and a non-text prompt gets 400 invalid_prompt, before dialling. Any other value, including null or an empty string, gets 400 invalid_prompt_validation.

Available options:
strict
from_number
string

Optional owned outbound-enabled number assigned to this agent. If omitted, the oldest eligible number is selected.

dynamic_vars
object

Values for {{name}} placeholders. Choose case-sensitive custom names using ASCII letters, digits and underscores. Reserved call variables are filled by the engine. Supply other referenced values per recipient.

campaign_id
string | null

Optional campaign association. Omitted or empty becomes null.

recipient_timezone
string

Optional recipient IANA time zone. Used for recipient-local contact checks, not the business clock.

recipient_country
string

Optional two-letter recipient country code.

request_id
string<uuid>

Account-scoped UUID for one call intent. Save it before sending. Reusing it never starts a second call; changed input conflicts.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

Response

The same accepted request was replayed. No second dispatch; the response omits original to/from fields.

call_id
string
required
request_id
string<uuid>
required

Account-scoped UUID for one call intent. Save it before sending. Reusing it never starts a second call; changed input conflicts.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
status
string
required
Allowed value: "initiated"
replayed
boolean
required