Returning.AIDevelopers
v1

API reference / Gamification / Streaks & Mini Games

.md

List user streak logs

List streak history entries for one trader or your whole community, newest first, one page at a time.

Last updated 26 Sep 2026API v1

Method
GET
Path
https://api.returning.ai/v1/streak-logs
Permission
getStreakLogs
Retries
Read-only; exact retries are safe

When to use this

  • A trader says their streak reset, and support needs to see when it happened and what they missed.
  • Copy streak activity into your CRM or data warehouse, one day at a time.
  • Find which traders completed or broke a streak on a given day.

Authentication#

Header
Authorization: Bearer <API_KEY>
Permission
getStreakLogsShown in the dashboard as “Get Streak Logs”

Use a Community API key with getStreakLogs, shown in the dashboard as Get Streak Logs, and keep it on your server. The key decides the community: you only see entries from your own community, and user only matches traders in it. Personal API keys are rejected with 401.

Behaviour#

This read changes nothing. Every action that counts toward one of your streaks adds an entry, even when the count doesn't move, so an active trader can have many entries a day. A reset is dated at the end of the period the trader missed, not when it was recorded. Admin and bulk edits show streak_activity 0 with the new count in total_streak; the unchanged filter doesn't return them, and no streak_action value selects them.

Filters combine, and every date and time is UTC. date[...] takes whole days as DD/MM/YYYY. time[...] compares the time of day on every date, so time[gte]=22:00&time[lte]=02:00 matches nothing. A date that doesn't exist, such as 31/02/2026, isn't rejected; it may be ignored or moved to a nearby day, so check dates before you send them. Brackets can be sent as they are or encoded as %5B and %5D; with curl, add --globoff or encode them.

Entries have no ID, and new ones push older ones down while you page. To copy history, page through one finished day at a time, sorted by date. A reset can be written some time after the period it closes, with that earlier date, so read a recent day again before you treat it as final.

Request#

Query parameters#

user#stringOPTIONAL
The trader's email or platform user ID. Only traders in your community match, and emails ignore case. Omit it, or send it empty, to list entries for every trader.

RuleEmail or platform user ID

Egtrader@example.com

streak_name#stringOPTIONAL
Only entries for streaks whose name contains this text, ignoring case. A name no streak contains returns an empty list. Keep to letters, digits and spaces: characters such as (, [ or * are read as a pattern and can match more than you expect.

RuleText

EgLogin

streak_action#stringOPTIONAL
Only entries caused by this action: Daily Visit, Total XP, Total Coins, Messages Sent, Replies Sent, Reactions Sent, Delete Message, Delete Reply, Removed Reaction, Timeframe Expired (streak resets), or the name of one of your custom user fields. Not case-sensitive.

RuleAction name

EgDaily Visit

streak_activity#stringOPTIONAL
Only entries with this change: increase (the count went up), decrease (it went down), unchanged (progress that didn't move the count) or streak broken (reset to 0).

Ruleincrease, decrease, unchanged or streak broken

Egstreak broken

date[gte]#stringOPTIONAL
Only entries on or after this day, in UTC.

RuleDD/MM/YYYY

Eg01/09/2026

date[lte]#stringOPTIONAL
Only entries on or before this day, in UTC. The whole day is included.

RuleDD/MM/YYYY

Eg30/09/2026

date[gt]#stringOPTIONAL
Only entries after this day, in UTC.

RuleDD/MM/YYYY

Eg31/08/2026

date[lt]#stringOPTIONAL
Only entries before this day, in UTC.

RuleDD/MM/YYYY

Eg01/10/2026

time[gte]#stringOPTIONAL
Only entries at or after this time of day, in UTC, on any date.

RuleHH:MM, 24-hour

Eg09:00

time[lte]#stringOPTIONAL
Only entries at or before this minute of the day, in UTC, on any date.

RuleHH:MM, 24-hour

Eg17:00

time[gt]#stringOPTIONAL
Only entries after this minute of the day, in UTC.

RuleHH:MM, 24-hour

Eg08:59

time[lt]#stringOPTIONAL
Only entries before this time of day, in UTC.

RuleHH:MM, 24-hour

Eg17:00

sortBy#stringOPTIONAL
What to sort by. date is the default. time sorts by time of day only, ignoring the date. streak_name groups entries by streak; it doesn't sort names alphabetically.

Ruledate, time, total_streak, streak_activity or streak_name

Egdate

sortOrder#stringOPTIONAL
Sort direction. desc, the default, puts the newest or highest first.

Ruledesc or asc

Egdesc

page#numberOPTIONAL
Page number, starting at 1.

RuleWhole number, 1 or more; default 1

Eg1

limit#numberOPTIONAL
Entries per page. Omit to use 100.

RuleDefault 100; max 100

Eg20

Headers#

Authorization#stringREQUIRED
Community API key with getStreakLogs.

RuleBearer <API_KEY>

curl --request GET \
  --url 'https://api.returning.ai/v1/streak-logs?user=trader@example.com&limit=20' \
  --header 'Authorization: Bearer <API_KEY>'

Response#

A 200 returns the page in data.data and the totals in data.pagination. The body has no message or code; branch on the HTTP status. An empty data.data for a trader in your community means nothing matched. Unlike Get mini-game and streak state, the user lookup here is limited to your community: an email or ID from outside it returns 404, never another community's history.

status#stringALWAYS
Result of the request.

Rulesuccess

data#objectALWAYS
The page of entries and the paging totals.
success#booleanALWAYS
true on every 200.
pagination#objectALWAYS
Paging totals for everything that matches your filters.
total#integer
Entries that match, across all pages.
currentPage#integer
The page you asked for.
totalPages#integer
Pages at this limit. 0 when nothing matches.
hasNextPage#boolean
true when a later page has entries.
hasPrevPage#boolean
true when page is above 1.
data#object[]ALWAYS
Entries on this page, newest first unless you set sortBy. Empty when nothing matches.
user#object
The trader the entry belongs to.
id#string
The trader's platform user ID, as a string.
email#string
The trader's email. Empty when the account can't be found.
streak_action#string
What caused the entry, such as Daily Visit, Sent Message: 3/5, Timeframe expired for a reset, Updated by Admin, or the name of a bulk update. Shows a short action key, such as messages, when no description was recorded.
action_details#string
More detail, such as Visited the community, the text of the message that counted, or Action not cleared: Daily Visit for a reset. Can hold the trader's own message text, so treat it as personal data. Empty when there is none.
streak_name#string
The streak's name as set up in your community, or Deleted Streak if the streak was removed.
streak_activity#number or string
How the count changed: 1 up, -1 down (a counted action was undone, such as a deleted message), 0 no change, or the string streak broken when the count reset to 0. Admin and bulk edits also show 0.
total_streak#integer
The trader's count for this streak after this entry.
date#string
Day of the entry in UTC, as DD/MM/YYYY.
time#string
Time of the entry in UTC, as HH:MM.
{
  "status": "success",
  "data": {
    "success": true,
    "pagination": {
      "total": 2,
      "currentPage": 1,
      "totalPages": 1,
      "hasNextPage": false,
      "hasPrevPage": false
    },
    "data": [
      {
        "user": {
          "id": "3247779",
          "email": "trader@example.com"
        },
        "streak_action": "Daily Visit",
        "action_details": "Visited the community",
        "streak_name": "Login Streak",
        "streak_activity": 1,
        "total_streak": 1,
        "date": "26/09/2026",
        "time": "08:30"
      },
      {
        "user": {
          "id": "3247779",
          "email": "trader@example.com"
        },
        "streak_action": "Timeframe expired",
        "action_details": "Action not cleared: Daily Visit",
        "streak_name": "Login Streak",
        "streak_activity": "streak broken",
        "total_streak": 0,
        "date": "26/09/2026",
        "time": "00:00"
      }
    ]
  }
}

Errors#

Errors on this endpoint have no machine-readable code; branch on the HTTP status. A key without getStreakLogs gets 401, not 403, with only a message. A validation 400 names the parameter in detail.

Fix the request02

400Fix the request
A query value is invalid: limit outside 1-100, page below 1, a date not in DD/MM/YYYY, a time not in HH:MM, or an unknown streak_activity, sortBy or sortOrder. detail names the parameter. An unrecognised streak_action also returns 400, with Invalid streak action: <value> in message and no detail.
401Fix the request
The key is missing, invalid or expired, it's a personal key, its community no longer exists, or it lacks getStreakLogs (message is then Your api key does not have permission to access this action). Send Authorization: Bearer <API_KEY> with a current Community API key, and add Get Streak Logs in Settings > Integration > API Keys.

Fix the data01

404Fix the data
user matches no trader in your community. Check the email or platform user ID, or look the trader up with Get User Data. A trader with no entries returns 200 with an empty list, not 404.

Retry with backoff01

500Retry with backoff
The entries could not be read, or the key could not be checked (Authentication failed). Retry the same request with exponential backoff.
{
  "meta": {
    "status": "error",
    "statusCode": 400
  },
  "message": "Get streak logs endpoint validation error.",
  "detail": {
    "limit": "Number must be less than or equal to 100"
  },
  "solution": "Check your query in request and try again"
}

Next step#

Get mini-game and streak statePOST/v1/users/mini-game-streak-statsRead the same trader's streak counts and spins as they are right now.