Make Call API
This endpoint allows you to make a call by providing the necessary details like name, phone number, and campaign ID.
Endpoint
POST https://www.toingg.com/api/v3/make_call
Headers
accept: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Request Body
{
"name": "string",
"phoneNumber": "string",
"campID": "string"
}
Example Code
Python
import requests
url = "https://www.toingg.com/api/v3/make_call"
payload = {
"name": "string",
"phoneNumber": "string",
"campID": "string"
}
headers = {
"accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript
const fetch = require('node-fetch');
const url = 'https://www.toingg.com/api/v3/make_call';
const payload = {
name: 'string',
phoneNumber: 'string',
campID: 'string'
};
const headers = {
'accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response | No links |
400 | Bad Request | No links |
422 | Validation Error | No links |
Response Details
200 - Successful Response
- Media type: application/json
- Example Value:
"string"
400 - Bad Request
- Response body:
{
"detail": "Invalid campaign id"
}
422 - Validation Error
- Media type: application/json
- Example Value:
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}