MCP is live.Set upAsk on Discord
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.

POST/phone_number/purchase
Body
3 fields
·

Region the number belongs to.

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

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

curl -X POST 'https://backend.omnidim.io/api/v1/phone_number/purchase' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "region": "US",
  "phone_number": "+15551234567"
}'
Example response
synthetic
{
  "success": false,
  "replayed": false,
  "order_id": 0,
  "phone_number": "string",
  "amount": 0,
  "new_balance": 0,
  "status": "completed"
}

Authorization

BearerAuth
AuthorizationBearer <token>

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

In: header

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

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

Retrying safely

A phone number can only be sold once, so this endpoint cannot charge twice for the same number, with or without a key. The Idempotency-Key header is for recovering a lost response, not for preventing a double sale.

Send a fresh UUID with each purchase. If your request times out, retry with the same key and you get your original order back with replayed: true instead of guessing whether it went through, or 409 in_progress if it is still running.

Reusing a key from a different purchase returns that first order. It is not validated against your new request body, so use a fresh key each time.

Before you can buy

Some regions require the account to be identity-verified first. India is one, and the check is an Aadhaar eKYC, so it completes in minutes. Verification done in the dashboard counts: it is the same gate either way.

The whole flow, end to end, is in Buy a number over the API.