> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voicerix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Trigger

> Trigger outbound calls to this agent from your own system, CRM, or automation tools.

The **API Trigger** node lets external systems start a call through this agent programmatically. When you add this node, Voicerix generates a unique URL that you or your team can call from any system — a backend, a CRM, n8n, Zapier, or any other tool.

## How it works

1. Add an API Trigger node to your agent
2. Voicerix generates a unique endpoint URL for this agent
3. Your system sends a POST request to that URL with the customer's phone number
4. Voicerix places the call automatically

## Trigger URL

Once the node is added, you will see two URLs in the node settings:

| URL                | Use for                                              |
| ------------------ | ---------------------------------------------------- |
| **Production URL** | Live calls — runs the published version of the agent |
| **Test URL**       | Testing — runs the latest saved draft                |

<Warning>
  If you update and save the agent but do not publish it, the Production URL will still run the old published version. Use the Test URL to verify changes before publishing.
</Warning>

## Making a request

You need an API key to authenticate requests. Generate one from **Settings** in your Voicerix platform.

Send a POST request with your API key and the customer's phone number:

```bash theme={null}
curl -X POST https://app.voicerix.ai/api/v1/public/agent/{uuid} \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "phone_number": "+919876543210",
    "initial_context": {
      "customer_name": "Rahul",
      "emi_amount": "8500",
      "due_date": "15th March"
    }
  }'
```

## Initial Context

Use `initial_context` to pass customer-specific data into the call. You can reference these values in your agent's prompts in two ways:

* `{{customer_name}}` — shorthand, works directly
* `{{initial_context.customer_name}}` — explicit form, same result

Both work. Use whichever feels cleaner in your prompts.

## Response

A successful request returns a run ID you can use to track the call:

```json theme={null}
{
  "status": "initiated",
  "workflow_run_id": 12345
}
```

You can use this ID to fetch the call recording, transcript, and result from Calls History.
