Lists API
The Lists API manages allow/block controls for IP addresses, device fingerprints, and customer emails.
Auth
x-api-key is required.
Endpoints
GET /api/v1/listsPOST /api/v1/listsDELETE /api/v1/lists/:idPOST /api/v1/lists/customer/:emailDELETE /api/v1/lists/customer/:emailPOST /api/v1/lists/deviceDELETE /api/v1/lists/device/:fingerprintPOST /api/v1/lists/ipDELETE /api/v1/lists/ip/:ip
List Entries
List all entries in your lists with filtering.
GET
/api/v1/listsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| limit | number | Items per page (default: 50, max: 100) |
| type | string | Filter by type (`IP`, `DEVICE`, `EMAIL`) |
| listType | string | Filter by list type (`allow`, `block`) |
| from | string | Start timestamp (Unix seconds) |
| to | string | End timestamp (Unix seconds) |
Response
{
"data": [
{
"id": "list_abc123",
"type": "IP",
"value": "203.0.113.50",
"listType": "block",
"reason": "Known malicious IP from threat intelligence",
"expiresAt": "2026-12-31T23:59:59Z",
"createdAt": "2025-01-15T10:00:00Z",
"updatedAt": "2025-01-15T10:00:00Z"
}
],
"total": 50,
"page": 1,
"limit": 50,
"hasMore": false
}Create List Entry
Add a new entry to a list.
POST
/api/v1/listsRequest
{
"type": "IP",
"value": "203.0.113.50",
"listType": "block",
"reason": "Known malicious IP from threat intelligence",
"expiresAt": "2026-12-31T23:59:59Z"
}Response
{
"id": "list_abc123",
"type": "IP",
"value": "203.0.113.50",
"listType": "block",
"reason": "Known malicious IP from threat intelligence",
"expiresAt": "2026-12-31T23:59:59Z",
"createdAt": "2025-01-15T10:00:00Z",
"updatedAt": "2025-01-15T10:00:00Z"
}Entry Types
IP: IP address (IPv4 or IPv6)DEVICE: Device fingerprintEMAIL: Customer email address
List Types
block: Block entries matching this valueallow: Explicitly allow matching values
Remove Entry by ID
Remove a list entry by its ID.
DELETE
/api/v1/lists/:idResponse
{
"success": true,
"message": "Entry removed successfully"
}Scoped Convenience Routes
You can use type-specific routes instead of generic POST /lists and DELETE /lists/:id:
Customer
POST
/api/v1/lists/customer/:emailDELETE
/api/v1/lists/customer/:emailDevice
POST
/api/v1/lists/deviceDELETE
/api/v1/lists/device/:fingerprintIP
POST
/api/v1/lists/ipDELETE
/api/v1/lists/ip/:ipExamples
# Create block list entry
curl -X POST https://api.naiza.ai/api/v1/lists \
-H "x-api-key: naiza_api_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"type": "IP",
"value": "203.0.113.50",
"listType": "block",
"reason": "Known malicious IP"
}'
# List all block entries
curl -X GET "https://api.naiza.ai/api/v1/lists?listType=block" \
-H "x-api-key: naiza_api_sk_live_..."
# Remove entry
curl -X DELETE https://api.naiza.ai/api/v1/lists/list_abc123 \
-H "x-api-key: naiza_api_sk_live_..."
# Remove by email
curl -X DELETE https://api.naiza.ai/api/v1/lists/customer/user@example.com \
-H "x-api-key: naiza_api_sk_live_..."Notes
- Route parameter names are
:ipand:fingerprintin the current API implementation. - For id-based deletions, prefer storing the
idreturned at creation time.