Overview
To buy a number with regulatory requirements:- Check requirements for the number you want to buy
- Create addresses for any
addressrequirement - Upload documents for any
documentrequirement - Purchase the number with its
type, passing every requirement asregulatoryRequirements - Wait for review: the number is yours immediately with
regulatoryStatus: pending_review, and can send messages and place calls once it isapproved - Assign it to a sender, before or after approval
regulatoryRequirements, as long as what is kept still covers that number’s requirements.
Checking Requirements
Before purchasing, check what requirements apply. PassphoneNumber with a number from GET /v1/phone-numbers/available to get the requirements for that exact number, which is what the purchase checks. Encode its + as %2B. countryCode and type give the requirements for a country instead:
items array means the number needs nothing: buy it normally. When the number’s own requirements cannot be resolved, the list for its country and type is returned instead, and the purchase checks the same list. If the requirements cannot be retrieved at all, the API answers 502 with code requirements_unavailable instead of an empty list: retry rather than purchasing without them. For US and Canadian numbers a purchase does not wait on this lookup: they are sold as numbers without requirements.
The SDKs below take countryCode and type; they have no per-number variant yet:
Requirement Types
Response
phoneNumber request, id is that phone number. For a country request it identifies the requirement group. acceptanceCriteria, when present, carries allowedValues on a phoneNumber request, and minLength, maxLength and allowedValues on a country request.
Creating Addresses
If an address requirement exists, create an address first:Address Fields
Address Status
A new address is returned withstatus: pending and stays that way. You can use its id in a purchase right away, in the same project it was created in. Review happens on the purchase, not on the address: follow it with the number’s regulatoryStatus. An address marked rejected is refused in a purchase.
Uploading Documents
If a document requirement exists, upload the required document:Supported Document Types
File Requirements
The API does not check the file’s format or size; the dashboard uploader accepts the following, so stay within it:- Formats: JPEG, PNG, or PDF
- Max size: 10MB
- Quality: Clear, readable scan or photo
- Validity: Document must not be expired
Document Status
A new document is returned withstatus: uploaded and stays that way. You can use its id in a purchase right away, in the project it was uploaded to. Review happens on the purchase, not on the document: follow it with the number’s regulatoryStatus. A document marked rejected is refused in a purchase.
Purchasing with Requirements
Pass one entry per requirement exceptaction ones: requirementType is the requirementTypes[].id from the requirements response, and fieldValue is the address id, the document id, or the text. type is required alongside, the type you searched the number under.
Every required id must be present, once, no unknown id may be sent, and addresses and documents must belong to the project making the purchase and must not be rejected. Otherwise the purchase is refused with 400 invalid_request, naming the requirement, before anything is charged. The same happens if an address or document cannot be registered for review.
cURL
regulatoryRequirements and type are new on this endpoint and not yet in the SDKs. Use the REST call above until the SDKs are updated.GET /v1/phone-numbers/{phoneNumberId} until regulatoryStatus is approved or rejected.
Assigning a Sender
Assign the number to a sender to use it, before or after approval:cURL
pending_review, the number is recorded on the sender and connected when it is approved; if that connection fails it is retried until it succeeds. A sender created over the API is set up for SMS as part of the assignment. A rejected number cannot be assigned: the call answers 400. A number that stays pending_review for long may be waiting on information the API cannot supply: contact support.
Reusing Submitted Information
If the number needs regulatory information and the request carries none, the purchase reuses what your project submitted before for the same country and type, but only when it still covers every requirement of the new number and every address and document in it belongs to the project. Otherwise it is refused with400 regulatory_compliance_required, listing the missing requirements in details.missingRequirements, and nothing is charged.
Managing Addresses
List Addresses
Delete Address
Managing Documents
List Documents
Delete Document
Country-Specific Requirements
Requirements differ by country and number type, and change with regulation. The requirements endpoint is the source of truth: query it for the number you are about to buy rather than relying on a fixed list.Best Practices
Prepare Documents First
Create addresses and upload documents before the purchase call, so it carries every requirement.
Follow the Review
A regulated number is billed from purchase but usable only once
regulatoryStatus is approved.Keep Documents Current
Ensure documents are not expired and information is up to date.
Check Requirements Early
Query requirements during your planning phase to avoid purchase delays.
Error Handling
Next Steps
Purchase Phone Numbers
Learn about the full purchase process
Create Senders
Set up senders to start messaging
