The Developer Hub

Welcome to the Developer Documentation Hub. You'll find comprehensive guides and documentation to help you start working with SMS,Voice, 2FA, VMN, SMPP and Outbound Dialing Documentation as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Check Outbound Call Status

What can you do with this API?

Using this API, you can check the status of the OBD calls that have been triggered from your account. To do so, follow the Base URL below:

API for Integration


https://obd.kaleyra.com/api/v1/?api_key=A025XXXXXXXXXXXXXXXXXXXXX&method=voice.status&format=xml&id=123456-1

Prerequisites

  • An active Voice account
  • API Key
  • OBD call ID
  • Phone number to check the status

API Parameters

Parameter
Description
Expected Value

method

Predefined method

voice.groupStatus

api_key

API key generated from your account

API key generated from your account

format

Output response format

Default text. Supports JSON, JSONP, XML and PHP.

id

Outbound call ID.

Numeric with symbols, unique Call ID, communicated while making outbound call API request.

mobile

Phone number.

Numeric

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

            	
            
            var request = require("request");

var options = { method: 'GET',
  url: 'https://obd.kaleyra.com/api/v1/',
  qs: 
   { method: 'voice.status',
     api_key: 'A025XXXXXXXXXXXXXXXXXXXXX',
     id: '123456-1',
     format: 'xml' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

            	
            
            OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml")
  .get()
  .build();

Response response = client.newCall(request).execute();

            	
            
            var client = new RestClient("https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
            
            	
            
            require 'uri'
require 'net/http'

url = URI("https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
            
            	
            
            import requests

url = "https://obd.kaleyra.com/api/v1/"

querystring = {"method":"voice.status","api_key":"A025XXXXXXXXXXXXXXXXXXXXX","id":"123456-1","format":"xml"}

response = requests.request("GET", url, params=querystring)

print(response.text)
            
            	
            
            var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml");

xhr.send(data);
            
            	
            
            curl --request GET \
  --url 'https://obd.kaleyra.com/api/v1/?method=voice.status&api_key=A025XXXXXXXXXXXXXXXXXXXXX&id=123456-1&format=xml'
            
            	
            
            {
  "status": "200",
  "data": {
      "0": {
          "id": "123456-1",
          "mobile": "99XXXXXXXX",
          "status": "COMPLETED",
          "senttime": "2017-08-17 12:09:16"
      }
  },
  "message": "OK"
}
           	 
            	
            
            <api>
<status>200</status>
<message>OK</message>
 <data>
 <voice>
<id>123456-1</id>
<mobile>99XXXXXXXX</mobile>
<status>COMPLETED</status>
<senttime>2017-08-17 12:09:16</senttime>
</voice>
</data>
</api>
            	
            
            	
            
            
            	Array
(
    [status] => 200,
    [data] => [
            [0] => [
                [id] => "123456-1",
                [mobile] => "99XXXXXXXX",
                [status] => "COMPLETED",
                [senttime] => "2017-08-17 12:09:16"
           ]
    ],
    [message] => "OK"
)
            	
            
            	
            

Example Error Response

<?xml version="1.0" encoding="UTF-8" ?>
<api>
    <status>A404</status>
    <message>Your api account got suspended</message>
</api>
a:2:{s:6:"status";s:4:"A416";s:7:"message";s:22:"Invalid Call ID/Mobile";}
{"status":"A416","message":"Invalid Call ID\/Mobile"}

Response Data

Status
Response

status

It indicates the success or failure of your request. 200 is success, others are failure

message

It indicates the success or failure message

data

All the response is wrapped inside data

id

Unique call ID, numeric with symbols

mobile

Recipient number

status

Call status code

senttime

Call sent time in YYYY-MM-DD HH:mm:SS format