> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rushly.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate requests with your store's API key

Every request to `POST /orders/create` is authenticated as a specific store using an API key, sent as a standard bearer token:

```
Authorization: Bearer rk_your_api_key
```

Your key is tied to your `retailer_id`, which you'll also need — it identifies your store on every order you create.

<Warning>
  Your API key can create real, billable deliveries on your account. Keep it
  server-side only — never ship it in client-side JavaScript, a mobile app
  bundle, or a public repo. If a key is ever exposed, ask us to rotate it
  immediately.
</Warning>

## Getting a key

There's no self-serve signup yet, so getting set up is a short manual step:

<Steps>
  <Step title="Apply">
    Submit your store at [rushly.us/retailer/signup](https://rushly.us/retailer/signup).
  </Step>

  <Step title="Get approved">
    The Rushly team reviews your application — usually same day.
  </Step>

  <Step title="Receive your key and retailer_id">
    Once approved, we'll send you your `retailer_id` and API key directly.
    Reach out at [support@rushly.us](mailto:support@rushly.us) if you need a
    key reissued or rotated.
  </Step>
</Steps>

## Testing your key

A quick way to confirm your key works — this fails fast with a 401 if it's wrong, without creating anything:

```bash theme={null}
curl -X POST https://rushly-backend-660939316816.us-west2.run.app/orders/create \
  -H "Authorization: Bearer rk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"retailer_id": "your-retailer-id"}'
```

A `401 Unauthorized` here means either the key or `retailer_id` is wrong (or they don't match each other) — see [Authentication errors](/api-reference/create-order#authentication-errors) for the full picture. Any other response means auth succeeded and you've hit request validation instead, which is expected with this minimal test body.
