dograh/docs/voice-agent/api-trigger.mdx

23 lines
819 B
Text
Raw Permalink Normal View History

2025-12-23 12:59:49 +05:30
---
title: "API Trigger"
description: "API Trigger helps you trigger your Voice Agent using external systems, like N8n or Zapier"
---
### API Payload
2026-01-08 13:03:59 +05:30
The API Trigger is a POST request, which requires an [API Key](../configurations/api-keys). It expects a valid JSON with `phone_number` and `initial_context`.
2025-12-23 12:59:49 +05:30
### Initial Context
`initial_context` is a valid JSON object, which contains any contextual information that you would want your voice agent to access. You can refer to these values in your prompts using **Handle Bars**, which are values enclosed in `{{` and `}}`.
Example: If you have below JSON as your `initial_context`
```
{
"initial_context": {
"user": {
"name": "John"
}
}
}
```
you can refer to the user name in your prompts as `{{initial_context.user.name}}`.