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

# Introduction

> Read your referral program's data from your own server with the ReferRush API.

The ReferRush API lets you look up your customers' referral details from your own server, for example to show a customer their referral code in your app or support tool.

## Base URL

Every request goes to this base URL over HTTPS:

```
https://asia-south1-refero1.cloudfunctions.net
```

## Authentication

Authenticate each request with an API key in the `Authorization` header:

```
Authorization: Bearer rr_xxxxxxxxx
```

Create a key in your ReferRush dashboard under **Settings → API Keys**. The full key is shown only once, when you create it, so copy it somewhere safe right away. A key only returns data for the store it was created in.

> [!WARNING]
>
> Keep your API keys secret. Call the API only from your server, never from a browser or a mobile app, and revoke a key from the dashboard right away if it leaks.

You can have up to 3 active keys at a time. Revoked keys stop working immediately, and every key is revoked when the ReferRush app is uninstalled from your store.

## Response format

Every response is JSON with the same three fields:

```json theme={null}
{
  "success": true,
  "message": "Customer fetched successfully",
  "data": { }
}
```

When a request fails, `success` is `false`, `message` says what went wrong and `data` is `null`. See [Errors](https://docs.referrush.com/api-reference/errors.md) for every status code.

## Rate limit

Each API key can make up to **60 requests a minute**. Beyond that the API responds with `429` and a `Retry-After` header that gives the number of seconds to wait.

## Endpoints

> [card] [Get customer](https://docs.referrush.com/api-reference/customers/get-customer.md)
>
> Get one customer's referral code and referral totals by phone number or email.


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