The AI Voice Calling Agent API provides a comprehensive platform for managing user campaigns, triggering automated outbound voice calls, and analyzing campaign performance. The system allows you to organize users into campaigns, attach relevant data, create triggers with AI-generated columns, and execute targeted calling campaigns.
https://api.revrag.ai/v1https://sandbox-api.revrag.ai/v1/campaigns/create
Creates a new user campaign with an associated AI agent.
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | ID of the AI agent to associate with this campaign |
campaign_name | string | Yes | Unique name for the campaign |
description | string | No | Description of the campaign purpose |
metadata | object | No | Additional metadata for the campaign |
/campaigns/{campaign_id}/data
Attaches user data to an existing campaign via JSON or CSV upload.
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | Yes | The campaign ID to attach data to |
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | Data merge mode: prefer_original, prefer_new, prefer_none |
data_format | string | Yes | Format of input data: json or csv |
users | array | Yes (JSON) | Array of user objects |
csv_data | string | Yes (CSV) | Base64 encoded CSV content |
csv_headers | array | Yes (CSV) | Column headers in the CSV |
mapping | object | No | Field mapping for CSV columns |
prefer_original: Keep existing data, only add new fieldsprefer_new: Overwrite existing data with new dataprefer_none: Skip users that already exist/campaigns/{campaign_id}
Retrieves campaign information and user data with optional filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string | Yes | The campaign ID to retrieve |
| Parameter | Type | Required | Description |
|---|---|---|---|
filters | string | No | JSON-encoded filter criteria |
page | integer | No | Page number for pagination (default: 1) |
limit | integer | No | Number of users per page (default: 100, max: 1000) |
include_user_data | boolean | No | Whether to include user data (default: true) |
/campaigns/{campaign_id}
Updates campaign information, including changing the associated agent.
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | No | New agent ID to associate with campaign |
campaign_name | string | No | Updated campaign name |
description | string | No | Updated description |
status | string | No | Campaign status: active, inactive, archived |
metadata | object | No | Updated metadata |
/calls/trigger
Triggers an immediate AI voice call to a specific user without requiring campaign setup.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | Unique identifier for the user |
phone_number | string | Yes | User’s phone number in E.164 format |
agent_id | string | Yes | ID of the AI agent to use |
workflow_id | string | Yes | ID of the workflow/prompt set to use |
call_type | string | No | Type of call: onboarding, retention, support, custom |
priority | string | No | Call priority: low, medium, high (default: medium) |
metadata | object | No | User-specific data for personalization |
scheduling.immediate | boolean | No | Trigger immediately (default: true) |
scheduling.scheduled_time | string | No | ISO 8601 datetime for scheduled calls |
configuration.max_attempts | integer | No | Max retry attempts (default: 3) |
configuration.telephony_provider | string | No | Provider: plivo, jio (default: plivo) |
/calls/{call_id}/status
Retrieves the current status of a single triggered call.
| Parameter | Type | Required | Description |
|---|---|---|---|
call_id | string | Yes | The call ID to retrieve status for |
/triggers/create
Creates a new trigger with AI-generated columns for campaign execution.
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_name | string | Yes | Name for the trigger |
campaign_id | string | Yes | ID of the campaign to target |
workflow_id | string | Yes | ID of the AI workflow to use |
ai_columns | array | No | AI-generated columns configuration |
ai_columns[].column_name | string | Yes | Name of the AI column |
ai_columns[].ai_prompt | string | Yes | Prompt for AI to generate column data |
ai_columns[].data_type | string | Yes | Data type: string, number, boolean, date |
call_configuration | object | No | Call-specific configuration |
scheduling | object | No | Scheduling constraints |
/triggers/{trigger_id}
Updates trigger configuration, including adding or modifying AI columns.
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_id | string | Yes | The trigger ID to update |
add: Add new AI columnupdate: Update existing AI columndelete: Remove AI column/triggers/{trigger_id}/run
Executes the trigger to start the calling campaign.
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_id | string | Yes | The trigger ID to execute |
| Parameter | Type | Required | Description |
|---|---|---|---|
concurrency | integer | No | Concurrency level: 1, 2, 3, or max (default: 1) |
max_concurrent_calls | integer | No | Maximum simultaneous calls (overrides concurrency) |
priority | string | No | Execution priority: low, medium, high |
filters | object | No | Additional filters to apply to campaign |
test_mode | boolean | No | Run in test mode (no actual calls made) |
notification_settings | object | No | Notification preferences |
/triggers/{trigger_id}/status
Retrieves current status and execution data for a trigger.
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_id | string | Yes | The trigger ID to get status for |
| Parameter | Type | Required | Description |
|---|---|---|---|
include_details | boolean | No | Include detailed execution data |
include_user_status | boolean | No | Include per-user call status |
/triggers/{trigger_id}/export
Exports trigger data and results as a CSV file.
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_id | string | Yes | The trigger ID to export data for |
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | No | Export format: csv, xlsx (default: csv) |
include_fields | string | No | Comma-separated list of fields to include |
include_call_logs | boolean | No | Include detailed call logs |
include_ai_columns | boolean | No | Include AI-generated column data |
| Status Code | Description | When Used |
|---|---|---|
200 OK | Request successful | GET, PUT requests |
201 Created | Resource created successfully | POST requests |
400 Bad Request | Invalid request parameters | Validation errors |
401 Unauthorized | Invalid or missing API key | Authentication errors |
404 Not Found | Resource not found | Invalid IDs |
409 Conflict | Resource already exists | Duplicate resources |
422 Unprocessable Entity | Validation errors | Data format issues |
429 Too Many Requests | Rate limit exceeded | Too many requests |
500 Internal Server Error | Server error | System failures |
| Status | Description |
|---|---|
queued | Call is queued for execution |
dialing | Currently dialing the number |
connected | Call is connected and in progress |
completed | Call completed successfully |
failed | Call failed (no answer, busy, etc.) |
cancelled | Call was cancelled |
| Status | Description |
|---|---|
created | Trigger created but not yet executed |
processing_ai | AI columns are being generated |
ready | Ready to run |
running | Currently executing calls |
paused | Execution paused |
completed | All calls completed |
failed | Execution failed |
cancelled | Execution cancelled by user |