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

# Kiflo REST API: Overview, Authentication, and URLs

> Explore Kiflo's resource-oriented REST API: base URL, authentication, when to use the API versus the JS SDK, and links to the full reference.

The Kiflo REST API gives you programmatic control over your partner program data. It follows REST conventions with predictable, resource-oriented URLs, standard HTTP verbs, and JSON responses — so any HTTP client, backend language, or integration platform can talk to it without friction.

## Base URL

All API requests go to:

```text theme={null}
https://api.kiflo.com
```

For the interactive API reference with full endpoint documentation, request/response schemas, and live examples, visit **[https://docs-api.kiflo.com](https://docs-api.kiflo.com)**.

## Authentication

Every request must include an **API Access Token** in the `Authorization` header:

```bash theme={null}
Authorization: Bearer YOUR_API_ACCESS_TOKEN
```

Generate your token from **Account Settings → Integration** inside your Kiflo account. See the [Authentication guide](/developers/authentication) for step-by-step instructions, including how to revoke a token when it is no longer needed.

<Warning>
  Your API Access Token is shown only once at generation time. Copy it immediately — Kiflo does not store it, and you will need to generate a new one if you lose it.
</Warning>

## API vs. JS SDK — when to use each

Kiflo offers two integration surfaces. Choose based on where your code runs:

| Scenario                                                                                | Recommended approach                                                                                                                       |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Tracking referrals and creating customers/leads/partners from **your website**          | [Kiflo JS SDK](/developers/js-sdk/get-started) — automatically reads the browser referral cookie                                           |
| Creating customers, leads, or transactions from your **backend or server-side code**    | REST API — pass the `trackingCode` you read from the browser via the JS SDK's [`getTrackingCode`](/developers/js-sdk/tracking-code) method |
| Automating data sync, building custom dashboards, or integrating with third-party tools | REST API                                                                                                                                   |
| Triggering partner rewards from a payment provider like Stripe                          | REST API or native integrations                                                                                                            |

<Note>
  When you create a customer from your backend, use [`kiflo('getTrackingCode')`](/developers/js-sdk/tracking-code) in the browser to retrieve the referral cookie value, pass it to your server, and then include it in your API request so Kiflo can attribute the conversion to the correct partner.
</Note>

## Full API reference

The complete reference — including all endpoints, parameters, and example responses — is available at **[https://docs-api.kiflo.com](https://docs-api.kiflo.com)**.

<Tip>
  Use the interactive "Try it" panel in the API reference to test requests directly from your browser with your own Access Token.
</Tip>
