IP Blocking
Surface can block the address that sent a malicious file or payload, so the same source cannot submit scans to your account again. This page covers which plans include it, exactly what triggers a block, how long blocks last, and how to review and remove them.
Plans#
Auto-blocking is part of the Blocked IPs feature on the Standard and Pro plans.
| Action | Free, Starter | Standard, Pro |
|---|---|---|
| Turn on Auto-block IP on a profile | Refused with 403 code: "plan_required" |
Yes |
| Addresses get blocked | Never | When a profile with auto-block on returns Malicious |
List blocked addresses (GET /api/account/blocked-ips, Blocked IPs page) |
403 plan_required |
Yes |
Remove a block (DELETE /api/account/blocked-ips/{ip}) |
Yes | Yes |
Removing a block works on every plan, so a block left over from a downgrade can always be undone.
What triggers a block#
All of these must be true:
- The scan came in through
POST /api/scanorPOST /api/scan/payload, with an API key or from the dashboard. - The scan profile that applied has Auto-block IP turned on. Only custom profiles can have it: the built-in Default, All File Types and Agentic profiles all have it off and cannot be edited.
- Your plan includes Blocked IPs.
- The result's
threatLevelis exactlyMalicious.
Nothing else blocks an address. In particular:
Suspicious(Review) never blocks.Riskynever blocks. It is a Block on an agent tool call that would do harm, not evidence that the sender is malicious. See Reading a scan result.ErrorandRejectednever block: nothing was scanned.- Scans that Contact and Strand run through Surface never block an address.
There is no way to add an address to the list by hand; the list holds only automatic blocks.
Which address gets blocked#
The block is on the address that sent the request to Surface, resolved from the connection behind Surface's own proxies. A client cannot choose or spoof it by sending its own X-Forwarded-For header.
That means the address is only your end user's if your users call Surface directly. If your server calls Surface on your users' behalf, the address Surface sees is your server's, and a single malicious upload would block every scan your server sends. Turn auto-block on only for profiles used by keys that clients call directly, and keep server-side integrations on a profile without it.
What a block does#
A blocked address gets 403 on the two scan endpoints for your account:
{
"error": "IP address is blocked",
"reason": "Uploaded malicious file: <primary threat>",
"ip": "203.0.113.10"
}
The body names the address, so you can unblock it even on a plan that cannot open the Blocked IPs page. The block is per account: the same address can still scan for other Surface accounts, and it can still reach your account's other endpoints (history, usage, profiles). A blocked scan is refused before scanning and is not counted against your allowance.
How long a block lasts#
Blocks are permanent until you remove them. They do not expire, and they are not removed by your plan's retention sweep.
The scan that caused a block does expire with your retention window. The block keeps its own reason, file_hash and timestamp, so it stays explainable after the scan record is gone; scan_available tells you whether the scan can still be opened.
Reviewing blocks#
In the dashboard, open Blocked IPs in the sidebar. Each row shows the address, the reason, the hash of the file that triggered it, and when it was blocked. To find the scan itself, look in Scan History around the same time.
Through the API, GET /api/account/blocked-ips returns one page at a time, newest first:
| Query param | Default | Description |
|---|---|---|
page |
1 |
Page number |
limit |
50 |
Results per page, up to 200 |
{
"blocked_ips": [
{
"id": "…",
"account_id": "…",
"ip_address": "203.0.113.10",
"reason": "Uploaded malicious file: <primary threat>",
"file_hash": "…",
"scan_id": "…",
"created_at": "…",
"scan_available": true
}
],
"page": 1,
"limit": 50,
"total": 1,
"has_more": false
}
If the same address is blocked again, its existing entry is updated with the newer reason, hash and scan rather than added twice.
Unblocking an address#
In the dashboard, click Unblock on the row, then Confirm.
Through the API, send the address as it appears in ip_address (or in the ip field of the 403):
curl -X DELETE "https://app.tendrl.com/surface/api/account/blocked-ips/203.0.113.10" \
-H "Authorization: Bearer YOUR_KEY"
{ "message": "IP unblocked", "ip": "203.0.113.10" }
- The key or user needs write access to the account, which among the built-in roles only Admin has (see Access control).
- The address must match exactly. An address that is not on the list returns 404
IP not found in block list. - The next scan from that address is accepted immediately.
- Each unblock is recorded in the account's audit log.
If the same source sends another malicious file through a profile with auto-block on, it is blocked again. To stop that, turn Auto-block IP off on the profile, or fix whatever is sending the file.
Related#
- Scan profiles: the Auto-block IP setting
- Reading a scan result: which threat levels mean what
- Errors and limits: telling a blocked-IP 403 from the others
- Data retention: why a block outlives the scan behind it
Tendrl