POST
/
create_campaign
curl --request POST \
  --url https://api.toingg.com/api/v3/create_campaign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "voice": "<string>",
  "language": "<string>",
  "script": "<string>",
  "purpose": "<string>",
  "knowledgeBase": "<string>",
  "calendar": "<string>",
  "firstLine": "<string>",
  "flowName": "",
  "systemPrompt": "",
  "tone": "<string>",
  "maxCallTimeout": 1,
  "inactiveCallTimeout": 15,
  "postCallAnalysis": false,
  "postCallAnalysisSchema": {},
  "totalCallTime": 123,
  "totalNumCall": 123,
  "totalSpent": 123,
  "averageCallCost": 123,
  "timeZone": "UTC",
  "isFreeflow": true
}'
"<any>"

Overview

The “Create Campaign” endpoint is designed to help users efficiently set up a new AI-driven calling campaign in Toingg. By sending a POST request to the /create_campaign endpoint, users can specify various parameters such as title, voice, language, and more. These parameters are crucial in defining the campaign’s unique characteristics, including its script, purpose, and call handling settings. Additionally, the endpoint offers features for post-call analysis and cost tracking, making it an essential tool for optimizing AI calling strategies.

Example cURL Request

curl -X 'POST' \
  'https://api.toingg.com/api/v3/create_campaign' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer yourBarerToken' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "string",
  "voice": "string",
  "language": "string",
  "script": "string",
  "purpose": "string",
  "knowledgeBase": "string",
  "calendar": "string",
  "firstLine": "string",
  "flowName": "",
  "systemPrompt": "",
  "tone": "string",
  "maxCallTimeout": 1,
  "inactiveCallTimeout": 15,
  "postCallAnalysis": false,
  "postCallAnalysisSchema": {},
  "totalCallTime": 0,
  "totalNumCall": 0,
  "totalSpent": 0,
  "averageCallCost": 0,
  "isFreeflow": true
}'
  • title: Specifies the name of the campaign, helping users identify and manage multiple campaigns.
  • voice: Determines the AI voice used during calls, allowing customization to match the campaign’s tone and audience.
  • language: Sets the language for the campaign, ensuring communication is clear and appropriate for the target audience.
  • script: Provides the dialogue or script the AI will follow during calls, essential for maintaining consistency and achieving campaign objectives.
  • purpose: Describes the campaign’s goal, guiding the AI’s interactions and ensuring alignment with business objectives.
  • knowledgeBase: Links to a repository of information the AI can use to answer questions or provide details during calls.
  • calendar: Integrates scheduling capabilities, enabling the AI to manage appointments or follow-ups.
  • firstLine: Sets the initial line or greeting used by the AI, creating a strong first impression.
  • flowName: Identifies the specific call flow or sequence of interactions, allowing for tailored customer experiences.
  • systemPrompt: Provides additional instructions or context for the AI, enhancing its ability to handle complex scenarios.
  • tone: Defines the emotional tone of the AI’s voice, ensuring it aligns with the campaign’s branding and audience expectations.
  • maxCallTimeout: Specifies the maximum duration for a call, helping manage time and resources effectively.
  • inactiveCallTimeout: Sets the timeout for inactive calls, ensuring efficient use of AI resources.
  • postCallAnalysis: Enables or disables post-call analysis, providing insights into call performance and outcomes.
  • postCallAnalysisSchema: Defines the structure for analyzing post-call data, allowing for detailed reporting and optimization.
  • totalCallTime, totalNumCall, totalSpent, averageCallCost: Track and report on campaign metrics, offering insights into performance and cost-effectiveness.
  • isFreeflow: Indicates whether the AI can deviate from the script, allowing for more natural and adaptive interactions.

These parameters collectively enable users to create highly customized and effective AI calling campaigns, with features for post-call analysis and cost tracking to optimize strategies.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Response

200
application/json
Successful Response

The response is of type any.