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

# Quickstart

> Make your first authenticated LoyaltyDog API call in under five minutes.

This guide walks you from zero to a working API call against the LoyaltyDog REST API.

## Prerequisites

* A LoyaltyDog merchant account. [Contact us](https://loyalty.dog/contact-us) if you don't have one.
* An API token (bearer token) for that account.
* `curl` or any HTTP client.

## 1. Set your credentials

Export your token so the examples below pick it up:

```bash theme={null}
export LOYALTYDOG_API_TOKEN="your_token_here"
export LOYALTYDOG_API_URL="https://api.loyalty.dog/api/v2"
```

<Warning>
  Never commit tokens to source control. Use a secrets manager, environment variables, or your CI/CD provider's secret store.
</Warning>

## 2. Verify your token

List the loyalty programs your token has access to:

```bash theme={null}
curl -sS "$LOYALTYDOG_API_URL/loyalty/programs" \
  -H "Authorization: Bearer $LOYALTYDOG_API_TOKEN" \
  -H "Accept: application/json"
```

A successful call returns a JSON array of program objects scoped to your merchant.

## 3. Create your first customer

Most workflows start with a customer record. Create one in a program you own:

```bash theme={null}
curl -sS -X POST "$LOYALTYDOG_API_URL/customers" \
  -H "Authorization: Bearer $LOYALTYDOG_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "programId": "YOUR_PROGRAM_ID",
    "email": "ada@example.com",
    "firstName": "Ada",
    "lastName": "Lovelace"
  }'
```

The response includes the new `customerId`, which you'll use to issue points, gift cards, or wallet passes.

## 4. Explore the API

<CardGroup cols={2}>
  <Card title="Full API reference" icon="code" href="/api-reference">
    Every endpoint, request, and response.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Bearer tokens, app keys, and rotation.
  </Card>

  <Card title="MCP server" icon="robot" href="/mcp/overview">
    Query the same data from Claude, Cursor, or Windsurf.
  </Card>

  <Card title="Webhooks" icon="bell" href="/guides/webhooks">
    React to events in real time.
  </Card>
</CardGroup>

<Tip>
  Need help? Email [support@loyalty.dog](mailto:support@loyalty.dog).
</Tip>
