Numbers

Purchase a phone number

Changed on

Starts a phone-number purchase. Poll the returned phone number for status updates.

post/numbers/phones

Request

  • Base URL
    https://api.mobilerun.ai
  • URL
    https://api.mobilerun.ai/numbers/phones
  • Auth
    HTTP bearer

Headers

idempotency-keystring

Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

Example:b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f

Request body

countrystring

Optional ISO 3166-1 alpha-2 country code from GET /numbers/phones/countries.

billingPreference'included' | 'included_only' | 'rent'

Use included capacity when available, require included capacity without paid fallback (included_only), or start a paid checkout (rent).

labelstring nullable

User-defined display label — NFC-normalized, up to 100 GRAPHEMES (not UTF-16 code units; an emoji/flag may span several). Display-only, never used for routing.

Example request

{
  "country": "de",
  "label": "Support line"
}

Response

Number purchase accepted — poll GET /numbers/phones/{id}

Changes

    • breaking

      removed the required property //// from the response with the status

    • breaking

      removed the required property //// from the response with the status

    • breaking

      removed the required property //// from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      deleted the header request parameter Idempotency-Key

    • warning

      removed the request property

    • info

      added the new optional header request parameter idempotency-key

    • info

      added the new optional request property

    • info

      added the new included_only enum value to the request property

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property //// to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added