# Integration

**API Integration** connects your systems to Enable3 using server-to-server calls — sending user events, syncing segments and revenue, and optionally rendering loyalty UI in your own application. Enable3 supports three integration paths depending on your product architecture and team capabilities.

### Components diagram <a href="#components-diagram" id="components-diagram"></a>

<figure><img src="/files/LehFBabosLhg7KR3Is0a" alt=""><figcaption></figcaption></figure>

### When to Use Each Integration Method

#### Case #1: You want to launch quickly with minimal development effort

**Problem**: You need a working loyalty experience fast, but your team's engineering bandwidth is limited.

**Solution**: Use the Hosted Widget.

**How it works:** Enable3 renders the full loyalty UI on its side. Your backend issues a user token; the widget handles display, interactions, and reward flows without requiring custom front-end development.

**How to do it**: Configure the API key in the Enable3 Admin Dashboard and initialize the Hosted Widget with a user token. No custom UI development is required.

**Outcome**: A fully functional loyalty experience goes live in hours, not weeks. Your engineering team stays focused on core product work.

#### Case #2: You want to embed loyalty inside your native mobile app

**Problem**: You have an existing mobile app and need loyalty to feel like a native feature, not a separately hosted page.

**Solution**: Use the Mobile SDK / User Token integration.

**How it works**: Your app renders loyalty UI components directly using a user token to authenticate and retrieve data from Enable3. Enable3 handles logic and state; your UI handles presentation.

**How to do it**: Generate a user token from your backend using the Enable3 API, pass it to your mobile client, and use it to initialize the SDK or fetch loyalty data for rendering in your own interface.

**Outcome**: Users experience loyalty as a seamless part of your product. You control the look, feel, and placement of every loyalty element.

#### Case #3: You want full control over the loyalty experience and backend logic

**Problem**: Your product requires a deeply custom loyalty UI, non-standard event logic, or tight integration with your own data infrastructure.

**Solution**: Use Direct API Integration.

**How it works**: Your backend sends product events to Enable3 when users perform relevant actions. Enable3 processes those events, advances missions, evaluates rewards, and returns loyalty state via API endpoints. You render everything in your own UI.

**How to do it**: Configure the API key and IP allowlist in the Admin Dashboard. Send events from your backend, then use the missions, rewards, claim, redeem, and balance endpoints to build your custom loyalty interface.

**Outcome**: You get the full power of Enable3's loyalty engine with no UI constraints. Every pixel of the loyalty experience belongs to your product.

#### 🎯 API Integration benefits

* Backend-to-backend event delivery → Responsive loyalty experience at scale
* IP allowlisting and server-side API keys → Enterprise-grade security
* Three integration paths → Scalable architecture
* Direct access to missions, rewards, segments, and revenue endpoints → Custom-fit loyalty

### How to Set Up API Integration

The integration endpoint is: `https://integration.enable3.io`

{% hint style="warning" %}
If an endpoint description does not list a response body, the endpoint returns only the HTTP status code.
{% endhint %}

#### Go to the Admin Dashboard and open Integration Settings.

<figure><img src="/files/NwxVDgUdHscUjxzTmNyN" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
All API-key endpoints must be called from **your backend only**. Do not call them from frontend JavaScript, mobile clients, or public SDK initialization.
{% endhint %}

#### Configure your API key in the Admin Dashboard.

This key must be included as the X-API-KEY header in every request.

<figure><img src="/files/nS4jvovLFLVGN0ZGtlmu" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**API Key Security**

The API key is a server-side secret. **Do not expose it in frontend JavaScript, mobile binaries, browser logs, analytics tools, or public repositories.** If the key is accidentally exposed, rotate it immediately in the Admin Dashboard.

Add the IP addresses of your backend servers to the IP Whitelist in the Admin Dashboard. Enable3 only accepts requests from whitelisted IP addresses.
{% endhint %}

### The common integration flow

1. Configure the API key and backend IP allowlist in the Admin Dashboard.
2. Create or resolve the user via a widget, token, or user endpoint.
3. Send product events when the user performs actions that should progress missions.
4. Optionally sync user segments from your system.
5. Optionally report revenue when revenue-based loyalty mechanics are active.
6. If building a custom UI, use the missions, rewards, claim, redeem, and balance endpoints.

#### User Identifiers

Most integration endpoints use `operatorUserId`, the user identifier from your own system. Enable3 stores and resolves this value within your admin account.

Recommended properties of `operatorUserId`:

1. Stable across sessions and devices.
2. Unique per user in the admin’s system.
3. Safe to send to Enable3.
4. Not an email address, phone number, raw wallet data, or other sensitive personal data unless explicitly required and approved in the integration design.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enable3.io/enable3/tech/integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
