Skip to content
EN
Open app

For AI assistants: this page as plain markdown is at https://docs.voicelogica.ai/raw/workflows/on-api-call.md, and https://docs.voicelogica.ai/llms.txt lists the docs by topic, one file each, small enough to read whole. Read those rather than this HTML page.

On API Call

2 min read
Copy as Markdown
View as MarkdownOpen the raw .md file.md

On API Call starts the graph from your system - CRM, form, button (Runs when: When an API call is made). It does not need an agent attach. Phone triggers do.

On API Call trigger on the canvas
wf-apiExpand

A list on a schedule is Campaigns. A single AI outbound call is initiate-call. This is “run this automation now” with a JSON body - send email, update a sheet, fan out nodes. Put Make Outbound Call on the graph only if the next step is actually a call.

  1. + Add Trigger - On API Call

    Payload Schema is the JSON schema of the body POSTed to the run-workflow endpoint (with your API key). Validated live. Default empty object with no required fields accepts any object. Sample schemas and a cURL helper appear in the panel; create an API key if you need one.

    On API Call Payload Schema settings
    on-api-call-formExpand
  2. From Work Flow Triggered, add nodes that read those keys.

  3. Save & go live. Copy the workflow id from the URL or the list.

  4. POST with an API key that can run workflows:

    POST https://api.voicelogica.ai/api/v1/agentic/work-flows/run-workflow/YOUR_WORKFLOW_ID
    x-api-key: YOUR_API_KEY
    Content-Type: application/json
    {
    "order_id": "ORD123",
    "email": "ada@example.com"
    }
  5. Confirm the nodes ran (email, sheet, or a builder dry-run first).

Should I use the initiate-call API or the On API Call workflow trigger?

Use initiate-call when you need the agent to call a number and talk to the person. Use the On API Call trigger when you need a workflow to run from your system, for example to send an email, update a sheet or branch on data.

Why can't I save my On API Call workflow because of the payload schema?

The Payload Schema must be valid JSON Schema, and the panel validates it as you type. Start from the default empty object or use a sample schema button, then press Beautify.