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

# REST API

> Read and write Yuko data programmatically — customers, points, rewards, tiers, referrals, memberships.

<Note>
  **Where to find this:** API key generation — Shopify admin → Apps → Yuko Loyalty → Integrations → REST API.\
  **Reference:** [API Reference](/developer/api/introduction).
</Note>

## What you can do

The Yuko REST API exposes the same data the dashboard shows:

* List, retrieve and update customer points balances.
* Issue manual points credits / debits.
* List rewards, VIP tiers, earning rules and referrals.
* Read activity feeds and points transactions.

Full endpoint reference is in the **API Reference** tab — this page covers setup and best practices.

## When to use

* Custom storefronts (Hydrogen, headless).
* Server-side automations that need to read or write Yuko data.
* Migrating customers from another loyalty program.
* Building admin tools that show Yuko data alongside your other systems.

## Before you start

<Check>Yuko app is installed on your Shopify store — see [Install Yuko on Shopify](/installation-and-setup/install-on-shopify).</Check>
<Check>The Yuko **Theme App Embed** is enabled in your active theme.</Check>
<Check>Your loyalty program is enabled at **Shopify admin → Apps → Yuko Loyalty → Loyalty → Settings**.</Check>
<Check>Points label and currency are configured.</Check>

## Setup

<Steps>
  <Step title="Open REST API settings">
    Go to **Apps → Yuko Loyalty → Integrations → REST API**.
  </Step>

  <Step title="Generate an API key">
    Click **Generate key**, name it (e.g., *“Migration script”*), and copy the key.
  </Step>

  <Step title="Store the key securely">
    Treat it like a password — use environment variables, not source files.
  </Step>

  <Step title="Authenticate requests">
    Send the key as a Bearer token in the `Authorization` header. Details: [API → Authentication](/developer/api/authentication).
  </Step>
</Steps>

## Authentication

All requests use Bearer token authentication. Full details: **[Authentication](/developer/api/authentication)**.

## Pagination, errors, rate limits

* **Pagination:** [Classic Pagination](/developer/api/classic-pagination)
* **Errors:** [Errors](/developer/api/errors)
* **Rate limits:** [Rate Limits](/developer/api/rate-limits)

## Best practices

<Tip>**Rotate API keys quarterly** and immediately when a developer leaves.</Tip>
<Tip>**Use webhooks instead of polling** for real-time data — the REST API is for reads and on-demand writes.</Tip>
<Tip>**Tag every key with a name** so you can revoke a single integration without breaking others.</Tip>

## FAQs

<AccordionGroup>
  <Accordion title="Do I need a separate API key per integration?">
    Strongly recommended. It limits blast radius if one is leaked.
  </Accordion>

  <Accordion title="What's the rate limit?">
    See [Rate Limits](/developer/api/rate-limits) in the API Reference.
  </Accordion>

  <Accordion title="Can I revoke a key?">
    Yes — from **Integrations → REST API**, click the key and select **Revoke**. Revocation is immediate.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="REST API" icon="code" href="/integrations/rest-api">
    Read and write Yuko data programmatically.
  </Card>

  <Card title="Webhooks" icon="bolt" href="/integrations/webhooks">
    Receive real-time event notifications.
  </Card>

  <Card title="Shopify Flow" icon="shop" href="/integrations/shopify-flow">
    Trigger Shopify Flow workflows from Yuko events.
  </Card>

  <Card title="Klaviyo" icon="envelope" href="/integrations/klaviyo">
    Sync customers, points and tier data into Klaviyo.
  </Card>

  <Card title="Omnisend" icon="envelope" href="/integrations/omnisend">
    Sync loyalty data into Omnisend.
  </Card>

  <Card title="WhatsApp" icon="comments" href="/integrations/whatsapp">
    Send transactional loyalty messages via 7 supported WhatsApp Business API providers.
  </Card>

  <Card title="Retainful" icon="envelope-open-text" href="/integrations/retainful">
    Email marketing & abandoned cart recovery.
  </Card>

  <Card title="Facebook & Instagram" icon="facebook" href="/integrations/facebook-instagram">
    Social verification for like / follow campaigns.
  </Card>

  <Card title="Google Business" icon="google" href="/integrations/google-business">
    Google Business profile and reviews.
  </Card>

  <Card title="Custom Apps" icon="puzzle-piece" href="/integrations/custom-apps">
    OAuth or API-key based custom integrations.
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Book a Free Setup Call" icon="phone" href="https://cal.com/rameshelamathi/yuko-demo">
    Talk to our team for personalised setup help.

    **Time:** 30 minutes
  </Card>

  <Card title="Contact Support" icon="life-ring" href="https://yuko.so/support/">
    Visit our support hub for help articles, live chat and ticket submission.
  </Card>

  <Card title="Browse the Guides" icon="book" href="/getting-started/welcome">
    Documentation across loyalty, referrals, memberships and more.
  </Card>

  <Card title="Install Yuko" icon="shop" href="https://apps.shopify.com/yuko">
    Add Yuko to your Shopify store from the Shopify App Store.
  </Card>
</CardGroup>
