Purchase a phone number
Buy a phone number from the OmniDimension number shop. The monthly rental comes out of your wallet and the number is added to your account, ready to attach to an agent.
A number can only be sold once, so this endpoint cannot double-sell, with or without a key. The
Idempotency-Key header is for recovering a lost response: send a fresh UUID with each
purchase, and if a request times out, retry with the same key to get your original order back with
replayed: true, or 409 in_progress while it is still running.
Some regions require the account to be identity verified first, and the check is per carrier. Pass
the carrier the search returned, so you
buy from the inventory you actually searched. Verification done in the dashboard counts: it is the
same gate either way.
The whole flow is in Buy a number over the API.
Region the number belongs to.
The number to buy, as returned by the search operation.
The carrier to buy from: pass the carrier the search response named, so you buy from the inventory you searched. Required where the region has more than one carrier; omitting it there returns 409 carrier_required.
Reseller accounts only: the client to act on. Omit it to act on your own account.
curl -X POST 'https://omnidim.io/api/v1/phone_number/purchase' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "region": "IN", "carrier": "carrier-1", "phone_number": "+918000000001" }'
{ "success": false, "replayed": false, "order_id": 0, "phone_number": "string", "amount": 0, "new_balance": 0, "status": "completed" }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
Idempotency-Key?stringYour own unique key for this purchase, for example a fresh UUID. Strongly recommended: it is what makes a retry safe.
application/jsonregion*stringRegion the number belongs to.
"IN""US"phone_number*stringThe number to buy, as returned by the search operation.
carrier*stringThe carrier to buy from: pass the carrier the search
response named, so you buy from the inventory you searched.
Required where the region has more than one carrier;
omitting it there returns 409 carrier_required.
user_id?integerReseller accounts only: the client to act on. Omit it to act on your own account.
Response body
application/jsonThe number was purchased, or the same Idempotency-Key
was replayed and the original order is returned.
application/jsonsuccess?booleanreplayed?booleanPresent only when this key was already used. The order was not charged again.
order_id?integerphone_number?stringamount?numberAmount charged, in USD.
new_balance?numberThe owning account's balance after the charge. Not present on a replay.
status?"completed"Always completed on a successful purchase.
"completed"Was this page helpful?
Search available phone numbers
Search the OmniDimension number shop for phone numbers available to buy in a region. Price and validity are flat per region, so every result shows the same monthly_rental_usd and validity_days, and that is the exact amount a purchase will charge.
Release a phone number
Give up a phone number and stop its rental, so it is not charged at the next renewal. Only a number currently allocated to the account can be released.
