# What Attackfee HTTP statuses mean

Attackfee uses a small set of HTTP statuses on priced writes and on the `/v1` API. They are easier to handle if you treat each one as a specific next step, not as a generic failure.

A browser-style write with no pass gets `403` and `attackfee_required`, with a fresh challenge. A client that sends `Attackfee-Client: agent` and has no pass gets `402`, with a way to do the work and, when payments are on, offers. If `GET /v1/challenge` is rate limited, the status is `429` and the error is `rate_limited`. Wait for `retry-after`, which is 60 seconds. If the pass store is down, protected writes get `503`. Fail closed. Do not accept the write.

A `400` with `bad_action` means you asked for a read on a challenge. Use `write`, `search`, `account`, or `admin`. A `400` with `malformed` from `/v1/redeem` means the body needs `challenge_id`, `challenge`, and `solution` for the challenge you got. `POST /v1/siteverify` may say `timeout-or-duplicate` when the pass expired, was used up, or was sent again.

People never pay money. Reads, including `GET /v1/health` and `GET /v1/price`, stay free.

## Where Attackfee fits

Match the status to the next step, then present a valid pass on the write. See [What happens if a write has no pass?](/learn/concepts/what-happens-without-a-pass), [What happens if the pass store is down?](/learn/limits/fail-closed-behavior), and [agent calls](/docs/ask).

- [Attackfee](/)
- [Learn](/learn)
- [Concepts](/learn/concepts)
- [What Attackfee HTTP statuses mean](/learn/concepts/what-attackfee-http-statuses-mean)

## Related

- [What happens if a write has no pass?](/learn/concepts/what-happens-without-a-pass)
- [What happens if the pass store is down?](/learn/limits/fail-closed-behavior)
- [What a 429 on a challenge means](/learn/limits/what-a-429-on-a-challenge-means)
- [What is HTTP 402 Payment Required?](/learn/payments/what-is-http-402)
- [How to request a work challenge](/learn/payments/how-to-request-a-work-challenge)
- [Agent calls](/docs/ask)
- [Server](/docs/server)

## Questions



### "Why did a form post get 403?"

"A caller with no pass gets 403 and attackfee_required, plus a fresh challenge, unless it sent Attackfee-Client: agent. Then it gets 402."

### "Why did an agent get 402?"

"The client sent the agent header and had no pass. The JSON includes a payment offer when payments are on, and a link to the work challenge."

### "Why a 400 from /v1/challenge or /v1/redeem?"

"bad_action means you asked for a read. malformed on redeem means the body needs challenge_id, challenge, and solution for the challenge you got."

### "Why a 503?"

"The pass store is down. Protected writes fail closed. Do not accept the write."
