AttachPhoneNumber

View as Markdown
Attach the phone number to the account. Note that phone numbers of some countries may require additional verification steps. Please note that when you purchase a phone number, we reserve the subscription fee and taxes for the upcoming month. Read more in the <a href='/docs/gettingstarted/billing'>Billing</a> page. Allowed roles: `Owner`, `Admin`, `Accountant`. **Example request:** Attach a US phone number to the account 1.

Authentication

AuthorizationBearer
Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token.

Query parameters

phone_countintegerOptional

Quantity of phone numbers you want to attach. Required unless phone_number is provided.

phone_numberlist of stringsOptional

The phone number. See the [GetNewPhoneNumbers] method. Required unless phone_count is provided.

country_codestringRequired
The country code
phone_category_namestringRequired

The phone category name. See the [GetPhoneNumberCategories] method

country_statestringOptional

The country state. See the [GetPhoneNumberCategories] and [GetPhoneNumberCountryStates] methods

phone_region_idintegerRequired

The phone region ID. See the [GetPhoneNumberRegions] method

regulation_address_idintegerOptional
The phone regulation address ID

Response

Successful response
resultinteger
Returns 1 if the request has been completed successfully
phone_numberslist of objects
The attached phone numbers
errorobject