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) |
API Key Verification
Verifies whether the provided API key is valid.
Endpoint:
GET https://portal.robocall.pk/api/user_verify?api_key=YOUR_API_KEY_HERE
Response Format:
✅ Successful Response (Valid API Key)
{
"status": 200,
"response": "API matched"
}
❌ Error Response (Invalid API Key)
{
"status": 401,
"response": "API Key not matched"
}
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 Status Definitions
Call Status | DTMF | Meaning |
---|---|---|
1 (Initiated) | null | Call has been initiated after being pushed from SIP (status 8); awaiting pickup. |
2 (Answered) | 1 | Customer picked up and pressed 1 (Confirmed order). |
2 | Customer picked up and pressed 2 (Cancelled order). | |
3 | Customer picked up and pressed 3 (Request for callback or other custom action). | |
null | Call was picked up but no input was provided (no confirmation or action). | |
3 (Congestion) | null | No answer due to network congestion (call failed before ringing). |
4 (Busy) | null | No answer due to line being busy (customer’s number was engaged). |
5 (No Answer) | null | The call kept ringing but was never picked up by the customer. |
6 (Hangup) | null | Call was disconnected prematurely, possibly by the telecom operator. |
8 (Pushed to SIP) | null | Call job was successfully pushed to SIP provider but call not yet initiated. |
🔁 Retry Logic: When Does the System Retry?
If a call is not answered, the system automatically performs up to 3 free retries for the following statuses:
-
Status 1 – Initiated
-
Status 3 – Congestion
-
Status 4 – Busy
-
Status 5 – No Answer
-
Status 6 – Hangup
-
Status 8 – Pushed to SIP (if not converted to status 1 within a set time)
⏱ Retry delays are configurable (e.g., 5 min, 10 min, 30 min) in the Call Settings Panel inside Portal
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
Our Custom App that integrates with Shopify, enabling robocalls for order statuses such as placed, fulfilled, or cancelled.
- Install the Shopify App:
WooCommerce Integration
Automate robocalls for new orders directly from your Woocommerce store. Manage calls for order verification, confirmations, or reminders.
- 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!