Troubleshooting
Every error response carries an error message, and the quoted strings below are the exact messages Surface sends, so you can search this page for the text you got back. Branch on the HTTP status first. The full table of statuses and limits is in Errors and limits.
If the verdict itself looks wrong (something benign flagged, or a threat let through), see False positives and missed threats.
Every request comes back 401 authentication required#
Surface didn't recognize the credential, so the request was treated as anonymous.
- The
Bearerprefix is missing. SendAuthorization: Bearer <token>. A bare token in the header doesn't authenticate. - You sent the Key ID instead of the Token. The Key ID is a UUID that identifies the key in Access Control and scan history. It isn't a credential. The Token is the long base64 string shown once when you created the key. See Create an API key.
- The key was revoked. Revoking a key deletes it, and nothing can bring it back. Create a new key under Access Control → API Keys.
403 permission denied: scans:write required#
The key authenticated, but its role isn't allowed to submit scans. Analyst and Viewer are read-only. Use a key with the Scanner role, or Admin, or a custom role that grants write on scans. The same message shape names other permissions on other routes (profiles:write, account:write, and so on). See Access Control.
403 with code: "plan_required"#
The request needs something your plan doesn't include. The message names it, for example webhooks is not included on the free plan. The body also carries feature and current_plan. Features gated this way include webhooks, auto-block IP and the Blocked IPs list, analytics, the audit log, custom roles and scan export.
Creating a profile past your plan's allowance returns the same code, with a message like the starter plan includes 1 scan profile(s); this account has 1. Built-in profiles don't count toward it.
Upgrade, or leave that setting out of the request. Pricing shows which plan includes what.
403 Payload scanning is not enabled for this scan profile.#
The profile linked to your key has Enable payload scan turned off. Turn it on for that profile, or scan with a key linked to a profile that allows payloads. See Scan Profiles.
403 IP address is blocked#
A profile with Auto-block IP turned on saw a malicious file from this address. The response includes reason and ip. A blocked address can't submit scans to that account until it's unblocked. Any address can be unblocked on any plan:
DELETE /api/account/blocked-ips/{ip}, with a key or user that can write account settings (Admin)tendrl-cli surface account unblock <ip>- the Blocked IPs page, on plans that include it
See IP blocking.
My upload is refused with 400 File type "exe" is not allowed by scan profile "Default"#
The profile that ran the scan doesn't accept that extension, so the file was never scanned. The body lists the profile's allowedTypes. The built-in Default profile excludes executables and scripts on purpose.
Built-in profiles can't be edited. Saving one returns built-in profiles cannot be modified; create a custom profile instead. So either link your key to the built-in All File Types profile, or create a custom profile that accepts the types you need and link the key to that. A profile_id sent with the request overrides the key's linked profile, and a profile_id that doesn't exist returns 400 scan profile not found. See Scan Profiles.
413 on a file or payload that isn't that big#
There are three different 413s:
| Message | What it means |
|---|---|
File exceeds maximum size (N MB for your plan) |
The file is over the lower of two caps: your plan's file size and the profile's Max file size. A profile can set a lower cap than your plan, but never a higher one. |
decoded payload exceeds size limit (N bytes max) |
A payload over the payload cap. The cap applies after base64 decoding. |
This file is too large to scan on the hosted service. … |
The file is under your caps, but the hosted scanner can't fit it in memory. |
For a big file, the scanner binary has no per-file ceiling of its own on paid plans. Current plan caps are on Pricing.
429 rate limit exceeded#
You're over your plan's per-minute request rate. The scan response tells you which limit you hit with plan and limit_per_minute. Back off and retry, or spread requests out. Other endpoints answer an over-limit request with Retry-After: 60 and send X-RateLimit-Limit / X-RateLimit-Remaining on every response.
Feedback reports have a separate daily cap, and going over it returns feedback rate limit exceeded, try again later.
See Usage and quotas.
402 monthly scan quota exceeded (N/M scans used)#
Your plan's monthly scan allowance is used up. GET /api/account/usage shows scans_used, max_scans and reset_at, when the count goes back to zero.
- Cached results still count. A repeat scan answered from cache is faster, but it still uses one scan from the allowance.
- Local scans don't count. Scans run by the scanner binary aren't metered, even with
--report-results.
A different 402, async scanning is not included on the <plan> plan, means you sent ?defer=true on a plan without async scanning. Drop the flag, and the scan runs synchronously.
503 Server at capacity, try again shortly or Scan engine unavailable: …#
The scanner couldn't take the scan right now. Both responses carry a Retry-After header. The SDKs retry these on their own within their timeout, and you should do the same if you call the API directly. See When Surface is unavailable.
My deferred scan stays pending#
- Poll the
scanId, not therequestId.GET /surface/api/scan/{scanId}takes the scan ID. The request ID is for matching webhook deliveries. - Poll with a key from the same account. A scan that belongs to another account, or an ID that doesn't exist, returns 404
scan not found. - Read the finished result in the right place. A finished poll returns
status: "complete"with the full result underresult, not at the top level.
A deferred scan the scanner can't finish doesn't stay pending. It completes with threatLevel: "Error". Finished deferred scans show up in Scan History, and if the profile has a webhook, it gets the result too. See Async Scanning.
The result says Rejected or Error#
Both mean nothing was scanned, so there's no verdict. Both set recommendedAction to Block and carry an error saying why. Never treat either as clean.
Rejected: the profile doesn't accept this file type. The hosted API refuses these with a 400 before scanning (see above). The scanner binary returns them as aRejectedresult instead. In the CLI,Rejecteddoesn't fail the exit status, butErrordoes.Error: the scan couldn't run, for example because the scanner was unavailable or the file was too large for it. The reason is inprimaryThreatanderror. Retrying anErroris reasonable. Retrying aRejectedwon't change anything.
See Verdicts.
Everything comes back Review#
Review means "a person should look at this before it goes through". These are the common reasons you get a lot of it:
- File uploads flagged only by the models.
Blockneeds precise evidence, such as a signature or a known-bad hash. New malware that only the models recognize comes back asReviewby design. Don't accept it silently. See For uploads, refuse Review as well as Block. - Tool calls with no
context. With nouser_request, Surface can't tell whether the user asked for an irreversible action (deleting data, granting admin, sharing publicly), so it holds the action for Review. Senduser_request,principal_domainsandallowed_egressfrom your own app state. See Context fields. - Payloads with no
source. Settingsourcetouser_promptgives a person's own wording the most room: an override there is held for Review at most. Settingcontentkeeps rules meant for runnable files from holding text that an agent only reads. strictness: "strict". Atstrict, anything that needs judgment gets a question. The default isbalanced.- Engine sensitivity. Profiles run each engine at
strictby default, so medium-severity prompt-injection findings count. Atpermissive, only high-severity findings do.
If you're instead gating on threatLevel == "Clean" and rejecting good files, that's a different problem: formats with minimal coverage, such as JARs, top out at Informational, which is still Allow. Branch on recommendedAction. See Tune strictness and reject.
My webhook never fires#
- Webhooks need Starter or above.
- The webhook belongs to a profile. A webhook fires for scans that ran under the profile it's set on, which is normally the profile linked to the API key you scanned with. Webhook settings live on a profile, and built-in profiles can't be edited, so create a custom profile, add the webhook there, and link your key to it.
- Failed deliveries aren't retried. Surface sends each result once. If your endpoint was down or answered with anything other than 2xx, that delivery is lost. Poll
GET /api/scan/{scanId}as a fallback. - Check the profile's delivery health. On Scan Profiles, a webhook whose latest delivery failed shows Failing. Open the profile to see "Webhook deliveries are failing", the HTTP status or error, the likely cause, the number of consecutive failures, and the last success.
Test webhook fails#
Test webhook sends a signed sample delivery (marked "test": true) and reports the outcome:
no webhook URL configured for this profile: save a URL first.webhook returned status 404(or another status): your endpoint answered with a non-2xx status. The dashboard adds a likely cause and a fix.- A connection, DNS, TLS or timeout error: Surface couldn't reach your endpoint, or it didn't answer within 10 seconds. The URL has to be reachable from the internet.
If the delivery arrives but your signature check fails:
- Verify the raw request bytes. Verify the body exactly as it arrived, not a parsed and re-serialized copy.
- Use the profile's signing secret. The key is the signing secret, which starts with
whsec_. It isn't the credential you set under Auth type. - Re-copy the secret after rotating. If you rotated the secret, the old one stopped verifying at once.
See Webhooks.
My MCP client shows no Surface tools#
It depends on which server you connected:
- Hosted endpoint (
https://app.tendrl.com/surface/mcp): it needsAuthorization: Bearer <token>, or every call gets 401. It's POST-only JSON-RPC. If aurl-based client still can't connect, use the npx server instead. - npx server: install it by repository (
github:tendrl-inc-labs/surface-mcp), not by the bare npm name, which belongs to an unrelated package. SetSURFACE_KEYin itsenv. Without it, tool calls fail withSURFACE_KEY environment variable is required. Set it to your Surface API key. surface-scanner --mcp: setSURFACE_API_KEY(orSURFACE_KEY) in the server'senv. Without a key, the scanner starts, then exits withError: an API key is required., so the client sees the server drop. The account tools appear only when a key is set. A Free plan key starts the server, but every scan tool is refused withthe local scanner is not included on the Free plan.
See MCP Server.
The scanner binary won't update, or stops scanning#
- The key's role can't download updates. Update downloads need
scanner_updates:read, which the Scanner and Admin roles have and Analyst and Viewer don't. With the wrong role, the key still authenticates for scanning, but update checks fail with a 403. - Check the update log.
update.login the scanner's data directory (~/.surfaceby default, or wherever--data-dirpoints) records each check, for examplemanifest fetch failedwithmanifest fetch returned 403: …. - Updates are switched off.
--disable-updatesturns them off, and the scanner says so on startup. - Outbound HTTPS is blocked. The scanner needs to reach
app.tendrl.com. After 72 hours without a successful key check, it stops withAPI key has not been verified for … — reconnect to continue. - The key was revoked. If the server says the key isn't valid, the scanner stops at once with
this API key is not valid — check your account.
See Scanner Binary.
Still stuck?#
Include the requestId from the failing response when you report a problem. It identifies the exact request. Support is best-effort with no guaranteed response time; see Support.
Tendrl