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"
}| Field | Type | Description |
|---|---|---|
object | "access_list_entry" | The object type. |
id | string | The entry ID, starting with lst_. |
kind | allow or block | Whether a match allows or denies the claim. |
type | email, email_exact, domain, ip, user or device_id | What the entry matches. See Entry types. |
benefit | string or null | The benefit ID (ben_…) the entry applies to. null means every benefit in the workspace. |
reason | string | Why the entry exists, as you wrote it. |
expires_at | string or null | When the entry stops applying. null means it never expires. |
created_at | string | When 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
| Type | Matches | Value format |
|---|---|---|
email | The mailbox behind an email address, as AbuseZero recognizes it. | An email address, such as jordan@example.com. |
email_exact | Only this exact email address. | An email address. |
domain | Every email address at this domain. | A domain, such as example.com. |
ip | Claims from this IP address. | One IPv4 or IPv6 address. |
user | Claims for this user. | The subject.external_id you send in evaluations. |
device_id | Claims 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.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/access-lists | access_lists:write | Required |
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
| Field | Type | Required | Limits | Description |
|---|---|---|---|---|
kind | allow or block | Yes | Whether a match allows or denies the claim. | |
type | string | Yes | One of the entry types | What the entry matches. |
value | string | One of value or values | 1 to 254 characters | One value to list. |
values | array of strings | One of value or values | 1 to 50 values, each 1 to 254 characters | Several values of the same type to list in one call. |
reason | string | Yes | 3 to 500 characters | Why you're adding the entry. It's returned with the entry. |
benefit_id | string or null | No | A ben_ ID from this workspace | The benefit the entry applies to. Omit it or send null to apply the entry to every benefit. |
expires_at | string or null | No | ISO 8601 date and time in UTC, ending in Z, such as 2027-01-27T09:00:00Z | When the entry stops applying. Send this or expires_in_days, not both. |
expires_in_days | integer or null | No | 1 to 3,650 | Whole 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."
}
]
}| Field | Type | Description |
|---|---|---|
value | string | The value as you sent it. |
status | created, already_listed or invalid | created saved a new entry. already_listed found an active entry with the same kind, type, value and benefit. invalid saved nothing for this value. |
id | string | The entry ID. Present for created and already_listed. |
reason | string | Why the value is invalid. Present for invalid only. |
Errors
| Code | Status | Meaning |
|---|---|---|
INVALID_FIELD | 422 | Both 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_EMAIL | 422 | A single email or email_exact value isn't a supported email address. field is value. |
INVALID_DOMAIN | 422 | A single domain value isn't a domain such as example.com. field is value. |
INVALID_IP | 422 | A single ip value isn't an IPv4 or IPv6 address. field is value. |
BENEFIT_NOT_FOUND | 404 | benefit_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.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/access-lists | access_lists:read | Not 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
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
limit | integer | No | 1 to 100, default 50 | How many entries to return. |
cursor | string | No | The 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
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/access-lists/{id} | access_lists:read | Not 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
| Parameter | Type | Description |
|---|---|---|
id | string | The 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
| Code | Status | Meaning |
|---|---|---|
RESOURCE_NOT_FOUND | 404 | No entry with this ID exists in the workspace. |
Remove an entry
Removes an entry. It stops applying to evaluations immediately.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
DELETE | /v1/access-lists/{id} | access_lists:write | Required |
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
| Parameter | Type | Description |
|---|---|---|
id | string | The 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
}Related
How is this guide?
Last updated on