Numbers
Search, buy, and attach a phone number for a client. Buying is the normal number API with the client's user_id added.
Once a client is verified on a carrier, buying a number is not a separate reseller
endpoint. It is the ordinary number API with the client's user_id added. The number
lands on the client's account and its rental comes out of the client's balance, not
yours.
Search
GET /api/v1/phone_number/search?region=IN&carrier=carrier-1&user_id=CLIENT_IDSearch with the client's user_id, and read the carrier the results come from.
Buy
POST /api/v1/phone_number/purchase
{ "region": "IN", "carrier": "carrier-1", "phone_number": "+91...", "user_id": CLIENT_ID }Buy on the carrier the client verified on. Verification does not carry across carriers, so a client verified on one still has to verify on another before it can buy there.
The purchase checks the client's verification state and returns 409 kyc_incomplete when
it is not done yet. A client who completed verification in the dashboard instead passes
the same gate, so there is nothing to repeat.
Attach
Once the client has an agent, attach the number to it:
POST /api/v1/phone_number/attach
{ "phone_number_id": 321, "agent_id": 42, "user_id": CLIENT_ID }Release
POST /api/v1/phone_number/release
{ "phone_number_id": 321, "user_id": CLIENT_ID }Releasing a client's number returns it to the carrier. If you instead want to take the number back to yourself when you release the whole client, see Release a client.
The same flow, call by call with the money and reservation details, is in Buy a number over the API.
Verify a client
The identity and business checks a client passes before it can buy a number, carrier by carrier. Ask which step is next, run it, and follow the chain.
Reseller API
Run your clients from your own product: create them, set what they can do, fund them with credits, verify them, and buy them numbers.
