API

Powerful & Simple REST API – DOSH COMMUNICATIONS

Powerful & Simple REST API

Integrate, Automate, and Deliver with Confidence.

Explore API

API Documentation

Access a full suite of messaging tools through our robust REST API

API Playground

Choose a command:

REQUEST RESPONSE
{
    "token": "YOUR_API_TOKEN",
    "status": "account"
}
{
    "balance": 673.28,
    "info": "CONNECTED_API"
}

Important Security Notice

Keep your token confidential at all times. Never share it or expose it in client-side code. Token compromise could lead to unauthorized account access.

Get Account Status

POST /api/v1/account
{
    "token": "YOUR_API_TOKEN",
    "status": "account"
}

Send SMS

POST /api/v1/sms
{
    "token": "YOUR_API_TOKEN",
    "send": "bulk",
    "to": "123456789",
    "sender_id": "SMS",
    "message_content": "Hi Hi! \n New Line",
    "unicode": false
}

Get Delivery Report (DLR)

POST /api/v1/dlr
{
    "token": "YOUR_API_TOKEN",
    "send": "dlr",
    "id": "1759619"
}

Submit HLR Job

POST /api/v1/hlr
{
    "token": "YOUR_API_TOKEN",
    "send": "hlr",
    "to": "12223334444,1555666777"
}

Get HLR Job Status & Results

POST /api/v1/hlr
{
    "token": "YOUR_API_TOKEN",
    "status": "hlr",
    "id": "551"
}

Get Available Test Networks

POST /api/v1/networks
{
    "send": "get_available_networks"
}

Create SMS Test

POST /api/v1/tests
{
    "token": "YOUR_API_TOKEN",
    "send": "create_test",
    "networks": [
        {
            "mccmnc": "334020"
        }
    ]
}

Get SMS Test Result

POST /api/v1/test_result
{
    "token": "YOUR_API_TOKEN",
    "status": "get_sms_test_result",
    "id": "150917489"
}

Get Coverage & Prices

POST /api/v1/prices
{
    "token": "YOUR_API_TOKEN",
    "send": "prices"
}

Get Route Options

POST /api/v1/route-options
{
    "token": "YOUR_API_TOKEN",
    "send": "getoptions"
}

Codebase Downloads

Python V9.0

import requests

# API endpoint
api_url = "https://api.ankarex.ltd"
api_token = "YOUR_API_TOKEN"

# Get account status
response = requests.post(
    f"{api_url}/v1/account",
    json={
        "token": api_token,
        "status": "account"
    }
)

print(response.json())

Node.js

const https = require('axios');

// API endpoint
const api_url = "https://api.ankarex.ltd";
const api_token = "YOUR_API_TOKEN";

// Get account status
const response = await axios.post(
    `${api_url}/v1/account`,
    {
        token: api_token,
        status: "account"
    }
);

console.log(response.data);

PHP

<?php
 $api_url = "https://api.ankarex.ltd";
 $api_token = "YOUR_API_TOKEN";

// Get account status
 $ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "token" => $api_token,
    "status" => "account"
]));
 $response = curl_exec($ch);
 $result = json_decode($response.json());
print_r($result);
?>
Dosh Communication is a registered trademark of PolisDirect Ltd. All rights reserved. PolisDirect Limited is a company registered in England and Wales (number 16825830)
Scroll naar boven