Skip to main content
GET
List failure causes
Groups failed events by the error_code they first failed with (first_error_code) and breaks down their current state (open, failed_again, retrying, completed, and acknowledged). An event retains its first_error_code across retries, so each row tracks both total historical impact (event_count, participant_count) and unacknowledged failures still open (open_count = states.open + states.failed_again). By default, rows are grouped by program and error_code, ordered by newest last_failed_at. Pass folder_id (mutually exclusive with program_id) to scope to a folder tree, or group_by=error_code to aggregate across programs ordered by highest open_count first (program_count, open_program_count, and open_participant_count replace program_id). To inspect the individual events behind a row, call List events with first_error_code, program_id, period_start, and period_end. To retry open failures for a cause, pass program_id, error_code, and before to Retry failed events.
For the triage and retry workflow, see Failures by cause.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Query Parameters

limit
integer
default:50

Return at most this many records, from 1 to 200, default 50.

Required range: 1 <= x <= 200
cursor
string

The next_cursor from the previous response, valid only with the same endpoint and filters.

program_id
string<uuid>

Return only the causes in this rewards program. Combine with error_code to read one cause.

folder_id
string<uuid>

Filter to programs in this folder and its nested subfolders. Mutually exclusive with program_id.

error_code
string

Return only this cause: the error_code its events first failed with.

Maximum string length: 100
period_start
string<date-time>

Count only events that first failed at or after this timestamp (RFC 3339, requires period_end).

period_end
string<date-time>

Count only events that first failed at or before this timestamp (RFC 3339, requires period_start).

open
boolean

Return only causes with at least one open failure (true) or with none (false).

group_by
enum<string>

Send error_code to aggregate across programs (program_count replaces program_id).

Available options:
error_code

Response

Failure causes

One page of failure causes, with the pagination details for the next page.

data
object[]

The failure causes on this page.

pagination
object

Whether another page follows, and the cursor that fetches it.