Skip to content
>devspeak
← glossary
level 5APIs & Communication

Status code

also: status codes, http status, http status code, response code

A three-digit number a server sends back with every response to say how it went. 200 means OK, 404 means not found, 500 means the server broke.

a bit more technical

The numeric result of an HTTP response. 2xx is success (200 OK, 201 Created). 3xx is a redirect. 4xx is a problem with the request (400 bad request, 401 not logged in, 403 not allowed, 404 not found, 429 too many requests). 5xx is a server failure (500, 503).

picture it

Parcel tracking labels: "Delivered", "Wrong address", "Recipient not authorized", "Depot closed". One glance tells you whether the problem is at your end or theirs.

why it matters

The status code is the fastest clue in debugging. 4xx usually means the request was wrong or not allowed; 5xx means the server failed. Telling your agent the exact code saves a lot of guessing.

what your agent might say
agent
The endpoint returns 403, not 401, so the user is logged in but lacks permission. The role check is rejecting editors.
how you might use it
you → your agent
Return 404 when a recipe doesn't exist and 403 when it belongs to someone else, instead of a generic 500 for everything.
common mistake

Thinking every error code means the server is broken. Codes in the 400s usually mean the request was the problem, like a wrong URL or a missing login.

builds on