---
title: "Order a number"
method: POST
path: "/numbers"
tags: ["Numbers"]
---

# Order a number

`POST /numbers`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/numbers`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `numbers:write`)

Orders a number for the project. The Idempotency-Key header is required: when your request times out, send it again with the same key and you receive the same number, never a second one. Before ordering we check the company details, the spending cap, the payment method, a verified phone with one payment confirmed with your bank (iDEAL or a card with 3D Secure; verification_required otherwise), and the prepaid balance; each has its own error. A national number needs a business: a personal account receives business_required, and a business may need its registration number checked against the business register (verification_required with missing kvk_check). A live number is deducted from the balance: the first month when you order it, then on the first of every month. A geographic number also needs the number_documents verification level (see verification in GET /project).

## Headers

- `Idempotency-Key` string, required

## Request body

- union: Send either phone_number or area, not both.
  - object
    - `phone_number` string, required: A number from GET /numbers/available, in E.164. With a test key: a test number from that same search.
    - `area` string: Instead of phone_number: we pick the first free number with this area code, as GET /numbers/available returns it.
  - object
    - `phone_number` string: A number from GET /numbers/available, in E.164. With a test key: a test number from that same search.
    - `area` string, required: Instead of phone_number: we pick the first free number with this area code, as GET /numbers/available returns it.

## Response `201`

The number was ordered. status is active (it works now) or pending (the registration is with the carrier).

- OrderedNumber: The number you ordered.
  - `id` string, uuid, required: The id of the number. Use it for the call plan.
  - `e164` string, required: The number in E.164, like +447700900123.
  - `type` string, required: national (non-geographic), geographic (with an area code), mobile or tollfree.
  - `status` string, required: pending (the registration is with the carrier, usually active within one business day), active or porting.
  - `created_at` string, date-time, required: When the number was added to the project.
  - `test` boolean, required: true for a test number (test mode), from the range +447700900000 to +447700900999. It can never be called for real.
  - `from_stock` boolean, required: Whether the number came from our stock. A number from stock works right away.

## Other responses

- `400`: Bad Request: idempotency_key_missing, idempotency_key_invalid, invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `402`: Payment Required: plan_limit_reached, payment_mandate_missing, billing_blocked, insufficient_balance.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required, phone_verification_required, number_limit_reached.
- `409`: Conflict: plan_limit_reached, idempotency_key_reused, idempotency_request_in_progress, number_unavailable, number_already_yours.
- `422`: Unprocessable Content: validation_failed, company_details_missing, business_required, spend_cap_missing, regulatory_documents_missing, no_numbers_available, test_number_limit_reached.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `502`: Bad Gateway: order_status_unknown, upstream_error.
- `503`: Service Unavailable: service_unavailable, telephony_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
