Skip to main content
GET
/
v1
/
participants
/
{id}
/
state
/
counters
Get participant counters
curl --request GET \
  --url https://api.scrip.dev/v1/participants/{id}/state/counters \
  --header 'X-API-Key: <api-key>'
{
  "data": [
    {
      "key": "purchases",
      "value": "42"
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "YWJjMTIz"
  }
}
Returns all counters for a participant. Counters are numeric accumulators that can increment by any amount — not just +1. A single counter can track simple counts (e.g. logins, referrals) or running totals (e.g. total purchase volume, monthly spend) by incrementing with event.amount in a rule action. Each counter returns its current value along with its key. Counters that have auto-reset configured include reset_after (the reset interval) and last_reset_at (when the counter last reset). If the reset window has elapsed since last_reset_at, the effective value is 0 even though the stored value has not yet been cleared.
For usage patterns and examples, see the State Management guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Participant ID

Response

Counters list

data
object[]

Counter entries

pagination
object

Pagination metadata for list responses