Skip to main content
The Lettr API uses standard HTTP status codes in every response. When viewing API Logs, you can filter by status code to quickly find successful requests or errors.

Success (2xx)

CodeNameWhen you’ll see it
200OKSuccessful GET, PATCH, or DELETE requests. The response body contains the requested or updated resource.
201CreatedSuccessful POST requests that create a resource (e.g. sending an email, creating a domain). The response body contains the new resource.
204No ContentSuccessful DELETE requests with no response body.

Client errors (4xx)

These indicate a problem with the request (missing or invalid API key, bad parameters, or missing resource).
CodeNameCauseWhat to do
400Bad RequestInvalid request format, malformed JSON, or invalid parameters.Check the response body for an error message and fix your request.
401UnauthorizedMissing API key or invalid API key.Ensure the Authorization: Bearer <api_key> header is set with a valid API key.
403ForbiddenAPI key is valid but does not have permission for this action.Use an API key with the required permissions or create a new key.
404Not FoundThe requested resource does not exist (e.g. wrong domain name, email ID, or template slug).Verify the ID or identifier in the URL path.
409ConflictResource already exists or state conflict (e.g. domain already added).Check the response message; you may need to use a different identifier or update the existing resource.
422Unprocessable ContentRequest body failed validation (e.g. invalid email address, missing required field).The response includes an errors object with field-level messages. Fix the listed fields and retry.
429Too Many RequestsRate limit exceeded.Retry after the time indicated in the Retry-After header. See rate limits.
451Unavailable For Legal ReasonsRequest blocked for legal or compliance reasons.Contact support if you believe this is in error.

Server errors (5xx)

These indicate a temporary problem on Lettr’s side. Retrying later usually succeeds.
CodeNameWhen you’ll see it
500Internal Server ErrorAn unexpected server error occurred.
502Bad GatewayThe server received an invalid response from an upstream service.
503Service UnavailableThe service is temporarily overloaded or in maintenance.
In the Logs dashboard, filter by 4xx or 5xx to quickly find failed requests and debug integration issues.

Next steps