Understanding responses, error handling, and status codes for every Partner API endpoint. Designed for easy parsing by OpenClaw agents, Claude Code, and any programmatic integration.
Envelope Structure
All endpoints return the same typed envelope so you can branch onok once and stay type-safe everywhere else.
Indicates success (
true) or failure (false).Mirrors the HTTP status code returned by the endpoint.
Human-readable context for logs or UI surfaces.
Present only when
ok is true. Contains the payload documented for each
endpoint.Optional machine-friendly identifier for failures (e.g.,
invalid_token,
subscription_required).When
ok is true, data is guaranteed to exist. When ok is false,
data is omitted, so you can rely on that distinction for strict typing in
TypeScript, Swift, or Go clients.Sample Handling
Common Status Codes
| Code | Meaning | Notes |
|---|---|---|
200 | Success | Returned for GET/PATCH requests, POST /posts/retry, and idempotent POST /posts replays that return an existing post instead of creating a new one. |
201 | Created | Returned by fresh create-style requests such as POST /posts, POST /slideshows/generate, POST /packs, POST /packs/:pack_id/images, POST /templates, POST /templates/from-slideshow/:slideshow_id, and POST /slideshows/:slideshow_id/duplicate. |
202 | Accepted | Returned for async-start endpoints such as POST /studio/videos/generate. |
400 | Bad Request | Missing/invalid parameters, unreachable media URLs, etc. |
401 | Unauthorized | API key missing, malformed, or revoked. |
402 | Subscription Required | Active Creator, Professional, or Business subscription is required. |
403 | Forbidden | Tier or scope denied (e.g., tier_not_allowed for Scheduler). |
404 | Not Found | Resource doesn’t exist in the authenticated key scope. |
422 | Unprocessable Entity | JSON body parsed but failed schema validation (invalid payload). |
429 | Too Many Requests | Back off-respect concurrency guidance (3–10 requests at a time). |
500 | Internal Server Error | Rare; retry with exponential backoff and contact support if needed. |
Handling 422 invalid_payload
When payload validation fails at the schema/shape layer, Partner API returns 422 with schema-level and field-level details. Account-aware rules that require resolved account metadata (for example a caption that is valid for Facebook but too long for a selected Pinterest account) surface later as 400 validation_failed. Unsupported platform-specific objects such as facebook, instagram, linkedin, and youtube are rejected here because Partner API currently supports only tiktok and pinterest settings objects.
- Detect
code === 422anderror_code === "invalid_payload". - Read both
issues.formErrorsandissues.fieldErrors. - Fix field shape/data and retry.
- Do not retry unchanged payloads.
