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

# Quickstart

> Issue a test pass, send it to a phone, and update it.

This guide uses a test key, so passes are signed with TapAce's demo certificate and you don't need Apple or Google credentials yet.

<Steps>
  <Step title="Create a test API key">
    In the [dashboard](https://app.tapace.lk), open **Developers → API keys**, choose **Test** and select **Create key**. Copy the key straight away: it starts with `tapace_test_` and is shown only once.
  </Step>

  <Step title="Design a template">
    Open **Templates → New** and design your pass. For every value that changes from holder to holder, such as a member name, set the field's **Value binding** to **Per-pass value**. Its **key** is the name you send in `fieldValues`.

    Copy the template ID from its page, then check which fields each pass needs:

    ```bash theme={null}
    curl https://api.tapace.lk/v1/templates/tmpl_Q4vN8xT2mLr7KpZs3Wd1 \
      -H "Authorization: Bearer $TAPACE_API_KEY"
    ```

    The response lists them in `requiredFields`, for example `["memberName"]`.
  </Step>

  <Step title="Issue a pass">
    ```bash theme={null}
    curl https://api.tapace.lk/v1/passes \
      -H "Authorization: Bearer $TAPACE_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "templateId": "tmpl_Q4vN8xT2mLr7KpZs3Wd1",
        "holderName": "Nimal Perera",
        "holderEmail": "nimal@example.com",
        "fieldValues": { "memberName": "Nimal Perera", "points": 120 }
      }'
    ```

    The response is the new pass. Keep its `id` so you can update it later.
  </Step>

  <Step title="Send it to the holder">
    The pass carries a `distributionUrl`, such as `https://pass.tapace.lk/6BkJLsso1xyB`. Open it on a phone, or send it to the holder by email or SMS. The page offers **Add to Apple Wallet** or **Save to Google Wallet**. See [Deliver passes](/guides/deliver-passes).
  </Step>

  <Step title="Update it">
    Change a value and TapAce pushes the update to every wallet that saved the pass:

    ```bash theme={null}
    curl -X PATCH https://api.tapace.lk/v1/passes/pass_7hGk2LmQ9xVt4RnB8cYe \
      -H "Authorization: Bearer $TAPACE_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{ "fieldValues": { "points": 150 }, "notificationMode": "notify" }'
    ```
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Go live" icon="bolt" href="/environments">
    Switch to a live key and your own certificates.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/webhooks">
    Find out when a holder adds or removes a pass.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.