Add sender ID
Base URL:
POST: https://api.smsgatewayapi.com/v1/senderids
| Parameter | Input | Description | |
|---|---|---|---|
| client_id | API client ID | Login and go to 'Developer' - 'API & Webhooks' - 'API-credentials' to find the API keys | Required |
| client_secret | API client secret | Login and go to 'Developer' - 'API & Webhooks' - 'API-credentials' to find the API keys | Required |
| name | sender name | The number or name of the sender. A number can't be longer than 14 characters. A name can't be longer than 11 characters and can't contain special characters | Required |
| order | sort order | The sort order of the sender | Optional |
<?php //PHP - cURL $ch = curl_init(); $url = "https://api.smsgatewayapi.com/v1/senderids"; $client_id = "XXX"; // Your API client ID (required) $client_secret = "YYY"; // Your API client secret (required) $data = [ 'name' => "YourName" //Sender name (required)
]; curl_setopt($ch, CURLOPT_URL, "$url"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-Client-Id: $client_id", "X-Client-Secret: $client_secret", "Content-Type: application/json", ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); ?>
Example request:
{
"name": "YourName",
"order": "1"
}
Example success response:
{
"id": {id},
"public_id": "snd_c6dab1d038504ac910f1254f20383622",
"status": "added"
}
Accounts that require sender registration cannot add a sender directly: the sender must be registered and approved first.
In that case, add the following fields to your request: country (ISO code of the destination country, e.g. GB),
registration_country (ISO code of the country where your company is registered), companyname, companywebsite and
estvolume (estimated messages per month). Optional: examples (example message contents) and urls (urls used in your messages).
The response will then contain "status": "pending_approval".