Skip links

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 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

✅ Successful Response

{
  "status": 200,
  "response": "API matched"
}

❌ Error Response

{
  "status": 401,
  "response": "API Key not matched"
}

🔍 Check Balance – API Endpoint

Endpoint:

GET https://portal.robocall.pk/api/check_balance?api_key=[your_api_key]

📄 Description:

This endpoint allows you to fetch your current account balance, username, and per-call rate based on your API key.

🔑 Required Parameter:

Parameter Type Description
api_key string Your unique API key (required)

✅ Sample Successful Response:

{
  "status": 200,
  "data": {
    "balance": "2682.00",
    "username": "demo",
    "call_rate": "5.50"
  }
}

❌ Sample Error Response:

{
  "status": 422,
  "response": "API Key not matched"
}

📝 Notes:

  • Always use a valid api_key provided by Robo Call Pakistan to access the balance.

  • The call_rate is shown in per-call pulse units (e.g., per 30 seconds).


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 (required for voice ID 48,49) Optional* My Store
text2 Order ID Optional* ORD12345
key1 – 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%20Store&text2=ORD12345&text3=0&text4=0&text5=0

Sample Response:

{
  "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:

{
  "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"
}

📞 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/custom action).
  null Call was picked up but no input was provided.
3 (Congestion) null No answer due to network congestion.
4 (Busy) null Line was busy.
5 (No Answer) null Call kept ringing but was never picked up.
6 (Hangup) null Call disconnected prematurely.
8 (Pushed to SIP) null Call job pushed to SIP provider but not yet initiated.

🔁 Retry Logic

If a call is not answered, the system automatically performs up to 3 free retries for the following statuses:

  • 1 – Initiated

  • 3 – Congestion

  • 4 – Busy

  • 5 – No Answer

  • 6 – Hangup

  • 8 – Pushed to SIP (if not converted to status 1 within timeout)

⏱ Retry Delays

Retry delays are configurable (e.g., 5 min, 10 min, 30 min) in the Call Settings Panel inside the Portal.

🔄 Important:

Keep checking the get_call endpoint until the system:

  • Call is answered (status = 2), or

  • Retries are exhausted.

This will ensure that you retrieve the final status of the call against each call_id.


❗ 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 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-334-1117626


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!