Replace a market's numbers
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 bycampaign_id— theidof an entry in the market'scompliance.campaigns. Required. So a campaign sent back for correction can change its area codes without being recreated. One you inherit from your organization is400; one out of service is409. 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. Nocampaign_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.
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 replaced
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 PATCH '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 }, { "area_code": "212", "quantity": 1 } ], "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" }}Add numbers to a market POST
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 by `campaign_id` — the `id` of an entry in the market's `compliance.campaigns` (`GET /v3/channels/sms/US/TEN_DLC`). Required: left out it is `400` naming your campaigns in service. One you inherit from your organization is `400`: its numbers are the organization's. One out of service — expired, deactivated or released — is `409`. 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. No `campaign_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`.
Add a WhatsApp account POST
Connects a WhatsApp Business Account shared with us through a Multi-Partner Solution to the calling sender profile. Send `x-profile-id` for the profile the account belongs to. **Two fields, because everything else is derived.** `waba_id` says which of your organization's shared accounts this is — you hold one per client, and nothing else can say which. `phone_number_id` names the account's number, which is what assigns it to the profile as the number it sends from. The solution the account arrived through, the client business portfolio that owns it, the access token and its expiry are all resolved from your organization. They are not accepted here: the first two are Meta's answer about provenance, and the token is minted per client business and rotates roughly every sixty days, so a value you sent would be stale before it was useful. `phone_number_id` is optional. Omit it to connect the account now and settle the number later — the channel reads as `ACTION_NEEDED` with `reason_code` `CHANNEL_007`, and the profile's WhatsApp messages fail until a number is named. They do not fall back to your organization's account. Call this endpoint again with `phone_number_id` to name one. The same resolution runs behind `channels.whatsapp` on `POST /v3/sender-profiles`, so connecting at create and connecting afterwards fill the same fields. Returns **the account**, not every channel you have — adding one cannot change a market or an RCS agent, and `GET /v3/channels` is the whole picture. Giving an account up is not self-service: ask support, because deregistering a number lands in your own Meta business.