Welcome to the Robo Call Pakistan API Documentation, designed to help developers integrate our robocall services into their applications, websites, or e-commerce platforms. Our API provides a seamless solution for customer communication, including order verification, notifications, and more.
Base URL
All API endpoints are accessed via the following base URL:
https://portal.robocall.pk/api/v1/
Authentication
To access the API, include your VOICE API Key in the request header.
Header Requirements:
Key | Value |
---|---|
api_key |
Your unique API key (provided upon account setup) |
Endpoints
1. Send Robo Call
Initiates a robocall to a specified customer with provided data.
Endpoint:
GET https://portal.robocall.pk/api/calls
Query Parameters:
Parameter | Description | Required | Example |
---|---|---|---|
api_key |
Your unique API key (provided upon account setup) | Yes | abc123xyz |
caller_id |
Customer’s phone number | Yes | 923001234567 |
amount |
Order amount | Optional* | 1500 |
voice_id |
Voice ID configured for the call | Yes | 102 |
text1 |
Store name* compulsory only for default voice id 48,49 | Optional* | My Store |
text2 |
Order ID | Optional* | ORD12345 |
key1 to key5 |
Optional placeholders for additional texts | Optional* | 0 |
Sample Request:
https://portal.robocall.pk/api/calls?api_key=abc123xyz&caller_id=923001234567&amount=1500&voice_id=102&key1=0&key2=0&text1=My Store&text2=ORD12345&text3=0&text4=0&text5=0
Sample Response:
code{
"status": "200",
"message": "Call Data inserted successfully",
"data": {
"call_id": "dynamicgenerated_number",
"call_to": "923001234567",
"amount": "1500",
"voice_id": "102"
},
"api_response": "Ok 200"
}
2. Get Call Status
Fetches the status of a previously initiated robocall using its unique Call ID.
Endpoint:
GET https://portal.robocall.pk/api/get_call
Query Parameters:
Parameter | Description | Required | Example |
---|---|---|---|
api_key |
Your API Key | Yes | abc123xyz |
call_id |
Unique Call ID | Yes | 20076 |
Sample Request:
https://portal.robocall.pk/api/get_call?api_key=abc123xyz&call_id=20076
Sample Response:
code{
"data": {
"call_id": 20076,
"call_to": "923001234567",
"call_status": 2,
"dtmf": 1,
"retry": 1,
"amount": "1500",
"voice_id": "102",
"text1": "My Store",
"text2": "ORD12345",
"call_charges": "6.90",
"created_at": 1729323834,
"updated_at": 1729323834
},
"code": "200",
"response": "Code Executed Successfully"
}
Status Definitions:
Field | Description |
---|---|
call_status |
Status of the call |
dtmf |
Number pressed during the call |
retry |
Number of call retries (1, 2, or 3) |
amount |
The order amount associated with the call |
voice_id |
The Voice ID used for the robocall |
text1 |
Store name |
text2 |
Order ID |
call_charges |
Charges for the robocall |
Robo Call Status Mapping:
Call Status | DTMF | Meaning |
---|---|---|
2 (Call Answered) | 1 | Customer confirmed |
2 (Call Answered) | 2 | Customer cancelled |
2 (Call Answered) | 3 | Customer requested a callback |
2 (Call Answered) | null | No Input (Call Picked but No Input) |
3 (Congestion) | null | No Answer (Network error, call not connected) |
4 (Busy) | null | No Answer (Line busy, call cut off) |
5 (No Answer) | null | Call kept ringing but was never picked up |
Detailed Logic:
- Call Status = 2 (Call Answered):
- DTMF = 1: Customer confirmed the order.
- DTMF = 2: Customer canceled the order.
- DTMF = 3: Customer requested a callback.
- DTMF = null: Call was picked up but no input was provided (no confirmation, cancellation, or callback request).
Retry Logic if Call is not Answered System do 3 free retries:
- Call Status = 3 (Congestion):
- DTMF = null: No answer due to network congestion (call was not picked up due to network error).
- Call Status = 4 (Busy):
- DTMF = null: No answer due to the line being busy (call was cut off as the line was busy).
- Call Status = 5 (No Answer):
- DTMF = null: The call kept ringing but was never picked up by the customer (no response after multiple rings).
Error Codes
Code | Description |
---|---|
400 | Bad Request – Invalid Parameters |
401 | Unauthorized – Invalid API Key |
404 | Not Found – Invalid Call ID |
500 | Internal Server Error |
SDKs for Robo Call Pakistan API
This updated SDK will help developers integrate the Robo Call Pakistan API quickly into their projects.
import requests
class RoboCallAPI:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://portal.robocall.pk/api/v1"
def send_call(self, caller_id, voice_id, **kwargs):
params = {"api_key": self.api_key, "caller_id": caller_id, "voice_id": voice_id, **kwargs}
response = requests.get(f"{self.base_url}/calls", params=params)
return response.json()
def get_call_status(self, call_id):
params = {"api_key": self.api_key, "call_id": call_id}
response = requests.get(f"{self.base_url}/get_call", params=params)
return response.json()
class RoboCallAPI {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = "https://portal.robocall.pk/api/v1";
}
async sendCall(callerId, voiceId, options = {}) {
const params = new URLSearchParams({ api_key: this.apiKey, caller_id: callerId, voice_id: voiceId, ...options });
const response = await fetch(`${this.baseUrl}/calls?${params}`);
return await response.json();
}
async getCallStatus(callId) {
const response = await fetch(`${this.baseUrl}/get_call?api_key=${this.apiKey}&call_id=${callId}`);
return await response.json();
}
}
class RoboCallAPI {
private $apiKey;
private $baseUrl = "https://portal.robocall.pk/api/v1";
public function __construct($apiKey) {
$this->apiKey = $apiKey;
}
public function sendCall($callerId, $voiceId, $options = []) {
$params = array_merge(["api_key" => $this->apiKey, "caller_id" => $callerId, "voice_id" => $voiceId], $options);
$url = $this->baseUrl . "/calls?" . http_build_query($params);
return json_decode(file_get_contents($url), true);
}
public function getCallStatus($callId) {
$url = $this->baseUrl . "/get_call?api_key=" . $this->apiKey . "&call_id=" . $callId;
return json_decode(file_get_contents($url), true);
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
public class RoboCallAPI {
private readonly string _apiKey;
private readonly string _baseUrl = "https://portal.robocall.pk/api/v1";
public RoboCallAPI(string apiKey) {
_apiKey = apiKey;
}
public async Task<string> SendCall(string callerId, int voiceId, string additionalParams = "") {
using HttpClient client = new HttpClient();
string url = $"{_baseUrl}/calls?api_key={_apiKey}&caller_id={callerId}&voice_id={voiceId}&{additionalParams}";
return await client.GetStringAsync(url);
}
public async Task<string> GetCallStatus(int callId) {
using HttpClient client = new HttpClient();
string url = $"{_baseUrl}/get_call?api_key={_apiKey}&call_id={callId}";
return await client.GetStringAsync(url);
}
}
E-Commerce Integrations
Robo Call Pakistan provides ready-to-use integrations for popular platforms:
Shopify Integration
Automate robocalls for new orders directly from your Shopify store. Manage calls for order verification, confirmations, or reminders.
- Install the Shopify App:
WooCommerce Integration
A custom WordPress plugin that integrates with WooCommerce, enabling robocalls for order statuses such as placed, fulfilled, or cancelled.
- Download WooCommerce Plugin:
Support
For further assistance, contact our support team at:
- Email: [email protected]
- Phone: +92 332 7472277
With this updated documentation, you can now fully integrate and monitor robocall statuses, including retries and customer interactions. If you have any questions or need further support, feel free to reach out to our team!