GET/api/v1/projects/{project_id}/subscribers/{subscriber_id}/events
get_subscriber_events
Lists a subscriber’s history: the events about it (subscriber.created, subscriber.unsubscribed, subscriber.resubscribed, …) since it was added, oldest first, at most 100 per call.
- Call it
- to see what happened to a subscriber and which key did it (
actor_key_id). - Needs
- the subscriber’s id and an admin key with
project_id, or a project key with scoperead(its own project; the argument is ignored); an erased subscriber isnot_found. - Returns
items(events withtype,tsandpayload) andnext_cursor: pass it ascursorfor the next page; null on the last page. The same asGET /api/v1/projects/{project_id}/subscribers/{subscriber_id}/events.
Arguments
- object
-
subscriber_idstring · uuidrequiredThe subscriber’s id.
-
cursorstring | nullnext_cursorof the previous page; leave it out for the first. -
limitinteger · int64 | nullPage size, 1 to 100; default 50.
1–100
-
project_idstring · uuid | nullThe subscriber’s project. An admin key must pass it; a project key’s own project is used and this is ignored.
No other arguments are accepted.
Result
The result comes back as structuredContent, with the same JSON as a text block.
- object · all fields required
-
itemsarray of EventOldest first: by time, then by event id.
7 fields
- Event object · all fields required
-
event_idstring · uuid -
list_idstring · uuid | nullThe list the event is about;
nullfor none. -
payloadmap of string → string | integer | boolean | nullWhat the event says, by type: plain values;
actor_key_idis the key that acted. -
project_idstring · uuid -
subscriber_idstring · uuid | nullThe subscriber the event is about;
nullfor none. -
tsstring · date-time -
typestringsubscriber.created,subscriber.unsubscribed,subscriber.resubscribed,subscriber.reactivated, …
-
next_cursorstring | nullPass as
cursorfor the next page;nullon the last page.
Definitions
Event
One event of a subscriber’s history (get_subscriber_events).
- object · all fields required
-
event_idstring · uuid -
list_idstring · uuid | nullThe list the event is about;
nullfor none. -
payloadmap of string → string | integer | boolean | nullWhat the event says, by type: plain values;
actor_key_idis the key that acted. -
project_idstring · uuid -
subscriber_idstring · uuid | nullThe subscriber the event is about;
nullfor none. -
tsstring · date-time -
typestringsubscriber.created,subscriber.unsubscribed,subscriber.resubscribed,subscriber.reactivated, …
Errors
A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors
HTTP API
The same operation over HTTP: GET /api/v1/projects/{project_id}/subscribers/{subscriber_id}/events