Skip to main content

Errors and pagination

Error shape​

Every JSON error has the same base shape:

{
"error": "invalid_request",
"message": "confirmPublic: Public publishing requires explicit confirmation.",
"docs_url": "https://docs.opendocs.cc/errors#invalid-request"
}
  • error is a stable code to branch on.
  • message says what to do next. Routes that don't write one get a default (the code in words), so it's never empty.
  • docs_url links to the code on the error code reference. The anchor is the code with _ replaced by -.

Some errors add fields:

CodeExtra fields
invalid_requestissues: Zod's flattened formErrors and fieldErrors. message summarizes the first three issues
document_limitplan, limit, used; batch adds requested, workspaceId
version_conflictcurrentVersionNumber, baseVersionNumber, currentVersionCreatedAt
plan_requiredtier
plan_limit, member_limitplan, limit
low_contrastcontrast, minContrast
invalid_preset / invalid_font (branding)presets / fonts
domain_mismatchdomain, yourDomain
destination_not_founddestination, destinations
approval_requiredapproveUrl
signer_roles_mismatchroles
already_sent, not_completedstatus
project_not_emptypostCount

Account deletion's 409 is the exception: its body has code instead of error (see Account API).

Status codes by area​

The full list with fixes is on Error codes.

StatusError codesWhere
400invalid_requestAny route that validates its body or query, and any body that isn't valid JSON
400publish_failed, reserved_slugPOST /publish, POST /publish/batch (per document)
400update_failed, unpublish_failed, visibility_change_failed, invalid_visibility, tag_update_failed, delete_failed, move_failed, restore_failed, share_failed, unshare_failedPost mutation routes
400missing_workspace_idRoutes that take ?workspaceId= (team lists, branding, auto-join, integrations, signature requests) and the logo upload form
400onboarding_failed, invalid_username, reserved_username, no_usernameOnboarding and username rename
400invalid_code, code_expiredPOST /auth/code/verify
400invalid_slug, default_project, project_not_empty, confirmation_mismatchWorkspaces and projects
400invite_limit, invalid_domain, consumer_domainTeam and auto-join
400invalid_color, low_contrast, invalid_preset, invalid_font, invalid_footer, nothing_to_change, invalid_inputBranding
400missing_file, empty_file, unsupported_mimeUploads and the free converter
400confirmation_required, invalid_signers, signer_roles_mismatch, invalid_expiry, invalid_kind, invalid_payloadSignature requests
401unauthorizedEvery protected route; the DocuSeal webhook
402billing_failedJoining a Team workspace when the seat count couldn't be updated
403forbiddenNot a member, or your role can't do this
403document_limitPublishing or claiming past the Free cap
403plan_limit, member_limitCreating a workspace, inviting or joining past the plan's cap
403plan_required, docx_requires_proPro features on a Free workspace
403signups_disabled, email_not_verified, domain_mismatch, invalid_claim_token, approval_requiredSee Error codes
403hiddenUpdating or claiming an anonymous document that readers reported, while it's under review
404not_found, project_not_found, version_not_found, no_accessible_posts, destination_not_found, not_availableLookups. Many routes answer 404 instead of 403 so they don't reveal what exists
409version_conflictPOST /posts/:postId/update with a stale baseVersionNumber
409slug_taken, last_workspace, already_member, already_invited, owner_cannot_leave, username_taken, onboarding_incompleteWorkspaces, team, accounts
409integration_not_connected, reconnect_required, destination_unavailable, already_sent, already_completed, not_completedIntegrations
409code: active_plan, code: team_workspace_with_membersDELETE /account
410expiredAnonymous documents and invitations past their expiry
413payload_too_largeRequest bodies over 2 MB, or 32 MB for POST /publish/batch
413file_too_largeAvatar, logo and free-converter uploads over 2 MB
429rate_limited, too_many_attemptsRate limits; five wrong sign-in codes
500internal_errorUnexpected errors
502export_failed, conversion_failed, storage_failed, send_failed, cancel_failed, provider_failedThe converter, Google Drive or DocuSeal failed
503service_busyThe free converter or anonymous publishing is at its limit across all clients; wait Retry-After seconds
503storage_not_configured, integrations_not_configuredThe server is missing configuration
504export_timeoutThe converter didn't answer within 55 seconds

The converter errors (502 export_failed, 504 export_timeout) are the same for exports, Drive saves and signature drafts.

The document_limit error​

Returned with 403 when a publish would take a workspace past its plan's document cap (Free: 50 published documents per workspace):

{
"error": "document_limit",
"plan": "free",
"limit": 50,
"used": 50,
"message": "Your free plan allows 50 published documents. You currently have 50.",
"docs_url": "https://docs.opendocs.cc/errors#document-limit"
}

The batch version (POST /publish/batch) adds requested and workspaceId:

{
"error": "document_limit",
"plan": "free",
"limit": 50,
"used": 48,
"requested": 3,
"workspaceId": "ws_123",
"message": "This batch would publish 3 documents, but your free plan allows 50 total. You have 2 slots left."
}

The batch check runs before anything is written: if the cap would be exceeded, no document in the batch is published. Show message to the person as is. See Plans and limits.

Rate limits​

Signed-in routes count per account, so teammates behind one office address don't share a bucket. Unauthenticated routes count per IP. Every request also counts toward the per-IP general limit. The signed-in limits are sized so an agent can republish and re-export a folder of 50+ long documents in one run.

Route groupLimitCounted per
All API traffic600 requests a minuteIP
POST /publish120 a minuteAccount
POST /publish/batch (up to 25 documents each)20 a minuteAccount
POST /posts/:postId/export/:format, plus the integration routes that render or fetch files (Drive saves, signature drafts, signature PDF downloads, filing signed copies)120 a minute, sharedAccount
POST /posts/batch/export (up to 10 documents each)30 a minuteAccount
Exports running at the same time (single and batch)4Account
POST /auth/code/request5 every 15 minutesIP
POST /auth/code/verify20 every 15 minutesIP
POST /anonymous/publish and PUT /anonymous/:id20 an hour, sharedIP
POST /anonymous/publish (new documents)50 a dayIP
POST /anonymous/:id/report5 an hour and 20 a dayIP
Public download (POST /public/posts/.../export/:format)60 a minuteIP
Public raw Markdown (GET /public/posts/.../raw)120 a minuteIP
Public workspace zip (GET /public/workspaces/:slug/markdown.zip)3 a minuteIP
Free converter (POST /tools/convert/pdf|docx)5 a minute, 30 an hour and 100 a dayIP
Browser sign-in (POST /api/auth/*, used by the dashboard)100 every 15 minutesIP

Per-IP limits count an IPv6 client by its /56 prefix.

The free converter and anonymous publishing also have ceilings across all clients, so a flood from many addresses can't crowd out everyone else: 30 conversions a minute and 600 an hour; 60 new anonymous documents a minute, 1,000 an hour and 5,000 a day. Only successful requests count. Over a ceiling you get 503 service_busy with Retry-After; signed-in publishing and exports aren't affected.

When a limit is hit you get 429:

{
"error": "rate_limited",
"message": "Too many publish requests. Try again later.",
"docs_url": "https://docs.opendocs.cc/errors#rate-limited"
}

The response carries Retry-After (seconds to wait; 2 for the concurrent export limit) and RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and RateLimit-Policy headers. The CLI waits and retries for you (0.4.6 and later), so a large publish or export slows down instead of failing.

Pagination​

GET /api/v1/posts is the only paginated endpoint:

{
"posts": [],
"pagination": {
"page": 1,
"limit": 20,
"total": 42,
"totalPages": 3
}
}
  • page defaults to 1.
  • limit defaults to 20; values above 100 are treated as 100.
  • Results are ordered by updatedAt, newest first.

Other lists return everything in one response, except GET /signature-requests, which returns the newest 50.

Practical guidance​

  • Use modest limit values unless you need bigger pages.
  • Call GET /api/v1/posts to find a postId before POST /posts/:postId/update.
  • On 403 document_limit, show the message to the person; it's written for them.
  • On 429, wait Retry-After seconds and retry the same request.