Skip to main content
Every error response from the OneRep API has the same predictable shape regardless of what went wrong. You can always count on a JSON body with an error object containing a code and a human-readable message. Use the code field to drive your error-handling logic — the message is written for whoever is reading logs at 2 am and may be reworded in future releases without notice.
Always branch on error.code, never on error.message. Message strings can change; codes are stable.

Status codes and error codes

The table below covers every status code the API returns, the code value you will see in the response body, and a plain description of what triggered it.
Rate limits are per key, not per account. A single runaway script will not lock other keys — or you — out of the API.

Troubleshooting

Your key is wrong, revoked, or the Authorization header is missing the Bearer prefix. Double-check that your header looks exactly like:
Note the space after Bearer. If the key was recently revoked in Settings → API & MCP, mint a replacement — a revoked key cannot be recovered, since only its hash is stored.
You are using a read-only key against a POST route. The scope is fixed at creation time and cannot be changed after the fact. Mint a new Read & write key in Settings → API & MCP and use that instead.
Check the field name spelling carefully against the endpoint’s parameter table. A single character difference — for example "protien" instead of "protein" — returns this error instead of logging a zero. The API refuses all fields it will not read, so there are no silent typos.
Check the date. Every endpoint that accepts or defaults a date uses today in UTC. For users in timezones that are behind UTC, “today” in the app and “today in UTC” can be different calendar days for several hours around midnight. Always pass an explicit date parameter if you know the user’s local date.

Retry guidance

Not all errors are worth retrying. Follow this pattern to avoid duplicate writes or wasted budget:
  • Retry on 429 — wait the number of seconds in the Retry-After header, then try again.
  • Retry on 5xx — a server-side error may be transient.
  • Do not retry on 4xx (other than 429) — the request itself is the problem. Retrying an identical 400 or 403 will always produce the same result. Retrying a POST on a network timeout risks duplicate entries, because writes are not idempotent.