Authorization header:customerSuccess permission. Missing, invalid, expired, or under-permissioned keys currently return HTTP 401.page is 1-based and defaults to 1.limit defaults to 100 and cannot exceed 500.from and to are optional ISO 8601 date-times. They filter by the client's community membership join timestamp, inclusively.client_id.data.pagination until page reaches totalPages. An empty result is successful and returns HTTP 200 with data.data: [].| Field | Meaning |
|---|---|
client_id | Returning.AI platform client ID. |
email | Client email when available. Treat as personal data. |
current_xp_balance | Current XP balance. |
current_coin_balance | Current loyalty coin balance. |
lifetime_coins_redeemed | Lifetime number of coins redeemed through the Returning.AI store. |
roles | Community role titles currently resolved for the client. |
login_count | Count of recorded daily loyalty visits. |
first_loyalty_login | Community membership join timestamp used by from and to; may be null. |
last_loyalty_login | Most recent recorded application login timestamp; may be null. |
400: Fix invalid pagination or date-time query values. page must be at least 1; limit must be between 1 and 500.401: Check that the Bearer key is present, valid, active, scoped to the correct community, and has customerSuccess permission. Do not retry unchanged credentials repeatedly.429: The community request limit was exceeded. Inspect the RateLimit response header and retry after the indicated window resets.500: Retry with bounded backoff. If the error persists, contact Returning.AI support with the request time and non-sensitive request details.from and to filter the community membership join timestamp, not the last login or redemption date.from is later than to currently returns an empty successful result; validate the range in your client.curl --location 'https://api.returning.ai/v1/community-analytics/loyalty-overview?page=1&limit=100&from=2026-01-01T00%3A00%3A00.000Z&to=2026-01-31T23%3A59%3A59.999Z' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "Loyalty overview fetched successfully",
"data": {
"data": [
{
"client_id": "123456",
"email": "client@example.com",
"current_xp_balance": 2450.5,
"current_coin_balance": 380.25,
"lifetime_coins_redeemed": 1250,
"roles": [
"Client"
],
"login_count": 42,
"first_loyalty_login": "2026-01-05T08:30:00.000Z",
"last_loyalty_login": "2026-08-16T14:22:10.000Z"
}
],
"pagination": {
"total": 224,
"page": 1,
"limit": 100,
"totalPages": 3
}
}
}