MCP is live.Set upAsk the community
OmniDimension
Phone numbers

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.

POST/phone_number/purchase
Body
4 fields
·

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"
}'
Example response
synthetic
{
  "success": false,
  "replayed": false,
  "order_id": 0,
  "phone_number": "string",
  "amount": 0,
  "new_balance": 0,
  "status": "completed"
}

Authorization

BearerAuth
headerAuthorizationBearer <token>

Bearer token authentication. Obtain your API key from the OmniDimension dashboard.

Header Parameters

Idempotency-Key?string

Your own unique key for this purchase, for example a fresh UUID. Strongly recommended: it is what makes a retry safe.

Request Body

application/json
region*string

Region the number belongs to.

Value in"IN""US"
phone_number*string

The number to buy, as returned by the search operation.

carrier*string

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.

user_id?integer

Reseller accounts only: the client to act on. Omit it to act on your own account.

Response body

application/json

Response Body

The number was purchased, or the same Idempotency-Key was replayed and the original order is returned.

application/json
success?boolean
replayed?boolean

Present only when this key was already used. The order was not charged again.

order_id?integer
phone_number?string
amount?number

Amount charged, in USD.

new_balance?number

The owning account's balance after the charge. Not present on a replay.

status?"completed"

Always completed on a successful purchase.

Value in"completed"

Was this page helpful?