Skip to content

Trigger Calls using API

Your leads are already in a CRM, a spreadsheet, or a table in your own database. Each row has a name, an amount, an account number. This page turns one of those rows into a phone call the agent has already been briefed on — so it opens with “Hi Rushil, I’m calling about your Quick Credit account” instead of asking who it is speaking to.

The mechanism is the API Trigger node. It gives your agent a URL; you POST a phone number and a bag of variables to it, and the call goes out.

Before you start: a telephony provider connected for outbound calls, and an API key from the developer portal.

  1. Add the API Trigger node

    Open your agent, click the + button on the canvas (Add node), and choose API Trigger — it is the first entry in the list.

    The node has no settings to fill in. Adding it is what creates the endpoint.

  2. Copy the trigger URL

    Open the node. It shows two URLs, both ending in the same UUID:

    RunsUse it
    Test URLYour latest saved draftWhile you are still changing the agent
    Production URLThe published versionOnce you are live
  3. Send the request

    POST to the URL with your API key in the X-API-Key header. Two fields matter: phone_number, and initial_context — a free-form object of variables the agent can reference in its prompts as {{initial_context.field}}.

    Trigger a call
    curl -X POST https://api.decibyl.ai/api/v1/public/agent/test/{uuid} \
    -H "Content-Type: application/json" \
    -H "X-API-Key: dcb_your_api_key" \
    -d '{
    "phone_number": "+919876543210",
    "initial_context": {
    "debtor_name": "Rushil",
    "client_name": "Quick Credit",
    "debt_amount": "3500"
    }
    }'

    The keys inside initial_context are yours to choose. Whatever you send is what your prompts can reference — a Start Call greeting of Hi {{initial_context.debtor_name}}, this is Alex from {{initial_context.client_name}} resolves against exactly these fields.

  4. Listen to the result

    The call goes out immediately. Because the agent was briefed before it dialled, the opening line is specific:

    “Hi, this is Alex from Apex Recovery Solutions. Am I speaking with Rushil? I’m calling about your Quick Credit account with an outstanding balance of ₹3,500.”

    No setup questions, no “can you confirm your account number please”. The recording and transcript appear under Usage once the call ends.

Common errors

400: Telephony provider not configured for this organization

No telephony configuration is marked as the default for outbound calls. Open Telephony, edit your configuration, and switch on Set as default for outbound calls. Having a configuration is not enough — one of them has to be the default. See Connect with Telephony.

401 or 403

The X-API-Key header is missing, misspelled, or holds a key that has been archived. Keys start with dcb_. Generate a fresh one in the developer portal and try that.

The call connects but the variables come out empty

Two things to check. First, that the placeholder is spelled {{initial_context.debtor_name}} and not {{debtor_name}} — the prefix is part of the name. Second, that you are hitting the URL for the version you edited: a prompt changed on the draft is not on the production URL until you publish.

Next steps