Limits and errors
This page lists the limits of the Studio endpoints (/studio/v1) and, for each error code, its cause, what to do and whether to retry. An error response is {"error": {"code", "message", "doc_url"}}; the message text may be in Chinese, so branch on code and never parse the text.
Limits
| Limit | Value | Notes |
|---|---|---|
| Items per list page | 1 to 100 | The page_size parameter; keep following next_page_token while an answer carries it. The draft list is not paged |
| Review rounds | max_rounds in the work’s review settings | Changed by a person in the organization |
| Draft property length | Depends on the genre, for example blog_article allows a title of 40 characters, an SEO title of 60 and an SEO description of 120 | Read props in GET /studio/v1/genres/{genre} |
| Total length | Depends on the genre, for example 2000 to 5000 characters for blog_article | A check (body_total_chars): a shortfall appears in the to-dos and does not refuse the write |
| One body write | Capped; over it returns BODY_TOO_LARGE | Split the write into block operations |
| Idempotency key | request_id on creating a work, a draft or a rendition | Resending the same value returns the first result |
Error codes
| Code | HTTP | Cause | What to do | Retry |
|---|---|---|---|---|
INVALID_PARAMS | 400 | A field is missing, malformed or not allowed (for example export without format) | Fix the named field and send again | No |
SLUG_TAKEN | 409 | The slug is used by another work in the organization, including a previously renamed one | Pick another slug, or omit it and let one be derived from the title | No |
DRAFT_KEY_TAKEN | 409 | Another draft of the work already uses that key | Pick another key, or omit it and let one be derived from the genre | No |
GENRE_NOT_FOUND | 404 | The key names no genre in the catalog | Read GET /studio/v1/genres and pass one of its keys exactly | No |
PLATFORM_NOT_FOUND | 404 | The platform key does not exist or lacks its version suffix | Read GET /studio/v1/platforms and pass a versioned key | No |
PLATFORM_GENRE_MISMATCH | 400 | The genre cannot produce that platform | Choose one from the platform list in the message | No |
PLATFORM_NOT_AVAILABLE | 400 | The platform is not open yet, such as publishing to an account | Use an export platform such as markdown@1 | No |
WORK_NOT_FOUND, DRAFT_NOT_FOUND, UNIT_NOT_FOUND, RENDITION_NOT_FOUND | 404 | The work, draft, unit or rendition in the path does not exist or belongs to another organization; details.suggestions carries up to three near matches | Use the slug, key, number or rnd_ id a list returns, or call GET /studio/v1/works:resolve?ref=… first | No |
UNIT_KIND_NOT_ALLOWED | 4xx | The genre does not allow that kind at that level | Read kinds and top_kinds in GET /studio/v1/genres/{genre} | No |
BLOCK_TYPE_NOT_ALLOWED | 4xx | The genre does not allow that block type | Use a type from the genre’s blocks list | No |
REVISION_CONFLICT | 409 | The expected_revision you sent is out of date and nothing was written; also returned when one rendition is rendered or exported twice at once | Re-read, merge the other change into yours and send again with the new revision; for a rendition conflict retry after a few seconds | Yes, after re-reading |
UNIT_IS_FINAL | 4xx | The unit is final and the write would change its intent, body or status | Send confirm_final_edit only when a person asked for that change | No |
BODY_TOO_LARGE | 413 | The submitted text exceeds the per-write body limit | Split the write into block operations on smaller parts (/units/{unit}/blocks:patch) | No |
RENDITION_NOT_RENDERED | 409 | The rendition has not finished rendering, or the requested part has no file (markdown@1 and text@1 produce none) | Call the render operation first; read parts[].text for text renditions | No |
RENDITION_STALE | 409 | The draft changed after the last render | Call the render operation, then export | No |
RENDITION_INVALID | 409 | Rendering found error-level issues | Fix the draft as issues says, render again, then export | No |
DRAFT_NOT_READY | 409 | The draft sent for review still has units without a body or fails a hard check | Finish the bodies and fix the checks, then send again | No |
REVIEW_IN_PROGRESS, REVIEW_ROUND_LIMIT, NO_REVIEWERS | 409 | A round is already running; the work has used its max_rounds; the reviewer roster has nobody of the requested kind | Wait for the round to decide; a person in the organization changes the settings or adds a reviewer | No |
PERMISSION_DENIED | 403 | An agent called an operation reserved for people in the organization: the reviewer roster, review settings or cancelling a round | Report what needs to change to the person who owns the work | No |
Every write answers with checks, the results for what you just wrote: a check with ok: false and hard: true blocks sending for review, while hard: false is only a warning.