Update phone number
Update a phone number's name or sender assignment.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
phoneNumberIdstringrequired
Body
application/json
namestringCustom name for the phone number. Set to null to clear.
Limitsmax length 100senderIdstringSender ID to assign the phone number to. Set to null to unassign. A number under regulatory review is recorded now and connected to the sender when approved; a rejected number is refused.
Responses
200Phone number updated.
phoneNumberobjectrequired12 properties
idstringrequiredphoneNumberstringrequirednamestringOptional custom name for the phone number.
capabilitiesstring[]requiredstatusstringrequiredBilling state of an owned number, separate from
regulatoryStatus.pendingis legacy and is not written to numbers today. The SDKs carryactive,suspendedandpendingonly;releasingandreleasedare returned by the REST API until their next release.One ofactivesuspendedpendingreleasingreleasedsenderIdstringSender ID if the phone number is assigned to a sender.
pricingobjectrequired4 properties
monthlyPricenumberMonthly price in USD.
upfrontCostnumberOne-time purchase cost in cents.
monthlyCostnumberMonthly cost in cents.
isFreeNumberbooleanWhether this is a free number.
regulatoryStatusstringrequiredRegulatory review state. Numbers that need no review are
approvedimmediately. A number bought with regulatory information is owned and billed from purchase and startspending_review; it cannot send messages or place calls until this isapproved. The state is re-checked every 6 hours: pollGET /v1/phone-numbers/{phoneNumberId}to follow it.Assign it to a sender with
PATCH /v1/phone-numbers/{phoneNumberId}(senderId) before or after approval. A number assigned while under review is recorded and connected to that sender when it is approved; the connection is retried until it succeeds. A sender created over the API is set up for SMS as part of the assignment.rejectedmeans review refused the information: the number cannot be assigned to a sender. A number that stayspending_reviewmay be waiting on information the API cannot supply; contact support.One ofapprovedpending_reviewrejectednextRenewalDatestring<date-time>releaseAtstring<date-time>When the number goes back to the carrier, if it is on its way out. Absent otherwise.
- A paid plan ended. Without a paid plan a team keeps one number: the one chosen in the dashboard when cancelling, else the one the plan included, else the oldest it bought. That number is billed monthly from the balance and has no
releaseAtunless a renewal fails. Every other number keeps working, unbilled, until this date, 7 days after the plan ended. Numbers you brought yourself are never released. - A renewal could not be paid. The number is suspended and released at the end of a 7-day grace.
Paying, or returning to a paid plan, before this date keeps the number. A released number cannot be recovered.
- A paid plan ended. Without a paid plan a team keeps one number: the one chosen in the dashboard when cancelling, else the one the plan included, else the oldest it bought. That number is billed monthly from the balance and has no
createdAtstring<date-time>requiredupdatedAtstring<date-time>
400Invalid request, or the number was rejected in regulatory review and cannot be assigned to a sender.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Phone number or sender not found.
codestringrequiredmessagestringrequireddetailsobject
503The sender could not be set up for SMS right now. Nothing was assigned; retry.
codestringrequiredmessagestringrequireddetailsobject