Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Subscribers HTTP API

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 scope read (its own project; the argument is ignored); an erased subscriber is not_found.
Returns
items (events with type, ts and payload) and next_cursor: pass it as cursor for the next page; null on the last page. The same as GET /api/v1/projects/{project_id}/subscribers/{subscriber_id}/events.

Arguments

  • object
  • subscriber_idstring · uuidrequired

    The subscriber’s id.

  • cursorstring | null

    next_cursor of the previous page; leave it out for the first.

  • limitinteger · int64 | null

    Page size, 1 to 100; default 50.

    1–100

  • project_idstring · uuid | null

    The 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 Event

    Oldest first: by time, then by event id.

    7 fields
    • Event object · all fields required
    • event_idstring · uuid
    • list_idstring · uuid | null

      The list the event is about; null for none.

    • payloadmap of string → string | integer | boolean | null

      What the event says, by type: plain values; actor_key_id is the key that acted.

    • project_idstring · uuid
    • subscriber_idstring · uuid | null

      The subscriber the event is about; null for none.

    • tsstring · date-time
    • typestring

      subscriber.created, subscriber.unsubscribed, subscriber.resubscribed, subscriber.reactivated, …

  • next_cursorstring | null

    Pass as cursor for the next page; null on 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 | null

    The list the event is about; null for none.

  • payloadmap of string → string | integer | boolean | null

    What the event says, by type: plain values; actor_key_id is the key that acted.

  • project_idstring · uuid
  • subscriber_idstring · uuid | null

    The subscriber the event is about; null for none.

  • tsstring · date-time
  • typestring

    subscriber.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