GTM Engineering term, automation and APIs

HTTP Status Codes

HTTP status codes are three-digit numbers a server returns with every web or API response to say whether the request succeeded, was redirected, or failed and why.

Also called: HTTP status, HTTP status codes, 404, 500 error, response codes, status code

HTTP Status Codes sits under every stage: it's part of the data and systems the whole funnel runs on, near related terms like API Endpoint, 404 Error and 301 Redirect (the blue squares).

HTTP status codes are three-digit numbers a server sends back with every response. They say whether a request worked, moved or failed, and roughly why. Browsers, search engine crawlers and API clients all read them. For GTM teams, they matter in two places: website health for SEO, and API calls inside automations. Most broken workflows announce themselves with a status code first.

How it works

The first digit tells you the class:

  • 2xx, success: 200 OK, 201 Created, 204 No Content.
  • 3xx, redirection: 301 Moved Permanently, 302 Found (temporary), 304 Not Modified.
  • 4xx, client error: the request was wrong. 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 410 Gone, 422 Unprocessable, 429 Too Many Requests.
  • 5xx, server error: the server failed. 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout.

On websites, crawlers use codes to decide what to index. A 301 redirect passes a page's signals to its new address. A 404 error tells crawlers the page is gone. A redirect chain, with several hops, slows crawling and leaks value.

In APIs, codes tell your workflow what to do next. A 201 means the record was created. A 401 means the token expired. A 429 means you hit the API rate limit and should wait. A 5xx means try again later. Good error handling branches on these codes instead of treating every failure the same.

Example

A nightly sync pushes 5,000 updated accounts to a CRM (all numbers hypothetical). The run log shows:

Status Count Meaning Right response
200 4,712 Updated None
404 96 Record deleted in CRM Flag, do not retry
422 140 Invalid value, bad picklist option Fix mapping, then rerun
429 38 Rate limited Wait and retry
503 14 CRM briefly unavailable Retry with backoff

The first version of the sync retried everything five times. It hammered the 404s and 422s that could never succeed, which pushed more calls into rate limits. Splitting by code fixed it. Retry only 429 and 5xx, with increasing waits. Log and alert on 4xx. The 140 picklist errors pointed to a new country value that nobody had added in the CRM.

By company size

Small business: Status codes show up after a website redesign. Old links return 404, and search traffic dips. A redirect plan that maps old pages to new ones with 301s prevents most of it. Check search console reports for errors after any change.

Mid-market: Marketing ops audits site status codes during migrations and monitors 404s and redirect chains monthly. GTM engineers log status codes on every API call and alert on unusual spikes, like a sudden wall of 401s after a password change.

Enterprise: Thousands of pages and dozens of integrations mean codes are monitored automatically. Dashboards track error rates by endpoint, synthetic checks hit key pages, and on-call rotations respond to 5xx spikes on revenue-critical systems.

Status codes vs error messages

The status code is the category. The response body usually holds the detail, like "Property 'country' value 'UK' is not a valid option." Always log both. The code tells your workflow what to do. The message tells a human what to fix.

Why it matters for GTM teams

Silent failures are the most expensive kind. A form integration returning 401 for a week means a week of leads that never reached the CRM. We'd log every status code in every automation, branch logic on the class of code, retry only what can succeed with retry logic that backs off, and alert a human on unusual 4xx or 5xx volume. On the website side, we'd check codes after every launch and migration.

Common mistakes

  • Treating any non-error response as success without checking the code.
  • Retrying 4xx errors that will never succeed.
  • Using 302 for permanent URL changes.
  • Returning 200 on "page not found" screens, creating soft 404s.
  • Chaining redirects through three or four hops after repeated migrations.
  • Logging the code but not the response message.

FAQ

What is the difference between a 301 and a 302 redirect?

A 301 says a page has moved permanently, so search engines should transfer signals to the new address and update their index. A 302 says the move is temporary, so the old address may stay indexed. Use 301 for migrations and URL changes, and 302 only for genuinely temporary moves.

Should I retry an API call that returns an error?

Retry server errors in the 500 range and 429 rate limit responses, with increasing waits between attempts and a cap on tries. Do not retry most 400-range errors like 400, 401, 403 or 404, because the request itself is wrong and will fail again until you fix it.

Is a soft 404 the same as a 404?

No. A soft 404 is a page that shows a not-found or empty message but returns a 200 success code. Search engines may flag it as low quality or wasted crawl. Real missing pages should return a 404 or 410 so crawlers and tools understand them.

See all automation and APIs terms ↳