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

# Trigger Call

> Trigger automated calls with various configurations: basic calls, dynamic fields, campaign organization, or insights collection. The API supports multiple request formats based on your needs.

<Warning>
  **🚨 Privacy & Consent Required:** We value the privacy and preferences of customers. Phone calls can only be made to individuals who have explicitly provided their consent. Failing to comply with this policy may result in account suspension.
</Warning>

<Warning>
  **⚠️ Terms Confirmation:** By using this API, you confirm that you have obtained the necessary consent from the provided phone numbers to be contacted. Please ensure you have reviewed and agree to our terms and conditions.
</Warning>

## API Overview

The Trigger Call API supports multiple call configurations through a single endpoint. You can trigger:

<CardGroup cols={2}>
  <Card title="🔹 Basic Calls" icon="phone">
    Simple calls with firstName, lastName, and phone number
  </Card>

  <Card title="🎯 Dynamic Fields" icon="database">
    Calls with custom fields for personalized conversations
  </Card>

  <Card title="📊 Campaign Calls" icon="chart-line">
    Calls organized under campaign names for tracking
  </Card>

  <Card title="🧠 Insights Collection" icon="brain">
    Calls with AI-powered data collection and analysis
  </Card>
</CardGroup>

## Important Consent Requirements

Before using this API, you **must** ensure:

* ✅ **Explicit Consent:** All phone numbers have explicitly consented to receive calls
* ✅ **Documentation:** You have documented proof of consent for each contact
* ✅ **Compliance:** You comply with local privacy laws (GDPR, CCPA, etc.)
* ✅ **Opt-out Options:** You provide clear opt-out mechanisms for contacts

<Note>
  The `consentForCalls` parameter must be set to `true` in your API request to confirm you have obtained proper consent from all contacts.
</Note>

## Call Configuration Types

### 1. Basic Calls

Use the `basicTriggerCall` schema for simple calls with minimal information:

* `firstName`, `lastName`, `phone`
* `projectId` and `consentForCalls`

### 2. Dynamic Fields Calls

Use the `dynamicFieldsTriggerCall` schema for personalized calls:

* All basic fields plus custom fields (address, email, company, etc.)
* Perfect for agent prompts that use `{customField}` variables
* **Additional Privacy:** Ensure consent for personal data usage

### 3. Campaign Calls

Use the `campaignTriggerCall` schema for organized campaigns:

* All basic fields plus `campaignName`
* Better tracking and analytics
* **Marketing Compliance:** Ensure consent for campaign communications

### 4. Insights Collection

Use the `insightsTriggerCall` schema for data collection:

* All basic fields plus `insights` array with questions
* AI-powered response analysis
* **Survey Consent:** Ensure consent for data collection and AI processing

## Privacy Considerations by Type

<Tabs>
  <Tab title="Basic Calls">
    * Explicit consent for calling
    * Clear opt-out mechanisms
    * Compliance with local laws
  </Tab>

  <Tab title="Dynamic Fields">
    * Consent for personal data usage
    * Data processing transparency
    * Custom field privacy protection
  </Tab>

  <Tab title="Campaign Calls">
    * Marketing communication consent
    * Campaign tracking disclosure
    * Unsubscribe mechanisms
  </Tab>

  <Tab title="Insights Collection">
    * Survey participation consent
    * AI processing disclosure
    * Data retention policies
    * Response recording notification
  </Tab>
</Tabs>

## Example Request Bodies

<CodeGroup>
  ```json Basic Call theme={null}
  {
    "callList": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "phone": "+1234567890"
      }
    ],
    "projectId": "your-project-id",
    "consentForCalls": true
  }
  ```

  ```json Dynamic Fields theme={null}
  {
    "callList": [
      {
        "firstName": "Jane",
        "lastName": "Smith",
        "phone": "+1987654321",
        "company": "Acme Corp",
        "email": "jane@acme.com"
      }
    ],
    "projectId": "your-project-id",
    "consentForCalls": true
  }
  ```

  ```json Campaign Call theme={null}
  {
    "callList": [
      {
        "firstName": "Bob",
        "lastName": "Johnson",
        "phone": "+1555123456"
      }
    ],
    "projectId": "your-project-id",
    "campaignName": "Summer_Sale_2024",
    "consentForCalls": true
  }
  ```

  ```json Insights Collection theme={null}
  {
    "callList": [
      {
        "firstName": "Alice",
        "lastName": "Brown",
        "phone": "+1555987654"
      }
    ],
    "projectId": "your-project-id",
    "insights": [
      {
        "question": "How satisfied are you with our service?",
        "type": "boolean",
        "name": "satisfied"
      },
      {
        "question": "What improvements would you suggest?",
        "type": "string",
        "name": "suggestion"
      }
    ],
    "consentForCalls": true
  }
  ```
</CodeGroup>

<Tip>
  The API automatically detects which type of call to trigger based on the fields present in your request body. No need to specify the call type explicitly.
</Tip>


## OpenAPI

````yaml post /api/v1/trigger-call
openapi: 3.0.3
info:
  title: Vodex API
  description: >-
    Comprehensive API documentation for Vodex.ai - AI-powered telecalling and
    voice automation platform. Manage projects, campaigns, audiences, and
    analyze call data with our robust API suite.
  termsOfService: https://vodex.ai/terms-of-use
  contact:
    name: Vodex Developer Support
    email: developers@vodex.ai
    url: https://vodex.ai/support
  license:
    name: Proprietary
    url: https://vodex.ai/license
  version: 2.0.0
  x-logo:
    url: >-
      https://firebasestorage.googleapis.com/v0/b/lilchirp-io.appspot.com/o/logo.png?alt=media&token=3178b5f8-84ff-426d-ba89-8088fa2c4d92
    backgroundColor: '#FFFFFF'
    altText: Vodex
servers:
  - url: https://api.vodex.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: >-
      Vodex uses API Key for authentication. If you are looking for the API
      Key(s) for your account, please fill the [Google
      Form](https://docs.google.com/forms/d/e/1FAIpQLSddntmCxrGt2TyKwPuXiDciLJC_dCMolSqU8qrikTNY00vr1A/viewform)
      with all the required details.
  - name: Projects
    description: >-
      Manage different projects in a single account. Create isolated bots for
      different use cases with comprehensive project management capabilities.
  - name: Audience
    description: >-
      Manage target audience information including names, mobile numbers, and
      custom fields for your calling campaigns.
  - name: Agent Setting
    description: >-
      Configure AI agents with custom prompts, greetings, context, and
      conversation flows for your telecalling campaigns.
  - name: Campaign
    description: >-
      Create, manage, and monitor telecalling campaigns with comprehensive
      campaign management tools.
  - name: Campaign Runs
    description: >-
      Track and analyze individual campaign execution runs with detailed
      performance metrics.
  - name: Call Trigger
    description: >-
      Trigger automated calls and manage call execution with custom parameters
      and real-time control.
  - name: Call Setting
    description: >-
      Configure call settings including caller ID, transfer numbers, voice
      settings, and call behavior parameters.
  - name: Advance Settings
    description: >-
      Advanced configuration options for API keys, rule IDs, account settings,
      and client configurations.
  - name: Appointment Settings
    description: >-
      Manage appointment booking settings, slot availability, and scheduling
      configurations for your campaigns.
  - name: Recording
    description: >-
      Upload and manage audio recordings for use in your telecalling campaigns
      and voice interactions.
  - name: Dashboard
    description: >-
      Access comprehensive analytics, metrics, and dashboard data for monitoring
      campaign performance.
  - name: Run Campaign Details
    description: >-
      Detailed analytics and reporting for individual campaign runs with
      filtering and pagination support.
  - name: Analyze
    description: >-
      AI-powered call analysis tools for generating summaries and extracting
      insights from call transcripts.
  - name: Twilio
    description: >-
      Twilio integration for caller ID verification and OTP management for
      enhanced call security.
externalDocs:
  description: Find out more about Vodex
  url: https://vodex.ai
paths:
  /api/v1/trigger-call:
    post:
      tags:
        - Call Trigger
      summary: Trigger Call
      description: >-
        Trigger automated calls with various configurations: basic calls,
        dynamic fields, campaign organization, or insights collection. The API
        supports multiple request formats based on your needs.
      operationId: triggerCallController
      parameters:
        - name: Authorization
          in: header
          description: API Key - authentication token for your account
          required: true
          schema:
            type: string
        - name: dburl
          in: header
          description: Database URL - unique account identifier
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          Call trigger payload - supports basic calls, dynamic fields,
          campaigns, or insights collection
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/basicTriggerCall'
                  title: Basic Call
                - $ref: '#/components/schemas/dynamicFieldsTriggerCall'
                  title: Call with Dynamic Fields
                - $ref: '#/components/schemas/campaignTriggerCall'
                  title: Call with Campaign
                - $ref: '#/components/schemas/insightsTriggerCall'
                  title: Call with Insights
        required: true
      responses:
        '200':
          description: Calls triggered successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/triggerCallResponse'
                  - $ref: '#/components/schemas/campaignTriggerCallResponse'
                  - $ref: '#/components/schemas/insightsTriggerCallResponse'
        '400':
          description: Bad Request - Invalid call data or missing consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    basicTriggerCall:
      required:
        - callList
        - projectId
        - consentForCalls
      type: object
      properties:
        callList:
          type: array
          description: Array of contact objects with basic information
          items:
            $ref: '#/components/schemas/basicContact'
        projectId:
          type: string
          description: Your Vodex project ID
        consentForCalls:
          type: boolean
          description: Must be true to confirm consent for calling
    dynamicFieldsTriggerCall:
      required:
        - callList
        - projectId
        - consentForCalls
      type: object
      properties:
        callList:
          type: array
          description: Array of contact objects with dynamic custom fields
          items:
            $ref: '#/components/schemas/dynamicContact'
        projectId:
          type: string
          description: Your Vodex project ID
        consentForCalls:
          type: boolean
          description: Must be true to confirm consent for calling
    campaignTriggerCall:
      required:
        - callList
        - projectId
        - campaignName
        - consentForCalls
      type: object
      properties:
        callList:
          type: array
          description: Array of contact objects for the campaign
          items:
            $ref: '#/components/schemas/basicContact'
        projectId:
          type: string
          description: Your Vodex project ID
        campaignName:
          type: string
          description: Name to organize calls under for tracking and analytics
        consentForCalls:
          type: boolean
          description: Must be true to confirm consent for calling
    insightsTriggerCall:
      required:
        - callList
        - projectId
        - insights
        - consentForCalls
      type: object
      properties:
        callList:
          type: array
          description: Array of contact objects for insights collection
          items:
            $ref: '#/components/schemas/basicContact'
        projectId:
          type: string
          description: Your Vodex project ID
        insights:
          type: array
          description: Array of insight questions to collect during calls
          items:
            $ref: '#/components/schemas/insightQuestion'
        consentForCalls:
          type: boolean
          description: Must be true to confirm consent for calling
    triggerCallResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the call trigger was successful
        message:
          type: string
          description: Response message
        data:
          type: object
          properties:
            callsTriggered:
              type: integer
              description: Number of calls triggered
            callIds:
              type: array
              description: Array of call IDs generated
              items:
                type: string
    campaignTriggerCallResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the campaign call trigger was successful
        message:
          type: string
          description: Response message
        data:
          type: object
          properties:
            campaignName:
              type: string
              description: Name of the campaign
            callsTriggered:
              type: integer
              description: Number of calls triggered
            callIds:
              type: array
              description: Array of call IDs generated
              items:
                type: string
            campaignId:
              type: string
              description: Generated campaign ID
    insightsTriggerCallResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the insights call trigger was successful
        message:
          type: string
          description: Response message
        data:
          type: object
          properties:
            callsTriggered:
              type: integer
              description: Number of calls triggered
            callIds:
              type: array
              description: Array of call IDs generated
              items:
                type: string
            insightsConfigured:
              type: array
              description: List of insight questions configured
              items:
                type: string
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
    basicContact:
      required:
        - firstName
        - lastName
        - phone
      type: object
      properties:
        firstName:
          type: string
          description: Contact's first name
        lastName:
          type: string
          description: Contact's last name
        phone:
          type: string
          description: Contact's phone number with country code
    dynamicContact:
      required:
        - firstName
        - lastName
        - phone
      type: object
      properties:
        firstName:
          type: string
          description: Contact's first name
        lastName:
          type: string
          description: Contact's last name
        phone:
          type: string
          description: Contact's phone number with country code
        address:
          type: string
          description: Contact's address (dynamic field example)
        email:
          type: string
          description: Contact's email address (dynamic field example)
        company:
          type: string
          description: Contact's company name (dynamic field example)
      additionalProperties:
        type: string
        description: Any additional custom fields used in your agent prompt
    insightQuestion:
      required:
        - question
        - type
        - key
      type: object
      properties:
        question:
          type: string
          description: The question to ask or information to collect
        type:
          type: string
          enum:
            - text
            - number
            - boolean
          description: Type of response expected
        key:
          type: string
          description: A variable name for the question
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: API Key authentication. Pass your API key in the Authorization header.
      name: Authorization
      in: header

````