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

# Authentication

> Two-layer auth — your API key + a per-customer token

## Overview

Wilow uses two layers of authentication:

| Layer              | What it identifies       | How to pass it                         |
| ------------------ | ------------------------ | -------------------------------------- |
| **API Key**        | Your partner integration | `API-KEY: ep_...` header               |
| **Customer Token** | The logged-in customer   | `Authorization: Bearer {token}` header |

Your API key is fixed and scoped to your integration. The customer token is obtained per user and must be refreshed if the user re-links.

## Getting Your API Key

Reach out to [info@wilow.app](mailto:info@wilow.app) to get your `API-KEY` before you can start hitting the APIs.

## Getting a Customer Token

Call [Link Customer](/api-reference/customers#link-customer) with the user's details. The response returns an `auth_token` — store it and use it for all subsequent customer-scoped requests.

```json theme={null}
{
  "data": {
    "auth_token": "4055|5TJnGse60PlKk8PSmxHXz3HjgbaDAMvv5Z5mrGSF...",
    "customer_id": 961
  }
}
```

## Which endpoints need which?

| Endpoint            | API Key | Customer Token |
| ------------------- | ------- | -------------- |
| Link Customer       | ✅       | ❌              |
| Location Coverage   | ✅       | ❌              |
| List Plans          | ✅       | ❌              |
| Available Days      | ✅       | ❌              |
| Address             | ❌       | ✅              |
| Laundry Preferences | ❌       | ✅              |
| Subscribe           | ❌       | ✅              |
| Confirm Payment     | ❌       | ✅              |

## Idempotency

All `POST` requests require an `Idempotency-Key` header. Use a unique UUID per request to safely retry without duplicating operations.

```
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
```
