REST API Documentation

Automate SMS verifications in Python, PHP, or cURL.

API Overview

All API requests require your unique api_key as a GET parameter. Responses are returned in standard JSON format.

Base Endpoint: https://otpmatrix.com/api/v1/
GET /api/v1/get_balance

Check your account balance and active credits.

PHP Example
<?php
$apiKey = "YOUR_API_KEY";
$url = "https://otpmatrix.com/api/v1/get_balance?api_key=" . $apiKey;

$response = file_get_contents($url);
$data = json_decode($response, true);

echo "Balance: $" . $data['balance'];
?>
GET /api/v1/get_number

Order a new phone number for a specific service and country code.

Parameters & Python Request
# Params: service (e.g. tg, wa, gm), country (e.g. in, us, id)
url = "https://otpmatrix.com/api/v1/get_number?api_key=YOUR_API_KEY&service=tg&country=in"

# JSON Response Example:
{
    "status": "success",
    "order_id": 884920,
    "phone": "+919876543210",
    "service": "tg",
    "cost": 0.18
}
GET /api/v1/get_otp

Poll for incoming SMS OTP code using your order_id.

Response format
# JSON Response Example:
{
    "status": "success",
    "order_id": 884920,
    "otp_code": "482910",
    "full_sms": "Your Telegram code is 482910"
}