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

# Make your first API call

> Run an authenticated GraphQL request against staging and inspect the response.

With an access token in hand, you're ready to hit the API. Every call goes to a single GraphQL endpoint — the token decides whose account you're operating on.

## The endpoint

* **Staging:** `https://transactional-graph.staging.fluzapp.com/api/v1/graphql`
* **Live:** `https://transactional-graph.fluzapp.com/api/v1/graphql`

## Query the viewer

`viewer` returns whichever account the token is scoped to. It's a good smoke test that your token is valid.

```bash theme={null}
curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/graphql \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query { viewer { id email } }"
  }'
```

Expected response:

```json theme={null}
{
  "data": {
    "viewer": {
      "id": "usr_01H...",
      "email": "you@acme.com"
    }
  }
}
```

## Purchase a gift card in staging

Once your token carries `LIST_OFFERS` and `PURCHASE_GIFTCARD`, you can list offers and purchase one end-to-end:

```graphql theme={null}
mutation PurchaseGiftCard($offerId: ID!, $amount: MoneyInput!) {
  purchaseGiftCard(offerId: $offerId, amount: $amount) {
    id
    status
    giftCard { code pin }
  }
}
```

Variables:

```json theme={null}
{
  "offerId": "offer_test_amazon_us",
  "amount": { "currency": "USD", "amount": 2500 }
}
```

<Info>
  Fluz uses request de-duplication on money-moving mutations. See [Idempotency](/concepts/idempotency).
</Info>

## Where to next

<CardGroup cols={2}>
  <Card title="Explore capabilities" icon="layout-grid" href="/features">
    Cards, wallets, gift cards, and payouts.
  </Card>

  <Card title="Build for customers" icon="users" href="/build-a-platform">
    Connect customer accounts with OAuth.
  </Card>
</CardGroup>
