Sender Names
This content is not available in your language yet.
Every SMS you send goes out from a Sender Name, and each Sender Name must be approved before you can send with it. You can manage the whole lifecycle programmatically: request a new Sender Name, check its approval status, and cancel a request you no longer need.
There are two kinds of sender:
- Alphanumeric Sender Names (e.g.
AcmeCorp) — reviewed and approved by the divergent team, per country. - UK mobile numbers (e.g.
07700900123) — approved automatically once you prove ownership of the number via an SMS verification code.
Requesting a Sender Name
Section titled “Requesting a Sender Name” POST /sms/senders
Requests are idempotent: re-submitting a Sender Name you’ve already requested returns the existing senderNameId with created: false,
and any newly listed countries are added to the existing request.
curl -X POST https://connect-api.divergent.cloud/sms/senders \ -H "X-Api-Key: { API_KEY }" \ --json '{ "senderName": "AcmeCorp", "sampleContent": "Hi Jane, your order #1234 has shipped and will arrive tomorrow.", "countries": ["GBR", "IRL"] }'Request Data
Section titled “Request Data”Headers
JSON Data
Response Data
Section titled “Response Data”JSON Data
Responses
Section titled “Responses”The request was registered (or already existed). For UK mobile numbers, a verification code has been texted to the number.
400 Bad Request
Validation failed, or (for UK mobile numbers) you already have another number awaiting verification — finish or cancel that one first.
409 Conflict
UK mobile numbers only: this number was previously rejected. Contact support.
429 Too Many Requests
UK mobile numbers only: too many verification code requests. Try again later.
Verifying a UK Mobile Number
Section titled “Verifying a UK Mobile Number”When you request a UK mobile number as a sender, an 8-character verification code is texted to that number. Submit it here to prove ownership — the sender is approved immediately on success.
POST /sms/senders/verify
curl -X POST https://connect-api.divergent.cloud/sms/senders/verify \ -H "X-Api-Key: { API_KEY }" \ --json '{ "sender": "07700900123", "code": "{ CODE }" }'Request Data
Section titled “Request Data”Headers
JSON Data
Responses
Section titled “Responses”The number is verified and the sender is now approved.
400 Bad Request
Invalid sender or code. For security, an unknown sender and a wrong code are deliberately indistinguishable.
429 Too Many Requests
Too many failed attempts — the sender is temporarily locked out. Try again later.
Checking Sender Status
Section titled “Checking Sender Status” GET /sms/senders
Returns every sender in your Workspace — Sender Names alongside any virtual (inbound) numbers — with their approval state. There are no
query parameters; filter client-side. A sender awaiting review or verification appears with isApproved: false.
curl https://connect-api.divergent.cloud/sms/senders \ -H "X-Api-Key: { API_KEY }"Request Data
Section titled “Request Data”Headers
Response Data
Section titled “Response Data”JSON Data
Example Response
Section titled “Example Response”{ "senders": [ { "id": "1042", "name": "AcmeCorp", "isApproved": true, "requiresNumberVerification": false, "type": "SenderName", "countries": [ { "country": "GBR", "isApproved": true }, { "country": "IRL", "isApproved": false } ] }, { "id": "1043", "name": "07700900123", "isApproved": false, "requiresNumberVerification": true, "type": "SenderName", "countries": [ { "country": "GBR", "isApproved": false } ] } ]}Cancelling a Request
Section titled “Cancelling a Request”Cancel a Sender Name request that’s still pending. You can cancel the whole request, or just specific countries that haven’t been approved yet. Approved countries can’t be cancelled through the API — contact support instead.
DELETE /sms/senders/{id}
# Cancel the entire requestcurl -X DELETE https://connect-api.divergent.cloud/sms/senders/{ SENDER_NAME_ID } \ -H "X-Api-Key: { API_KEY }"
# Cancel only specific pending countriescurl -X DELETE "https://connect-api.divergent.cloud/sms/senders/{ SENDER_NAME_ID }?countries=IRL&countries=FRA" \ -H "X-Api-Key: { API_KEY }"Request Data
Section titled “Request Data”Headers
Query Parameters
Responses
Section titled “Responses”The request (or the specified countries) was cancelled.
400 Bad Request
A specified country isn’t part of the request or is already approved, or the sender has already been used to send messages.
404 Not Found
No Sender Name with that ID exists in your Workspace.
409 Conflict
The request was updated concurrently. Refresh and try again.