Partner

Adds a phone number to one of your accounts. The number is billed on the account's subscription, which you pay: Allo draws on your prepaid credit first, then charges your card on file for the rest. When the account already pays for a number slot that no number uses, the new number takes that slot and nothing is charged (charged: false). Allo checks that a number is available before charging anything. Requires the PARTNER scope.

post/v2/api/partner/accounts/{id}/numbers

Request

  • Base URL
    https://api.withallo.com
  • URL
    https://api.withallo.com/v2/api/partner/accounts/{id}/numbers
  • Auth
    API key in header Authorization

Path parameters

idstring required

The account id returned by Create account (usr-*).

Headers

Idempotency-Keystring

Optional. 8 to 100 letters, digits, - or _, for example a UUID. Retrying with the same key does not charge you twice.

Request body

countrystring required

ISO country code.

prefixstring nullable

Optional. Digits the number should start with, after the country code, for example +337 or 7.

esimboolean nullable

Optional, default false. Set to true to get a French mobile number that can carry an eSIM, which you can then order with POST /v2/api/partner/accounts/{account_id}/esims. eSIM numbers are only available with country set to FR, otherwise the request fails with ESIM_NOT_AVAILABLE_IN_COUNTRY.

Example request

{
  "country": "FR",
  "prefix": "7",
  "esim": true
}

Response

Number added

Example response

{
  "data": {
    "phone_number": "+33745805222",
    "country": "FR",
    "charged": true
  }
}

Changes