Errors
Every error code the RamenID API returns, what causes it and what to do.
Errors return a non-2xx status and this body:
{ "error": "unauthorized", "message": "This API key is invalid or was revoked." }error is stable; use it in your code. message is for people and may change.
| Status | error | Message | What to do |
|---|---|---|---|
| 400 | invalid_body | Send JSON like {"email": "student@school.edu"}. | Send exactly one field, email, with a valid address |
| 400 | invalid_body | The link id must be a UUID. | Use the id from Create a link, not the code in the URL |
| 401 | unauthorized | Send your API key as Authorization: Bearer rmn_live_... | Add the header; check for extra spaces or a cut-off key |
| 401 | unauthorized | This API key is invalid or was revoked. | Create a new key in the dashboard |
| 403 | wrong_workspace | This API key does not belong to the workspace "acme". | Use your current workspace address from Settings → Links |
| 404 | not_found | No link with that id in this workspace. | Check the id, and that you use the same workspace that created it |
| 409 | discount_off | The discount set for API links is turned off. Enable it or change it in Settings. | Turn the rule back on, or choose another rule or verification only |
| 500 | server_error | Something went wrong on our side. Try again in a moment. | Retry with a short backoff. The body includes "retryable": true |
Retrying
- Retry
500responses, waiting a little longer each time. - Do not retry
4xxresponses unchanged; fix the request first. - Creating a link is not idempotent: retrying a request that actually succeeded creates a second link. That is harmless (unused links simply expire), but send the student only the one you keep.
Errors students see
Problems such as an unrecognised school, a wrong code or a plan limit are shown to the student on the page, not returned by the API. See The student experience.