Powerful & Simple REST API

Integrate, Automate, and Deliver with Confidence.

Access a full suite of messaging tools through our robust REST API. Send messages, check balances, verify numbers with HLR, and automate your entire testing workflow programmatically.

API Playground

REQUEST

																												
{
    "token": "YOUR_API_TOKEN",
    "status": "account"
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "bulk",
    "to": "123456789",
    "sender_id": "Ankarex",
    "message_content": "Hello from the API!",
    "unicode": false
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "dlr",
    "id": "1759619"
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "hlr",
    "to": "12223334444,15556667777"
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "status": "hlr",
    "id": 551
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "create_test",
    "networks": [
        { "mccmnc": "334020" }
    ]
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "status": "get_sms_test_result",
    "id": 150917489
}
																											
																												
{
    "send": "get_available_networks"
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "prices"
}
																											
																												
{
    "token": "YOUR_API_TOKEN",
    "send": "getoptions"
}
																											

RESPONSE

																												
{
    "balance": 673.28,
    "info": "CONNECTED_API"
}
																											
																												
{
    "info": "SENT",
    "campaign_id": 14311
}
																											
																												
{
    "status": 0,
    "array": [
        [
            1061824,
            "123456789",
            20241122141213,
            0,
            20241122141229,
            3
        ]
    ],
    "success": 1,
    "fail": 0
}
																											
																												
{
    "info": "HLR_JOB_SUBMITTED",
    "job_id": 551,
    "numbers_count": 2,
    "estimated_cost": 0.02
}
																											
																												
{
    "job_id": 551,
    "status": "Completed",
    "billed_amount": 0.01,
    "results":
{
        "success": true,
        "data": [
            { "msisdn": "+12223334444", ... }
        ]
    }
}
																											
																												
{
    "info": "Test created successfully.",
    "billed":
{
        "amount": "0.35",
        "new_balance": "416.45"
    },
    "api_response":
{
        "phoneNumbers": [
            { "id": 150917489, "messageId": "61352", ... }
        ]
    }
}
																											
																												
{
    "info": "Successfully retrieved test result.",
    "data":
{
        "testId": 150917303,
        "deliveredSender": "+19175762909",
        "deliveredText": "This is your code 28669",
        "receiptStatus": "POSITIVE",
        ...
    }
}
																											
																												
{
    "info": "Successfully retrieved available networks.",
    "data": [

{
            "mccmnc": "28967",
            "country": "Abkhazia",
            "isoAlpha2": "AB",
            "network": "Aquafon"
        },

{
            "mccmnc": "41250",
            "country": "Afghanistan",
            "isoAlpha2": "AF",
            "network": "Etisalat"
        }
    ]
}
																											
																												
{
    "data": [

{
            "name": "Spain",
            "prefix": "34",
            "price": 0.05,
            "type": "OPEN SID"
        },

{
            "name": "Chile",
            "prefix": "56",
            "price": 0.022,
            "type": "LLC"
        }
    ]
}
																											
																												
{
    "options":
{
        "FRANCE": [

{
                "option_id": "59e40e315331dcba6cb4dd149dd3d8d2",
                "name": "France Custom",
                "price": 0.05,
                "prefix": "33",
                "is_custom": true
            }
        ]
    }
}
																											
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

Retrieve account information including current balance and connection status.

																														

{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "status": "account"
}
																													
																														

{
    "balance": 673.28,
    "info": "CONNECTED_API"
}
																													
Send SMS
POST

Send SMS messages to one or multiple recipients.

Parameters:
  • send: Must be "bulk" for sending messages.
  • to: Recipient number(s) in international format (comma-separated for multiple).
  • sender_id: Sender ID (max 11 characters).
  • message_content: Message text (max 160 characters).
  • unicode: Boolean flag for Unicode support.
  • option: Optional - To Use Custom Route.
{
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "bulk",
    "to": "123456789",
    "sender_id": "SMS",
    "message_content": "Hi Hi! \n New Line",
    "unicode": false
}
																													
																														
{
    "info": "SENT",
    "campaign_id": 14311
}
																													
Get Delivery Report (DLR)
POST

Retrieve delivery status for a message campaign using the campaign_id.

Parameters:
  • send: Must be "dlr".
  • id: The campaign_id received when sending the SMS.
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "dlr",
    "id": "1759619"
}
																													
																														
{
    "status": 0,
    "array": [
        [
            1061824,
            "123456789",
            20241122141213,
            0,
            20241122141229,
            3
        ]
    ],
    "success": 1,
    "fail": 0,
    "deliverSuc": 1
}
																													
Submit HLR Job
POST

Submit a list of phone numbers for HLR (Home Location Register) verification. This creates a job that will be processed in the background.

Parameters:
  • send: Must be "hlr" to submit a job.
  • to: A comma-separated string of numbers in international format.
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "hlr",
    "to": "12223334444,15556667777"
}
																													
																														
{
    "info": "HLR_JOB_SUBMITTED",
    "job_id": 551,
    "numbers_count": 2,
    "estimated_cost": 0.02
}
																													
Get HLR Job Status & Results
POST

Retrieve the current status and detailed results for a previously submitted HLR job using the job_id.

Parameters:
  • status: Must be "hlr" to check job status.
  • id: The unique job_id from the submission step.
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "status": "hlr",
    "id": 551
}
																													
																														
{
    "job_id": 551,
    "status": "Completed",
    "billed_amount": 0.01,
    "current_balance": 99.99,
    "results":
{
        "success": true,
        "data": [

{
                "msisdn": "+12223334444",
                "mccmnc": "310410",
                "is_ported": false,
                "network_name": "AT&T Mobility",
                "country_code": "US"
            }
        ]
    }
}
																													
Ankarex Testing Tool API

The following endpoints allow you to integrate with our live number testing tool to verify SenderID, delivery quality, and ported number accuracy.

Get Available Test Networks
POST

Retrieve a list of all currently available networks for live testing. This endpoint is free and does not require an API token.

																														
{
    "send": "get_available_networks"
}
																													
																														
{
    "info": "Successfully retrieved available networks.",
    "data": [

{
            "mccmnc": "28967",
            "country": "Abkhazia",
            "isoAlpha2": "AB",
            "network": "Aquafon"
        },

{
            "mccmnc": "41250",
            "country": "Afghanistan",
            "isoAlpha2": "AF",
            "network": "Etisalat"
        }
    ]
}
																													
Create SMS Test
POST

Create one or more tests for specific networks. Each test will be billed at a rate of 0.35 from your account balance.

Parameters:
  • send: Must be "create_test".
  • networks: An array of network objects, each requiring an mccmnc.
  • callbackUrl: (Optional) Your endpoint to receive test results automatically.
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "create_test",
    "networks": [

{
            "mccmnc": "334020"
        }
    ]
}
																													
																														
{
    "info": "Test created successfully.",
    "billed":
{
        "amount": "0.35",
        "new_balance": "416.45"
    },
    "api_response":
{
        "phoneNumbers": [

{
                "id": 150917489,
                "messageId": "61352",
                "msisdn": "525576326286"
            }
        ]
    }
}
																													
Important Advice

Always include the messageId in the SMS body so our system can correlate replies correctly. For example: 61352 Hi, this is my message

Get SMS Test Result
POST

Retrieve the result of a specific SMS test using the id obtained from the test creation step.

Parameters:
  • status: Must be "get_sms_test_result".
  • id: The unique id of the test received from the creation step.
																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "status": "get_sms_test_result",
    "id": 150917489
}
																													
																														
{
    "info": "Successfully retrieved test result.",
    "data":
{
        "testId": 150917303,
        "createdOn": "2025-06-18T02:36:55.000+0000",
        "mccMnc": "334020",
        "deliveredSender": "+19175762909",
        "deliveredText": "Hola que tal amigo 28669",
        "messageId": "28669",
        "receiptStatus": "POSITIVE"
    }
}
																													
Get Coverage & Prices
POST

Retrieve available routing and pricing that Ankarex offers.

																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "prices"
}
																													
																														
{
    "data": [

{
            "name": "Spain",
            "prefix": "34",
            "price": 0.05,
            "type": "OPEN SID"
        },

{
            "name": "Chile",
            "prefix": "56",
            "price": 0.022,
            "type": "LLC"
        }
    ]
}
																													
Get Route Options
POST

Retrieve available routing options for different countries for switching purposes.

																														
{
    "token": "YBCU-EMHR-WLDH-U6L8-LWNU-WW5A-7XJL-X2E7",
    "send": "getoptions"
}
																													
																														
{
    "options":
{
        "FRANCE": [

{
                "option_id": "59e40e315331dcba6cb4dd149dd3d8d2",
                "name": "France Custom",
                "price": 0.05,
                "prefix": "33",
                "is_custom": true
            }
        ]
    }
}
																													

Frequently Asked Questions

What is the maximum message length?
Standard SMS messages are limited to 160 characters. When Unicode is enabled (unicode: true), the limit is 130 characters per message segment.
How do I handle multiple recipients?
For multiple recipients, provide phone numbers in the "to" field separated by commas. Example: "34123456789,34987654321". The system automatically splits campaigns into batches of 500 numbers.
What are the Sender ID requirements?
Sender IDs must be:
  • Maximum 11 characters long
  • Alphanumeric characters only
  • Pre-registered for some countries
  • Subject to carrier restrictions
How do I track message delivery?
Use the DLR endpoint with your campaign_id to track delivery status. Status codes:
  • success: Successfully delivered
  • fail: Delivery failed
  • sending: Message in transit
  • unsent: Not yet processed
How do custom routes work?
Custom routes are country-specific. When using a custom route:
  • Only numbers from the specified country are accepted
  • Other numbers are automatically removed
  • Include the option_id in your request to use a specific route