Quickstart

Create a sandbox key, add test funds, order a phone number and read its first message.

This takes about five minutes and costs nothing: it runs entirely in the sandbox.

Create an account

Sign up with an email address. Your account opens in the sandbox.

Add test funds

Open Wallet in the dashboard and choose Add funds. The Add test funds dialog opens with $100 chosen; submit it with Add $100.00. Test funds only exist in the sandbox and cannot be spent on anything real.

Create an API key

Open Developers and choose New key. A sandbox key starts with rhq_test_. It is shown once, so store it now.

export RHQ_API_KEY="rhq_test_..."

See what a number costs

curl "https://resellerhq.com/api/v1/numbers/offers?country=US" \
  -H "Authorization: Bearer $RHQ_API_KEY"

Amounts are integers in US cents, so 2399 is $23.99.

Create a customer

Every order is a sale to a customer, so create one first and keep its id:

curl -X POST https://resellerhq.com/api/v1/customers \
  -H "Authorization: Bearer $RHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"jo@northwind.example"}'

A reseller buying for itself rather than for a named customer still needs one: create a single customer for that and reuse its id on every such order.

Order a number

curl -X POST https://resellerhq.com/api/v1/numbers/orders \
  -H "Authorization: Bearer $RHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"US","duration":"30d","customerId":"CUSTOMER_ID"}'

The response is the order with its numbers. Check status: completed means the number is yours and the wallet was charged; failed means nothing was charged.

Read its messages

In the sandbox, open the number in the dashboard and choose Send a test SMS. Then:

curl https://resellerhq.com/api/v1/numbers/NUMBER_ID/messages \
  -H "Authorization: Bearer $RHQ_API_KEY"

Next