vevee.events.list()GET /api/v1-16/eventssk_live_

SDK 1.16+. Pages through the events you tracked, newest first, with optional filters and a cursor. Use it to find the events behind a number, for example every event one team member caused in a month.

Signature

events.list(options?: {
  userId?: string;
  eventType?: string;                  // exact event type
  from?: string;                       // full ISO 8601 timestamp, inclusive
  to?: string;                         // full ISO 8601 timestamp, exclusive
  metadata?: Record<string, string>;   // exact-match pairs, see rules below
  limit?: number;                      // 1 to 100, default 50
  cursor?: string;                     // nextCursor of the previous page
}): Promise<{ events: EventPageRow[]; nextCursor: string | null }>

Response

interface EventPageRow {
  id: string;                          // 'evt_...'
  userId: string;
  eventType: string;
  quantity: number;
  costCents: number;
  matchStatus: string;
  matchedGroupIds: string[];
  metadata: Record<string, string> | null;
  createdAt: string;                   // ISO 8601
}

nextCursor is null on the last page. Prompts and responses are never returned, even when prompt logging is on.

Metadata filter rules

  • Each pair is an exact string match. Up to 5 pairs.
  • A metadata filter needs userId, from and to.
  • The range from to to is at most 92 days.
  • Keys must match ^[A-Za-z0-9_.-]{1,64}$.
  • from and to are full ISO 8601 timestamps with Z or an offset, for example 2026-11-01T00:00:00Z. A date-only value such as 2026-11-01 is rejected with 400.
  • eventType can be combined with the metadata filter.
  • Anything else answers invalid_request (400).

Example

let cursor: string | undefined;
do {
  const page = await vevee.events.list({
    userId: 'org_1',
    from: '2026-11-01T00:00:00Z',
    to: '2026-12-01T00:00:00Z',
    metadata: { member: 'm_42' },
    limit: 100,
    cursor,
  });
  for (const e of page.events) {
    console.log(e.createdAt, e.eventType, e.quantity, e.costCents);
  }
  cursor = page.nextCursor ?? undefined;
} while (cursor);

Errors

  • requires_secret_key - a pk_* key is refused. Secret key only.
  • invalid_key (401)
  • invalid_request (400) - bad filter, bad limit, or a metadata filter that breaks the rules above.