HTTP status codes
| Status | Meaning | Action |
|---|---|---|
400 | Bad request — validation error, invalid parameters | Fix the request |
401 | Invalid, expired, or missing API key | Check your API key |
403 | Missing required scope | Add the needed scope to your API key |
404 | Resource not found or not in your org | Verify the ID |
409 | Conflict — max attempts, duplicate webhook, etc. | Check business logic constraints |
422 | Grading failed — invalid answer format | Check answer structure matches question type |
429 | Rate limit exceeded | Wait for Retry-After seconds, then retry |
500 | Internal server error | Retry after a short delay |
Retry strategies
For transient errors (429, 500, 502, 503, 504):
Production security checklist
Before going live, verify each item:API key is server-side only
API key is server-side only
Never expose
edp_live_ keys to the browser or commit them to version control. Use environment variables.Embed tokens for browser
Embed tokens for browser
Use
POST /embed/token to mint short-lived tokens for browser-side rendering. These expire in 1 hour and are single-use.Webhook signatures verified
Webhook signatures verified
Reject any incoming webhook that fails HMAC-SHA256 verification. Use
timingSafeEqual to prevent timing attacks.Minimum scopes
Minimum scopes
Each API key has only the scopes it needs. A key that only reads data should not have
write:submissions.Allowed Origins configured
Allowed Origins configured
Only your production domains are in the embed allow list. Remove localhost/staging before launch.
learner_ref is server-generated
learner_ref is server-generated
Never let the client construct or choose the
learner_ref. Always generate it server-side from your auth session.Idempotent webhook handlers
Idempotent webhook handlers
Duplicate events do not cause duplicate records. Check
submission_id uniqueness before writing.Rate limiting handled
Rate limiting handled
Your code respects
Retry-After headers and backs off on 429 responses.No answer keys expected
No answer keys expected
API responses never contain answer keys. Feedback contains only correctness signals — do not attempt to reverse-engineer correct answers from it.
HTTPS in production
HTTPS in production
Webhook URLs must use HTTPS. HTTP is only permitted for
localhost during development.