AbuseZero

Allow and block lists

Add, read and remove allow and block list entries for emails, domains, networks, users and devices.

Allow and block lists decide the result for the specific people, addresses, networks and devices you name. An entry applies to one benefit or to every benefit in the workspace, from the moment it's saved until it expires or you remove it. Every evaluation checks every active entry. See Allow and block lists for how entries shape results.

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 access list entry object

{
  "object": "access_list_entry",
  "id": "lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71",
  "kind": "block",
  "type": "domain",
  "benefit": null,
  "reason": "Reseller domain confirmed by our support team",
  "expires_at": "2027-01-27T09:14:22.000Z",
  "created_at": "2026-10-29T09:14:22.000Z"
}
FieldTypeDescription
object"access_list_entry"The object type.
idstringThe entry ID, starting with lst_.
kindallow or blockWhether a match allows or denies the claim.
typeemail, email_exact, domain, ip, user or device_idWhat the entry matches. See Entry types.
benefitstring or nullThe benefit ID (ben_…) the entry applies to. null means every benefit in the workspace.
reasonstringWhy the entry exists, as you wrote it.
expires_atstring or nullWhen the entry stops applying. null means it never expires.
created_atstringWhen the entry was created.

Reads never return the listed value itself. Keep your own record of what you listed and why, and use the entry ID to manage it.

Entry types

TypeMatchesValue format
emailThe mailbox behind an email address, as AbuseZero recognizes it.An email address, such as jordan@example.com.
email_exactOnly this exact email address.An email address.
domainEvery email address at this domain.A domain, such as example.com.
ipClaims from this IP address.One IPv4 or IPv6 address.
userClaims for this user.The subject.external_id you send in evaluations.
device_idClaims from this device.The identifiers.device_id you send in evaluations.

Add an entry

Adds one value, or up to 50 values in a single call, to an allow or block list.

MethodPathScopeIdempotency-Key
POST/v1/access-listsaccess_lists:writeRequired

Also available as abusezero access-lists add in the AbuseZero CLI, abusezero_add_access_list_entry on the AbuseZero MCP server and addAccessListEntry() or addAccessListEntries() in the AbuseZero Node.js SDK.

Request body

FieldTypeRequiredLimitsDescription
kindallow or blockYesWhether a match allows or denies the claim.
typestringYesOne of the entry typesWhat the entry matches.
valuestringOne of value or values1 to 254 charactersOne value to list.
valuesarray of stringsOne of value or values1 to 50 values, each 1 to 254 charactersSeveral values of the same type to list in one call.
reasonstringYes3 to 500 charactersWhy you're adding the entry. It's returned with the entry.
benefit_idstring or nullNoA ben_ ID from this workspaceThe benefit the entry applies to. Omit it or send null to apply the entry to every benefit.
expires_atstring or nullNoISO 8601 date and time in UTC, ending in Z, such as 2027-01-27T09:00:00ZWhen the entry stops applying. Send this or expires_in_days, not both.
expires_in_daysinteger or nullNo1 to 3,650Whole days from now until the entry stops applying. Send this or expires_at, not both.

Omit both expires_at and expires_in_days for an entry that never expires.

Example: one value

const entry = await abusezero.addAccessListEntry(
  {
    kind: "block",
    type: "domain",
    value: "example.com",
    reason: "Reseller domain confirmed by our support team",
    expires_in_days: 90,
  },
  "block-example-com-2026-10-29",
);

Response: one value

Returns 201.

{
  "object": "access_list_entry",
  "id": "lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71"
}

If an active entry with the same kind, type, value and benefit already exists, the response returns that entry's ID instead of creating a second one.

Example: several values

const results = await abusezero.addAccessListEntries(
  {
    kind: "allow",
    type: "email_exact",
    values: ["jordan@example.com", "sam@example.com", "not-an-email"],
    reason: "Design partners approved for a second trial",
  },
  "allow-design-partners-2026-10-29",
);

Response: several values

Returns 201. Every submitted value gets its own result, in the order you sent them. Valid values are saved even when others in the same call are invalid. Repeated values get one result, and blank values are ignored. A retry with the same Idempotency-Key and body returns these same results, so values the first call saved still read created.

{
  "object": "list",
  "data": [
    {
      "object": "access_list_result",
      "value": "jordan@example.com",
      "status": "created",
      "id": "lst_9a1d3f5e-2c4b-4d8e-a6f7-0b3e5c7d9a12"
    },
    {
      "object": "access_list_result",
      "value": "sam@example.com",
      "status": "already_listed",
      "id": "lst_1e7b9c3d-5f2a-4a6e-8d0c-4b2f6a8e0c34"
    },
    {
      "object": "access_list_result",
      "value": "not-an-email",
      "status": "invalid",
      "reason": "Use an email such as name@example.com. Quoted and international local parts are not supported."
    }
  ]
}
FieldTypeDescription
valuestringThe value as you sent it.
statuscreated, already_listed or invalidcreated saved a new entry. already_listed found an active entry with the same kind, type, value and benefit. invalid saved nothing for this value.
idstringThe entry ID. Present for created and already_listed.
reasonstringWhy the value is invalid. Present for invalid only.

Errors

CodeStatusMeaning
INVALID_FIELD422Both or neither of value and values were sent, both expiry fields were sent, expires_at isn't a UTC time ending in Z, or a field is outside its limits.
INVALID_EMAIL422A single email or email_exact value isn't a supported email address. field is value.
INVALID_DOMAIN422A single domain value isn't a domain such as example.com. field is value.
INVALID_IP422A single ip value isn't an IPv4 or IPv6 address. field is value.
BENEFIT_NOT_FOUND404benefit_id isn't a benefit in this workspace. field is benefit_id.

In a call with values, the value problems appear as invalid results instead of errors. For every other code, see REST API errors.

List entries

Returns entries newest first.

MethodPathScopeIdempotency-Key
GET/v1/access-listsaccess_lists:readNot used

Also available as abusezero access-lists list in the AbuseZero CLI, abusezero_list_access_lists on the AbuseZero MCP server and accessLists() in the AbuseZero Node.js SDK.

Query parameters

ParameterTypeRequiredLimitsDescription
limitintegerNo1 to 100, default 50How many entries to return.
cursorstringNoThe next_cursor from the previous page, unchanged.

Example

const page = await abusezero.accessLists({ limit: 100 });

Response

Returns 200.

{
  "object": "list",
  "data": [
    {
      "object": "access_list_entry",
      "id": "lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71",
      "kind": "block",
      "type": "domain",
      "benefit": null,
      "reason": "Reseller domain confirmed by our support team",
      "expires_at": "2027-01-27T09:14:22.000Z",
      "created_at": "2026-10-29T09:14:22.000Z"
    }
  ],
  "next_cursor": null
}

When next_cursor is a string, pass it as cursor to read the next page. See Pagination in the AbuseZero REST API overview.

Retrieve an entry

MethodPathScopeIdempotency-Key
GET/v1/access-lists/{id}access_lists:readNot used

Also available as abusezero access-lists get in the AbuseZero CLI, abusezero_get_access_list_entry on the AbuseZero MCP server and call() in the AbuseZero Node.js SDK.

Path parameters

ParameterTypeDescription
idstringThe entry ID, starting with lst_.

Example

const entry = await abusezero.call("/v1/access-lists/lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71");

Response

Returns 200 with an access list entry object.

Errors

CodeStatusMeaning
RESOURCE_NOT_FOUND404No entry with this ID exists in the workspace.

Remove an entry

Removes an entry. It stops applying to evaluations immediately.

MethodPathScopeIdempotency-Key
DELETE/v1/access-lists/{id}access_lists:writeRequired

Also available as abusezero access-lists delete in the AbuseZero CLI, abusezero_delete_access_list_entry on the AbuseZero MCP server and deleteAccessListEntry() in the AbuseZero Node.js SDK.

Path parameters

ParameterTypeDescription
idstringThe entry ID, starting with lst_.

Example

await abusezero.deleteAccessListEntry(
  "lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71",
  "remove-lst-4c2e8a1f",
);

Response

Returns 200. Removing an entry that's already gone also succeeds.

{
  "object": "deleted",
  "id": "lst_4c2e8a1f-7b3d-4e9a-8f12-6d0b5a3c9e71",
  "deleted": true
}

How is this guide?

Last updated on

On this page