IP Blocklist API
Block individual IPs or CIDR ranges from tracking. Useful for excluding internal traffic, known bots, competitor monitoring, or test infrastructure.
Base path: /blocklist-ips
Default scope: read. Mutations require write (editor or higher).
Allowlist vs Blocklist
This endpoint blocks traffic. To restrict dashboard access by IP, see the IP Allowlist API.
List Blocklist Entries
GET /blocklist-ips?account_id={account_id}
| Parameter | Type | Default | Description |
|---|---|---|---|
account_id | string | required | Account ID |
include_inactive | boolean | false | Include inactive entries |
Response:
{
"success": true,
"data": {
"entries": [
{
"id": 1,
"account_id": "acme",
"ip_or_cidr": "10.0.0.0/8",
"reason": "internal office network",
"is_active": true,
"created_at": "2025-01-05T10:00:00Z"
},
{
"id": 2,
"account_id": "acme",
"ip_or_cidr": "203.0.113.42",
"reason": "competitor monitoring",
"is_active": true,
"created_at": "2025-02-10T08:15:00Z"
}
],
"total": 2,
"active_count": 2
}
}
Create Blocklist Entry
POST /blocklist-ips?account_id={account_id}
Required scope: write
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
ip_or_cidr | string | Yes | IP address or CIDR range (1-50 chars). Validated with Python ipaddress — both IPv4 and IPv6 supported (e.g. "192.168.1.100", "10.0.0.0/8") |
reason | string | No | Why this is blocked (max 255, default "") |
is_active | boolean | No | Default true |
Response (201 Created): full entry object. Returns 400 if the IP/CIDR is malformed, 409 if the entry already exists.
Get Blocklist Entry
GET /blocklist-ips/{entry_id}?account_id={account_id}
Returns the entry or 404 if not found.
Update Blocklist Entry
PATCH /blocklist-ips/{entry_id}?account_id={account_id}
Required scope: write
All fields from create are optional. Returns 409 if the new IP/CIDR would conflict with another entry.
Delete Blocklist Entry
DELETE /blocklist-ips/{entry_id}?account_id={account_id}
Required scope: write. Returns 204 No Content.