---
title: "Get group state history"
method: GET
path: "/v1/groups/{group_id}/activity/state-history"
tags: ["Groups"]
---

# Get group state history

`GET /v1/groups/{group_id}/activity/state-history`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/groups/{group_id}/activity/state-history`
- Auth: HTTP bearer

Retrieve a unified timeline of state changes across tags, counters, attributes, and tiers.

## Path parameters

- `group_id` string, uuid, required

## Query parameters

- `state_type` 'TAG' | 'COUNTER' | 'ATTRIBUTE' | 'TIER'
- `key` string
- `program_id` string, uuid
- `operation` 'SET' | 'DELETE' | 'AUTO_RESET'
- `created_after` string, date-time
- `created_before` string, date-time
- `limit` integer
- `cursor` string

## Response `200`

State history entries

- EntityStateHistoryListResponse: One page of state changes, with the pagination details for the next page.
  - `data` EntityStateHistoryResponse[]: The state changes on this page.
    - `changed_at` string, date-time: When the change was recorded (RFC 3339).
    - `event_id` string, uuid: Event whose rules caused the change; absent for direct API writes.
    - `id` string, uuid: Unique identifier for this history entry
    - `key` string: The tag, counter key, attribute key, or tier key that changed.
    - `new_value` string: Value after the change; null when the key was removed.
    - `old_value` string: Value before the change; null when the key was new.
    - `operation` 'SET' | 'DELETE' | 'AUTO_RESET': What happened to the key: a value was written, the key was removed, or a counter was reset to zero on its schedule.
    - `program_id` string, uuid: Program the tier belongs to; present for tier changes only.
    - `rule_id` string, uuid: Rule that caused the change; present whenever a rule made the change.
    - `state_type` 'TAG' | 'COUNTER' | 'ATTRIBUTE' | 'TIER': Which kind of state changed.
  - `pagination` PaginationResponse: Cursor details for a list. `has_more` says whether another page exists, and `next_cursor` is the value to send to get it.
    - `has_more` boolean, required: Whether more results are available beyond this page
    - `next_cursor` string, nullable, required: Cursor to fetch the next page. Null on the last page

## Other responses

- `400`: Invalid parameters (code: validation_error)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `404`: Group not found (code: group_not_found)
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

[API](https://skmtc.dev/scrip/apis/scrip-api.md) · [All operations](https://skmtc.dev/scrip/apis/scrip-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrip/apis/scrip-api/revisions/c52d35da8d97?raw)
