Errors and limits¶
Every error is JSON (a common kind of text data). Most carry a detail that a person can read; where an agent needs to
choose what to do from the cause, there is also a code that does not change.
| Status | code |
Meaning | What to do |
|---|---|---|---|
400 |
— | The request body is not correct; the answer names each field that failed | Fix the named fields and send again |
400 |
— | A lesson change did not send updated_at |
Read the lesson, send its updated_at with your change |
401 |
— | No key, or the key is unknown, turned off, or past its last day (Authentication credentials were not provided.) |
Check the Authorization header; ask for a new key |
401 |
subscription_inactive |
The organisation has no active paid plan | A person must pay for a plan |
401 |
org_unverified |
The organisation has not completed verification | A person must finish sign-up |
403 |
— | The key's permission for this area is too low | Ask for view or edit on that area (permissions) |
403 |
course_limit |
Creating a course would go over the plan's course limit; detail says by how much |
Archive a finished course, or a person moves to a larger plan |
402 |
storage_quota_exceeded |
A file would go over the storage you have; next_action holds a link for a person |
A person adds storage |
403 |
free_courses_only |
The organisation is in the alpha, which can only make free courses; next_action holds a link |
Set the price to 0, or a person moves to a paid plan |
403 |
payments_not_connected |
Stripe payment is not ready; next_action says how to finish |
Send the link to a person |
409 |
launch_blocked |
The course cannot go live yet; blockers lists each reason and nothing was changed |
Fix each blocker, then launch again |
410 |
already_claimed |
The key for this connect link was already collected | Ask for a new connect link |
404 |
— | Nothing with that ID in this key's organisation | Check the ID; keys only ever see their own organisation |
409 |
stale_lesson |
The lesson changed since you read it; lesson holds the current version |
Make your change again to lesson and send it again with its updated_at |
429 |
— | Rate limit reached | Wait Retry-After seconds |
Many answers also carry a next_action. It is either {"kind": "call", "endpoint": …} (the agent
can do it) or {"kind": "human_url", "url": …} (only a person can: give them the link).
Limits¶
- 300 requests per hour per key. Each key has its own limit.
- Plan limits apply exactly as in the web app — for example, the number of courses
on your plan. Creating one past the limit is refused with
403 course_limit. - Keys can stop working on a set day. If a person set a last day for the key, it stops working on that
date with
401.