# Quickstart (https://163-123-236-68.sslip.io/docs/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.

<Steps>
  <Step>
    ### Create an account [#create-an-account]

    [Sign up](/signup) with an email address. Your account opens in the sandbox.
  </Step>

  <Step>
    ### Add test funds [#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.
  </Step>

  <Step>
    ### Create an API key [#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.

    ```bash
    export RHQ_API_KEY="rhq_test_..."
    ```
  </Step>

  <Step>
    ### See what a number costs [#see-what-a-number-costs]

    ```bash
    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.
  </Step>

  <Step>
    ### Create a customer [#create-a-customer]

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

    ```bash
    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.
  </Step>

  <Step>
    ### Order a number [#order-a-number]

    ```bash
    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.
  </Step>

  <Step>
    ### Read its messages [#read-its-messages]

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

    ```bash
    curl https://resellerhq.com/api/v1/numbers/NUMBER_ID/messages \
      -H "Authorization: Bearer $RHQ_API_KEY"
    ```
  </Step>
</Steps>

## Next [#next]

* Receive messages the moment they arrive with [webhooks](/docs/webhooks).
* Make every purchase safe to retry with an [Idempotency-Key](/docs/idempotency).
* When you are ready for real orders, read [Sandbox and live](/docs/sandbox-and-live).
