Add numbers to a market
Adds numbers to a market you hold. They are added to what it already asks for, never replacing it — with one exception: a US TEN_DLC campaign opened without numbers asks for one number in any area code by default, and while it holds no number yet, the first numbers added replace that default. Once it holds one, they are added beside it.
Where they go
- SMS US
TEN_DLC: to one campaign of your own, named bycampaign_id— theidof an entry in the market'scompliance.campaigns(GET /v3/channels/sms/US/TEN_DLC). Required: left out it is400naming your campaigns in service. One you inherit from your organization is400: its numbers are the organization's. One out of service — expired, deactivated or released — is409. A campaign the carriers have not approved yet gets its numbers when they do; an approved one gets them now. With everything it asks for, a campaign holds at most 49 numbers, counting one for each sender profile inheriting it. LOCAL: to the market, claimed from inventory now; what inventory cannot cover stays pending. Nocampaign_id. A market holds at most 49 numbers.- Any other sender type takes no numbers:
400.
What to send
numbers — the list POST /v3/channels/sms takes, one entry per area code — and, on US TEN_DLC, campaign_id, required.
Until a number is assigned it reads as PROVISIONING in the market's numbers, with the area code it was asked for. Returns the market, in the shape GET /v3/channels/sms/{country}/{type} returns, with 202.
channel*stringThe channel: sms. Other channels are 501 until their numbers are available
country*stringISO 3166-1 alpha-2 country code, e.g. US
type*stringSender type: ten_dlc (or 10dlc) or local
Idempotency-Key?stringUnique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer.
^[a-zA-Z0-9_-]+$length <= 255x-profile-id?stringProfile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization.
uuidapplication/json- body
What adding to (AddMarketNumbersRequest) and replacing (ReplaceMarketNumbersRequest) a market's numbers share: the market in the path and, on SMS US TEN_DLC, the campaign they belong to.
sandbox?booleanSandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution
campaign_id?|The campaign to add the numbers to, as campaigns[].id reports it. Required on SMS US TEN_DLC, where every number belongs to a campaign; refused on a market without campaigns.
uuidnumbers*array<|null>The numbers, one entry per area code, e.g. [{"area_code": "415", "quantity": 2}, {"quantity": 1}]. quantity defaults to 1, and an entry without area_code means any area code. Required.
POST adds them to what the market or campaign already asks for; PATCH replaces that list with them, and has to cover every number already held, since none is ever released.
The numbers are recorded
application/json- response
Standard API response envelope for all v3 endpoints
success?booleanIndicates whether the request was successful
data?|nullThe response data (null if error)
error?|nullError details (null if successful)
meta?Metadata about the request and response
curl -X POST 'https://api.sent.dm/v3/channels/sms/US/TEN_DLC/numbers' \ -H 'Idempotency-Key: req_abc123_retry1' \ -H 'Content-Type: application/json' \ -d '{ "campaign_id": "8f14e45f-ceea-467f-a8f0-7c2a3d1b9e01", "numbers": [ { "area_code": "415", "quantity": 2 } ], "sandbox": false}'{ "success": true, "data": { "country": "string", "number_type": "string", "numbers": [ { "sender_value": "string", "area_code": "string", "status": "string", "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904" } ], "status": "PROVISIONING", "reason_code": "string", "reason": "string", "compliance": { "brand": { "property1": null, "property2": null }, "campaign": { "property1": null, "property2": null }, "campaigns": [ { "property1": null, "property2": null } ], "documents": [ { "key": "string", "file_name": "string", "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6" } ] } }, "error": { "code": "string", "message": "string", "details": { "property1": [ "string" ], "property2": [ "string" ] }, "doc_url": "string" }, "meta": { "request_id": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" }}List your numbers in a market GET
Every number you hold in one market (country and sender type): `ACTIVE` once it can send, `PROVISIONING` while it is still to be assigned (it then has no `sender_value` yet), `INACTIVE` once it could send and no longer can. US `TEN_DLC` numbers name their `campaign_id`, and `?campaign_id=` keeps one campaign's. A market you do not hold is `404`. Add numbers with `POST` on the same path.
Replace a market's numbers PATCH
Replaces the numbers a market you hold asks for — their area codes and counts — with the list you send. To add to them instead, use `POST` on this path. ## Whose numbers - **SMS US `TEN_DLC`**: **one campaign of your own**, named by `campaign_id` — the `id` of an entry in the market's `compliance.campaigns`. Required. So a campaign sent back for correction can change its area codes without being recreated. One you inherit from your organization is `400`; one out of service is `409`. With everything it asks for, a campaign holds at most 49 numbers, counting one for each sender profile inheriting it. - **`LOCAL`**: the market's own, claimed from inventory now; what inventory cannot cover stays pending. No `campaign_id`. - **Any other sender type** takes no numbers: `400`. ## What to send `numbers` — the list `POST /v3/channels/sms` takes, one entry per area code, an entry without `area_code` meaning any — and, on US `TEN_DLC`, `campaign_id`. **Numbers already assigned are kept.** Nothing is released here, so a list that no longer covers a number already held is `400`, naming how many it leaves out. Lowering a count nothing has filled yet is fine. Until a number is assigned it reads as `PROVISIONING` in the market's `numbers`, with the area code it was asked for. Returns **the market**, in the shape `GET /v3/channels/sms/{country}/{type}` returns.