The API Trigger node lets you initiate outbound calls to your voice agent programmatically. When you add an API Trigger node to your workflow, Peachdesk generates a unique endpoint URL that external systems can call to start a conversation. This is useful when you want to trigger calls from your own backend, a CRM, or workflow tools like n8n and Zapier.

Prerequisites

Finding your trigger URL

When you add an API Trigger node to your workflow, Peachdesk assigns it a unique UUID. The trigger node exposes two URLs that share this UUID:
  • A production URL for the published workflow
  • A test URL for the latest draft
You can copy either URL from the trigger nodeтАЩs settings dialog.
If you are using the hosted version, replace your-peachdesk-instance with api.peachdeskai.com.

Test vs production

Use the test URL while iterating on changes so production traffic continues to hit the published version. The production URL only executes a published workflow. If you update the workflow but do not publish it, the production trigger will continue to run the older published version. Once you publish your draft, both URLs run the same definition.
A common pitfall is editing the workflow, saving the draft, and then calling the production trigger URL expecting the new behavior. That will not work until you publish the workflow. Use the test URL to verify draft changes before publishing.
The request body, headers, and response shape are identical for both URLs.

Making a request

Authenticate by passing your API key in the X-API-Key header. The request body requires a to_number and accepts optional initial_context and telephony_configuration_id fields.
Use the test URL when you want to verify draft changes before publishing.

Response

A successful request returns a workflow_run_id that you can use to retrieve call details, recordings, and transcripts. It also returns a call_id тАФ the identifier echoed as call.call_id on the outbound webhook, so you can correlate the webhook event with this call.

Error responses

Initial context

initial_context is a JSON object containing any information you want your voice agent to access during the call. You can reference these values in your prompts using dynamic variables тАФ values enclosed in {{ and }}.
You can pass the same data as dynamic_variables тАФ a flat string map that merges into initial_context. See Passing dynamic variables via the API.
For example, if your request includes:
You can reference the userтАЩs name in your prompt as {{initial_context.user.name}}. See Context & Variables for more on how data flows through a call.

Correlating calls with webhooks

Pass a metadata object to attach your own correlation keys to the call. Peachdesk stores it and echoes it back unchanged as call.metadata on the outbound event webhook, alongside the call_id returned in the response.
When the webhook arrives, match call.call_id against the call_id from this response (or read your own key out of call.metadata) to tie the event back to the call you triggered.

Choosing a telephony configuration

By default, calls are placed through your organizationтАЩs default outbound telephony configuration. To route a specific call through a different configuration тАФ for example, to dial out from a regional number тАФ pass telephony_configuration_id in the request body.
The id is shown on each row in Telephony configurations (https://app.peachdeskai.com/telephony-configurations for hosted or http://localhost:3010/telephony-configurations for local). The configuration must belong to the same organization as the API Trigger; otherwise the request returns 404.
For full endpoint details including all parameters and response fields, see the API reference.