AbuseZeroAbuseZero

Events

Read your workspace's account events in order, and wait for the next one, without a public address.

The events feed returns your workspace's account events in the order they happened: credits, payments, plan changes, keys, members, ownership transfers and the webhook daily limit. It's for code and agents that run all the time but can't receive webhooks. A read can wait for the next event, so you don't need to poll.

Every account event reaches the feed, whether or not a webhook endpoint subscribes to it. Each event has the same id and shape as the webhook request for it, so code that receives both can tell when it has seen an event already.

Examples on this page use a server client:

import { AbuseZero } from "abusezero/server";

const abusezero = new AbuseZero({ key: process.env.ABUSEZERO_SECRET_KEY!, outage: "throw" });

The feed page

{
  "object": "list",
  "data": [
    {
      "object": "event",
      "id": "87609909655711151940",
      "type": "credits.low",
      "api_version": "v1",
      "created_at": "2026-11-10T09:12:05.000Z",
      "workspace": "56532404670088059435",
      "test": false,
      "data": { "object": "credits", "state": "low", "available": 1200, "evaluations_left": 240, "days_left": 3 }
    }
  ],
  "next_cursor": "…",
  "has_more": false
}
FieldTypeDescription
object"list"The object type.
dataarrayEvents, oldest first. test is always false: test events aren't part of the feed.
next_cursorstringWhere to carry on from. Always present, even when data is empty. Pass it as cursor on your next read.
has_morebooleantrue when more events are ready now. Read again straight away.

Save next_cursor after you've handled a page's events. If your process stops, carry on from the saved cursor, and no event is skipped.

Read events

MethodPathScopeIdempotency-Key
GET/v1/eventsoperations:generalNot used

Also available as abusezero events --follow and abusezero events list in the AbuseZero CLI, abusezero_list_events on the AbuseZero MCP server, and events() and followEvents() in the AbuseZero Node.js SDK.

Query parameters

ParameterTypeRequiredLimitsDescription
cursorstringNoThe next_cursor from your last read, unchanged. Leave it out to start from the oldest event kept.
limitintegerNo1 to 100, default 50How many events to return.
waitintegerNo0 to 25, default 0Seconds to wait when there's no new event yet. The read returns as soon as one arrives, or with an empty data when the time is up.

Example

let cursor = await loadSavedCursor();
for (;;) {
  const page = await abusezero.events({ cursor, wait: 25 });
  for (const event of page.data) await handle(event);
  cursor = page.next_cursor;
  await saveCursor(cursor);
}

loadSavedCursor, saveCursor and handle stand for your own code. followEvents() runs the same loop for you, and waits out brief outages:

for await (const page of abusezero.followEvents({ cursor: await loadSavedCursor() })) {
  for (const event of page.data) await handle(event);
  await saveCursor(page.next_cursor);
}

Response

Returns 200 with a feed page.

Errors

CodeStatusMeaning
CURSOR_INVALID422The cursor was changed, or belongs to another list or workspace. Read again without a cursor.
RATE_LIMITED429Too many reads that wait. Wait for Retry-After, then read again with the same cursor.
WORKSPACE_SUSPENDED403The workspace is suspended.

For every other code, see REST API errors.

How long events are kept

The feed keeps each event as long as the delivery log keeps webhook deliveries: 30 days. A cursor older than that still works, and carries on from the oldest event kept.

How is this guide?

Last updated on