Skip to Content

Pagination

Lists return { data, next_cursor }. Pass the cursor back to get the next page.

Every list endpoint takes two query parameters:

ParameterMeaning
limitPage size, 1 to 100. Defaults to 50.
cursorThe next_cursor from the previous page. Omit it for the first page.

And returns:

{
  "data": [{ "id": "evt_...", "...": "..." }],
  "next_cursor": "eyJ0IjoiMjAyNy0wMS0wOFQyMzozMDowMFoiLCJpIjoiZXZ0XyJ9"
}

next_cursor is null on the last page. Treat it as an opaque string: pass it back exactly as you got it, and keep any filters (such as status) the same between pages.

Every page, in a loop

curl "https://api.whocoming.com/v1/events/evt_demo0000000000000001/rsvps?limit=100&status=going" \
  -H "Authorization: Bearer wc_test_..."

curl "https://api.whocoming.com/v1/events/evt_demo0000000000000001/rsvps?limit=100&status=going&cursor=eyJ0Ijoi..." \
  -H "Authorization: Bearer wc_test_..."
async function allRsvps(eventId: string) {
  const rsvps = [];
  let cursor: string | null = null;
  do {
    const url = new URL(`https://api.whocoming.com/v1/events/${eventId}/rsvps`);
    url.searchParams.set("limit", "100");
    if (cursor) url.searchParams.set("cursor", cursor);
    const res = await fetch(url, {
      headers: { Authorization: `Bearer ${process.env.WHOCOMING_API_KEY}` },
    });
    const page = await res.json();
    rsvps.push(...page.data);
    cursor = page.next_cursor;
  } while (cursor);
  return rsvps;
}

The SDK does this for you: for await (const rsvp of wc.rsvps.list(eventId)).

Order

ListOrder
GET /v1/eventsSoonest first
GET /v1/seriesNewest first
GET /v1/events/{id}/rsvpsOldest first
GET /v1/webhook-deliveriesNewest first
GET /v1/public/orgs/{slug}/eventsSoonest first, upcoming only

On this page