Upload a binary image or video file into a workspace’s MEDIA library.
Use this for actual image/video bytes (multipart upload). To create a
markdown/text document instead, use create_library_file. The returned
media asset can be attached to a document via attach_media_to_file and
used in post generation.
Send an Idempotency-Key header to make a retry safe (a resend of the same
file returns the original media asset instead of uploading a duplicate).
Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically
optimized. Max size: 20 MB for images, 500 MB for video.
Errors:
400 invalid_value: The business_id is not a valid UUID.
401 authentication_required: API key or token is missing, invalid, or revoked.
403 permission_denied: Your plan does not include API access, or this workspace is not in your org.
404 resource_not_found: No workspace with that ID exists.
413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video).
422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file.
429 rate_limit_exceeded: You sent too many requests this minute.
Bearer an mk_live_ API key. A key is ORG-SCOPED: it grants full access to every resource in that organization, with no per-endpoint scoping (see the uid pseudo-permission on each operation). Manage keys at https://app.mymarky.ai.
Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422.
Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-11-03) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.
Optional hint about the media: an address, a name, anything the picture can't show. Stored as source_alt_text; alt_text is written by looking at the image itself shortly after upload.
What an upload route returns: the new media, plus what the caller should know.
A subclass rather than new fields on MediaResponse, because MediaResponse is
also every library READ. source_alt_text and warnings only mean something
at the moment of upload, when the agent can still act on them.
Non-blocking notes about this media, empty when there is nothing to say. low_resolution means the long edge is under 1080px, so it will look soft on most feeds; tell the user and prefer a larger copy.
The alt_text you sent, kept as a hint. alt_text is written a few seconds after upload by looking at the image itself, so it is empty in this response. Search results show that description.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Marky API","colors":{"primary":"#6366f1","light":"#818cf8","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/marky-2d226b8c/Z6-NzY89vZC-JBeX/logo/logo.png?fit=max\u0026auto=format\u0026n=Z6-NzY89vZC-JBeX\u0026q=85\u0026s=a7ccd17d02af75ecb6ba720fd9abdef3","dark":"https://mintcdn.com/marky-2d226b8c/Z6-NzY89vZC-JBeX/logo/logo.png?fit=max\u0026auto=format\u0026n=Z6-NzY89vZC-JBeX\u0026q=85\u0026s=a7ccd17d02af75ecb6ba720fd9abdef3"},"favicon":"https://mintcdn.com/marky-2d226b8c/Z6-NzY89vZC-JBeX/favicon.png?fit=max\u0026auto=format\u0026n=Z6-NzY89vZC-JBeX\u0026q=85\u0026s=947c745723cff1b66415bec8af31fcda","api":{"playground":{"display":"interactive"},"examples":{"prefill":false}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"marky-2d226b8c","hasAudioNarration":false,"actualSubdomain":"marky-2d226b8c","customDomains":["docs.mymarky.ai"],"gitSource":{"type":"github","owner":"marky-team","repo":"fast-backend","deployBranch":"main","contentDirectory":"guides","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea2c0e98fdbb3061a05f93","collectionId":"b3a30ff4-60d8-4ffc-a856-9cbaf971bca7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea2c0e98fdbb3061a05f93"},"entitlements":{},"buildId":"6aea2c0e98fdbb3061a05f93","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"API Reference","count":48},{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"Getting Started","count":11},{"language":"default","tag":"Integrations","count":8},{"language":"default","tag":"Posts","count":7},{"language":"default","tag":"Files","count":6},{"language":"default","tag":"Workspaces","count":5},{"language":"default","tag":"Folders","count":5},{"language":"default","tag":"Topics","count":5},{"language":"default","tag":"Webhooks","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/upload-media","slug":"/api-reference/upload-media","pageMetadata":{"title":"Upload media","openapi":"public-openapi.json post /api/businesses/{business_id}/media","description":"Upload a binary image or video file into a workspace's MEDIA library.\n\nUse this for actual image/video bytes (multipart upload). To create a\nmarkdown/text document instead, use `create_library_file`. The returned\nmedia asset can be attached to a document via `attach_media_to_file` and\nused in post generation.\n\nSend an `Idempotency-Key` header to make a retry safe (a resend of the same\nfile returns the original media asset instead of uploading a duplicate).\n\nSupported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically\noptimized. Max size: 20 MB for images, 500 MB for video.\n\nErrors:\n 400 invalid_value: The business_id is not a valid UUID.\n 401 authentication_required: API key or token is missing, invalid, or revoked.\n 403 permission_denied: Your plan does not include API access, or this workspace is not in your org.\n 404 resource_not_found: No workspace with that ID exists.\n 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video).\n 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file.\n 429 rate_limit_exceeded: You sent too many requests this minute.","href":"/api-reference/upload-media"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Upload a binary image or video file into a workspace’s MEDIA library.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use this for actual image/video bytes (multipart upload). To create a\\nmarkdown/text document instead, use \", _jsx(_components.code, {\n children: \"create_library_file\"\n }), \". The returned\\nmedia asset can be attached to a document via \", _jsx(_components.code, {\n children: \"attach_media_to_file\"\n }), \" and\\nused in post generation.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" header to make a retry safe (a resend of the same\\nfile returns the original media asset instead of uploading a duplicate).\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically\\noptimized. Max size: 20 MB for images, 500 MB for video.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Errors:\\n400 invalid_value: The business_id is not a valid UUID.\\n401 authentication_required: API key or token is missing, invalid, or revoked.\\n403 permission_denied: Your plan does not include API access, or this workspace is not in your org.\\n404 resource_not_found: No workspace with that ID exists.\\n413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video).\\n422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file.\\n429 rate_limit_exceeded: You sent too many requests this minute.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upload media","openapi":"public-openapi.json post /api/businesses/{business_id}/media","description":"Upload a binary image or video file into a workspace's MEDIA library.\n\nUse this for actual image/video bytes (multipart upload). To create a\nmarkdown/text document instead, use `create_library_file`. The returned\nmedia asset can be attached to a document via `attach_media_to_file` and\nused in post generation.\n\nSend an `Idempotency-Key` header to make a retry safe (a resend of the same\nfile returns the original media asset instead of uploading a duplicate).\n\nSupported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically\noptimized. Max size: 20 MB for images, 500 MB for video.\n\nErrors:\n 400 invalid_value: The business_id is not a valid UUID.\n 401 authentication_required: API key or token is missing, invalid, or revoked.\n 403 permission_denied: Your plan does not include API access, or this workspace is not in your org.\n 404 resource_not_found: No workspace with that ID exists.\n 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video).\n 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file.\n 429 rate_limit_exceeded: You sent too many requests this minute.","href":"/api-reference/upload-media"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["library"],"summary":"Upload media","description":"Upload a binary image or video file into a workspace's MEDIA library.\n\nUse this for actual image/video bytes (multipart upload). To create a\nmarkdown/text document instead, use `create_library_file`. The returned\nmedia asset can be attached to a document via `attach_media_to_file` and\nused in post generation.\n\nSend an `Idempotency-Key` header to make a retry safe (a resend of the same\nfile returns the original media asset instead of uploading a duplicate).\n\nSupported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically\noptimized. Max size: 20 MB for images, 500 MB for video.\n\nErrors:\n 400 invalid_value: The business_id is not a valid UUID.\n 401 authentication_required: API key or token is missing, invalid, or revoked.\n 403 permission_denied: Your plan does not include API access, or this workspace is not in your org.\n 404 resource_not_found: No workspace with that ID exists.\n 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video).\n 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file.\n 429 rate_limit_exceeded: You sent too many requests this minute.","operationId":"upload_media","security":["9db175c4-f924-4f06-a570-d49a819904b9"],"parameters":["0548202a-e17b-42cd-baf0-07c9c940cbfc","74bf9bab-4fc5-43a1-9837-c6f922ee1ff2","7a30d4e0-949a-4a04-a7ef-d52980898b8f","4bf24a65-2904-4bb1-96f0-662c871331fd"],"requestBody":"eb497f2f-7c7a-4661-a628-f328352704fb","responses":{"201":"8238cd4d-be97-4eff-9afd-fe204e35c1bf","400":"b0f1fdfe-056f-4c86-8a03-419d5282b84a","401":"d5cead31-2af2-466f-9035-ae113a6b5ead","403":"a3a195df-e6fd-46bf-8e2e-b2683e2f6668","404":"384ab9ce-fcdf-473f-8d11-dbb6683a15c5","409":"e9e07436-f0bd-41ec-bf0b-dae661879624","422":"03dbe6c8-c3da-40a0-b957-9736d6072de7","429":"c39c98f3-ea58-44d3-83ff-6d341b02a8b9","500":"8b145ff8-8d6c-4d40-bc22-47c593b72d7d"},"method":"post","type":"path","servers":["09d2689e-ff2e-4792-a0cf-48865ead84da"],"path":"/api/businesses/{business_id}/media","baseUrlOptions":["https://api.mymarky.ai"],"title":"Upload media","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"0548202a-e17b-42cd-baf0-07c9c940cbfc":{"name":"business_id","in":"path","required":true,"schema":{"type":"string","description":"The workspace ID (a UUID from list_workspaces). Named business_id for backward compatibility; workspaces were called businesses.","title":"Business Id","isRequired":true,"uniqueKey":"","typeLabel":"string"},"description":"The workspace ID (a UUID from list_workspaces). Named business_id for backward compatibility; workspaces were called businesses."},"74bf9bab-4fc5-43a1-9837-c6f922ee1ff2":{"name":"alt_text","in":"query","required":false,"schema":{"oneOf":[{"type":"string","title":"Alt Text","description":"Optional hint about the media: an address, a name, anything the picture can't show. Stored as `source_alt_text`; `alt_text` is written by looking at the image itself shortly after upload.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Alt Text","description":"Optional hint about the media: an address, a name, anything the picture can't show. Stored as `source_alt_text`; `alt_text` is written by looking at the image itself shortly after upload.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"},"description":"Optional hint about the media: an address, a name, anything the picture can't show. Stored as `source_alt_text`; `alt_text` is written by looking at the image itself shortly after upload."},"7a30d4e0-949a-4a04-a7ef-d52980898b8f":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"oneOf":[{"type":"string","title":"Idempotency-Key","description":"Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Idempotency-Key","description":"Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"},"description":"Optional. Send a unique value (e.g. a UUID) to make this create request safe to retry. A repeat with the same key returns the original response instead of creating a duplicate. Cached for 24h, scoped to your org. Reusing a key with a different body returns 422."},"4bf24a65-2904-4bb1-96f0-662c871331fd":{"name":"Marky-Version","in":"header","required":false,"schema":{"type":"string","enum":["2026-04-08","2026-07-17","2026-08-02","2026-08-04","2026-08-06","2026-10-30","2026-10-31","2026-11-03"],"example":"2026-11-03","isRequired":false,"description":"Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-11-03) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-11-03) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model."}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"Image or video file","isRequired":true,"uniqueKey":"file","typeLabel":"file"}},"type":"object","required":["file"],"title":"Body_upload_media","uniqueKey":"","typeLabel":"Body_upload_media · object"},"examples":{"Example":{"title":"Example","value":{"file":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"8238cd4d-be97-4eff-9afd-fe204e35c1bf":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","description":"Media ID","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"business_id":{"type":"string","title":"Business Id","description":"Workspace this media belongs to","isRequired":true,"uniqueKey":"business_id","typeLabel":"string"},"created_at":{"type":"string","title":"Created At","description":"When the media was uploaded","isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"warnings":{"items":{"properties":{"field":{"type":"string","title":"Field","description":"The field this warning is about, e.g. 'strategy', 'caption' or 'platform_overrides[0].caption'.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].field","typeLabel":"string"},"level":{"type":"string","enum":["approaching_limit","over_limit","advisory"],"title":"Level","description":"'approaching_limit' = past the soft limit, act soon. 'over_limit' = past the hard limit, act now. 'advisory' = worth fixing before this publishes, but it may be intended.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].level","typeLabel":"enum\u003cstring>"},"message":{"type":"string","title":"Message","description":"Plain-language explanation of what is wrong and how to fix it.","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","title":"Code","description":"Stable machine-readable code, e.g. 'cta_without_contact'. Branch on this, never on the message. Null on the older size-budget warnings.","uniqueKey":"warnings.items.[INDEX].code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"Stable machine-readable code, e.g. 'cta_without_contact'. Branch on this, never on the message. Null on the older size-budget warnings.","uniqueKey":"warnings.items.[INDEX].code.oneOf.1","typeLabel":"null"}],"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"string | null"}},"type":"object","required":["field","level","message"],"title":"FieldWarning","description":"One \"this is fine, but fix it soon\" note about a field the caller just read.\n\nA warning never blocks the write — see BusinessResponse.warnings for why.\nThis is the ONE non-blocking warnings shape (README F6): workspace size\nbudgets and post caption lint both use it, and so will later checks, so a\ncaller that loops over `warnings` keeps working as codes are added.","uniqueKey":"warnings.items.[INDEX]","typeLabel":"FieldWarning · object"},"type":"array","title":"Warnings","description":"Non-blocking notes about this media, empty when there is nothing to say. `low_resolution` means the long edge is under 1080px, so it will look soft on most feeds; tell the user and prefer a larger copy.","readOnly":true,"isRequired":true,"uniqueKey":"warnings","typeLabel":"FieldWarning · object[]"},"alt_text":{"oneOf":[{"type":"string","title":"Alt Text","description":"Alt text description","uniqueKey":"alt_text.oneOf.0","typeLabel":"string"},{"type":"null","title":"Alt Text","description":"Alt text description","uniqueKey":"alt_text.oneOf.1","typeLabel":"null"}],"uniqueKey":"alt_text","typeLabel":"string | null"},"original_url":{"oneOf":[{"type":"string","title":"Original Url","description":"Media URL","uniqueKey":"original_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Original Url","description":"Media URL","uniqueKey":"original_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"original_url","typeLabel":"string | null"},"type":{"oneOf":[{"type":"string","title":"Type","description":"Media type: image, video, or audio","uniqueKey":"type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Type","description":"Media type: image, video, or audio","uniqueKey":"type.oneOf.1","typeLabel":"null"}],"uniqueKey":"type","typeLabel":"string | null"},"width":{"oneOf":[{"type":"integer","title":"Width","description":"Width in pixels","format":"int32","uniqueKey":"width.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","title":"Width","description":"Width in pixels","uniqueKey":"width.oneOf.1","typeLabel":"null"}],"uniqueKey":"width","typeLabel":"integer\u003cint32> | null"},"height":{"oneOf":[{"type":"integer","title":"Height","description":"Height in pixels","format":"int32","uniqueKey":"height.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","title":"Height","description":"Height in pixels","uniqueKey":"height.oneOf.1","typeLabel":"null"}],"uniqueKey":"height","typeLabel":"integer\u003cint32> | null"},"source":{"oneOf":[{"type":"string","title":"Source","description":"Media origin (e.g. upload, unsplash)","uniqueKey":"source.oneOf.0","typeLabel":"string"},{"type":"null","title":"Source","description":"Media origin (e.g. upload, unsplash)","uniqueKey":"source.oneOf.1","typeLabel":"null"}],"uniqueKey":"source","typeLabel":"string | null"},"source_alt_text":{"oneOf":[{"type":"string","title":"Source Alt Text","description":"The alt_text you sent, kept as a hint. `alt_text` is written a few seconds after upload by looking at the image itself, so it is empty in this response. Search results show that description.","uniqueKey":"source_alt_text.oneOf.0","typeLabel":"string"},{"type":"null","title":"Source Alt Text","description":"The alt_text you sent, kept as a hint. `alt_text` is written a few seconds after upload by looking at the image itself, so it is empty in this response. Search results show that description.","uniqueKey":"source_alt_text.oneOf.1","typeLabel":"null"}],"uniqueKey":"source_alt_text","typeLabel":"string | null"}},"type":"object","required":["id","business_id","created_at","warnings"],"title":"MediaUploadResponse","description":"What an upload route returns: the new media, plus what the caller should know.\n\nA subclass rather than new fields on MediaResponse, because MediaResponse is\nalso every library READ. `source_alt_text` and `warnings` only mean something\nat the moment of upload, when the agent can still act on them.","uniqueKey":"","typeLabel":"MediaUploadResponse · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","business_id":"\u003cstring>","created_at":"\u003cstring>","warnings":[{"field":"\u003cstring>","level":"approaching_limit","message":"\u003cstring>","code":"\u003cstring>"}],"alt_text":"\u003cstring>","original_url":"\u003cstring>","type":"\u003cstring>","width":123,"height":123,"source":"\u003cstring>","source_alt_text":"\u003cstring>"}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}},"Location":{"description":"Absolute URL of the newly created resource.","schema":{"type":"string"}}},"exampleType":"generated"},"b0f1fdfe-056f-4c86-8a03-419d5282b84a":{"description":"Bad request — the input was malformed or otherwise invalid.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"d5cead31-2af2-466f-9035-ae113a6b5ead":{"description":"Authentication failed — the API key is missing or invalid.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"a3a195df-e6fd-46bf-8e2e-b2683e2f6668":{"description":"Forbidden — the key is valid but may not access this resource.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"384ab9ce-fcdf-473f-8d11-dbb6683a15c5":{"description":"Not found — no resource matches the id in the path.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"e9e07436-f0bd-41ec-bf0b-dae661879624":{"description":"Conflict — a resource like this already exists.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"03dbe6c8-c3da-40a0-b957-9736d6072de7":{"description":"Validation error — one or more fields failed validation.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"},"c39c98f3-ea58-44d3-83ff-6d341b02a8b9":{"description":"Rate limited — retry after the window resets (see Retry-After).","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying (RFC 9110 delta-seconds).","schema":{"type":"string"}}},"exampleType":"generated"},"8b145ff8-8d6c-4d40-bc22-47c593b72d7d":{"description":"Server error — something failed on our side; retry or quote X-Request-Id.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details. Returned as application/problem+json to clients pinned to 2026-07-17 or later. Match on the stable `code`, never on text.","properties":{"type":{"type":"string","format":"uri","description":"URI for the problem type; dereferences to the docs entry for `code`.","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"Short human-readable summary of the problem type (the broad error category).","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code, repeated in the body.","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"Explanation specific to this occurrence. Display/logging only — do not parse.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"The full set of stable `error.code` values the API can return.\n\nTwo groups: (1) GENERIC codes the global handler derives from the HTTP status\nor message keyword for plain raises (see api_errors._error_code + the handlers),\nand (2) the typed BUSINESS codes (mirror of ErrorType) for raises the frontend\nmust tell apart from other same-status errors.\n\nThis enum exists so OpenAPI emits an `enum` for error.code — a canonical list in\nthe docs and a typed union for codegen — instead of a bare string. It does NOT\nvalidate runtime responses (those are plain dicts built in _build_error_response),\nso a code missing here only means incomplete docs, never a 500. The\ntest_error_code_enum_covers_* tests keep it in sync with ErrorType + _error_code\nso it can't silently drift.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"instance":{"type":"string","description":"The request path that produced this problem.","uniqueKey":"instance","typeLabel":"string"},"request_id":{"type":"string","description":"Id of this request (also the X-Request-Id header). Quote it to support.","uniqueKey":"request_id","typeLabel":"string"},"param":{"type":"string","description":"The offending request field, when the problem is field-specific.","uniqueKey":"param","typeLabel":"string"}},"required":["type","title","status","detail","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"\u003cstring>","title":"\u003cstring>","status":123,"detail":"\u003cstring>","code":"\u003cstring>","instance":"\u003cstring>","request_id":"\u003cstring>","param":"\u003cstring>"}}},"exampleType":"generated"},"application/json":{"schema":{"description":"The body of every non-2xx response. Branch on `error.code`.","properties":{"error":{"properties":{"type":{"type":"string","title":"Type","description":"Broad error category derived from the HTTP status (invalid_request_error, authentication_error, permission_error, not_found_error, rate_limit_error, api_error).","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","title":"ErrorCode","description":"Stable, machine-readable error code. Match on THIS, never on the message. Codes never change even when the message is reworded.","x-extensible-enum":["authentication_required","permission_denied","resource_not_found","rate_limit_exceeded","validation_error","internal_error","invalid_value","invalid_id","already_exists","invalid_request","WORKSPACE_NOT_SUPPORTED","MAX_THREAD_IN_OTHER_WORKSPACE","FEATURE_REMOVED","INSUFFICIENT_CREDITS","BUSINESS_CREDIT_LIMIT_EXCEEDED","NO_ENABLED_TOPICS","GENERATION_CAP_REACHED","CHECKOUT_BLOCKED","INVALID_API_KEY","SOCIAL_TOKEN_EXPIRED","FB_ACCOUNT_BLOCKED","PAYMENT_REQUIRED","NO_CONNECTED_SOCIALS","PLATFORM_RULE_VIOLATION","NOT_ENOUGH_POSTS_FOR_TOPICS","WORKSPACE_LIMIT_EXCEEDED","RECIPIENT_WORKSPACE_LIMIT_EXCEEDED","ADVANCED_WHITELABEL_QUOTA_FROZEN","RESELLER_WHITELABEL_AT_CAPACITY","RESELLER_WHITELABEL_NOT_PURCHASED","CHANNEL_LIMIT_EXCEEDED","FILE_TOO_LARGE","INVALID_FILE_TYPE","SUBSCRIPTION_ALREADY_ACTIVE","UPSTREAM_PROVIDER_ERROR","WEBSITE_UNREACHABLE","PLATFORM_MEDIA_UNSUPPORTED","SOCIAL_CONNECT_FAILED","SOCIAL_CONNECT_LINK_EXPIRED","SOCIAL_APP_PAUSED","NO_PHOTO_SOURCE","TEMPLATE_FORMAT_MISMATCH","TEMPLATE_NOT_FOUND","INVALID_CSV_ROW","IMAGE_GENERATION_FAILED","IMAGE_REFERENCE_INVALID","PDF_HAS_NO_TEXT","POST_RENDER_FAILED","POST_DESIGN_SELECTION_FAILED","POST_CONTENT_GENERATION_FAILED","POST_IDEATION_FAILED","POST_MEDIA_FAILED","POST_AI_MEDIA_FAILED","POST_AI_MEDIA_BLOCKED","POST_RENDER_UNAVAILABLE","IDEMPOTENCY_KEY_CONFLICT","NO_STRIPE_CUSTOMER","X_AGENCY_NOT_ENABLED","NO_ACTIVE_SUBSCRIPTION","POST_HAS_NO_VIDEO","POST_ALREADY_PUBLISHED","CAPTION_HAS_PLACEHOLDER","COPY_DATE_BEFORE_NEXT_SLOT","SCHEDULE_HAS_NO_TIMESLOTS","SIGNUP_BLOCKED","MEDIA_RECENTLY_USED","NAME_MATCHES_OTHER_WORKSPACE","REVIEW_NOT_FOUND","SOCIAL_NEEDS_RECONNECT","COMMENT_NOT_OWN","COMMENT_CANNOT_BE_HIDDEN","REVIEW_ALREADY_REPLIED","REVIEW_DETAILS_MISMATCH","PREVIEW_REQUIRED","PREVIEW_STALE","NOT_ENOUGH_LIBRARY_PHOTOS","UNKNOWN_MEDIA_ID","REEL_DAILY_LIMIT_REACHED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. For display/logging only — do not parse.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","title":"Doc Url","description":"Link to the docs entry for this error code.","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The offending request field, when the error is field-specific.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"The id of this request (also returned as the X-Request-Id header). Quote it to support so they can find the exact request in our logs.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"reconnect_url":{"oneOf":[{"type":"string","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reconnect Url","description":"Present on social token-expired errors (SOCIAL_TOKEN_EXPIRED / REFRESH_TOKEN_EXPIRED): the page where the user reconnects the affected account, so an agent can surface the fix without a second call.","uniqueKey":"error.reconnect_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.reconnect_url","typeLabel":"string | null"},"is_reconnect_fixable":{"oneOf":[{"type":"boolean","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Is Reconnect Fixable","description":"True on social token-expired errors — the failure is fixed by reconnecting the account (paired with reconnect_url).","uniqueKey":"error.is_reconnect_fixable.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.is_reconnect_fixable","typeLabel":"boolean | null"}},"type":"object","required":["type","code","message","doc_url"],"title":"ErrorDetail","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"required":["error"],"title":"ErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","param":"\u003cstring>","request_id":"\u003cstring>","reconnect_url":"\u003cstring>","is_reconnect_fixable":true}}}},"exampleType":"generated"}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window (IETF/Zalando name; preferred).","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"string"}},"RateLimit-Reset":{"description":"UNIX epoch (seconds) when the current window resets.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Back-compat alias of RateLimit-Limit.","schema":{"type":"string"}},"X-RateLimit-Remaining":{"description":"Back-compat alias of RateLimit-Remaining.","schema":{"type":"string"}},"X-RateLimit-Reset":{"description":"Back-compat alias of RateLimit-Reset.","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique id for THIS request (req_…). Quote it to support.","schema":{"type":"string"}},"X-Flow-ID":{"description":"Correlation id for the whole logical flow; echoes the request's X-Flow-ID if sent.","schema":{"type":"string"}},"Marky-Version":{"description":"The dated API version this response was served as.","schema":{"type":"string"}}},"exampleType":"generated"}},"security":{"9db175c4-f924-4f06-a570-d49a819904b9":{"HTTPBearer":{"type":"http","scheme":"bearer","description":"Bearer an mk_live_ API key. A key is ORG-SCOPED: it grants full access to every resource in that organization, with no per-endpoint scoping (see the `uid` pseudo-permission on each operation). Manage keys at https://app.mymarky.ai.","scopes":["uid"],"schemeName":"HTTPBearer"}}},"servers":{"09d2689e-ff2e-4792-a0cf-48865ead84da":{"url":"https://api.mymarky.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer an mk_live_ API key. A key is ORG-SCOPED: it grants full access to every resource in that organization, with no per-endpoint scoping (see the `uid` pseudo-permission on each operation). Manage keys at https://app.mymarky.ai.","scopes":["uid"],"schemeName":"HTTPBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer an mk_live_ API key. A key is ORG-SCOPED: it grants full access to every resource in that organization, with no per-endpoint scoping (see the `uid` pseudo-permission on each operation). Manage keys at https://app.mymarky.ai.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"public-openapi.json"},"subdomain":"marky-2d226b8c","siteName":"Marky API","title":"Upload media - Marky API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-31T22:53:44.680Z","originalFileLocation":"api-reference/upload-media.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Upload a binary image or video file into a workspace\u0026#x27;s MEDIA library. Use this for actual image/video bytes (multipart upload). To create a markdown/text document instead, use create_library_file. The returned media asset can be attached to a document via attach_media_to_file and used in post generation. Send an Idempotency-Key header to make a retry safe (a resend of the same file returns the original media asset instead of uploading a duplicate). Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max size: 20 MB for images, 500 MB for video. Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this workspace is not in your org. 404 resource_not_found: No workspace with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Marky API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upload media - Marky API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload a binary image or video file into a workspace\u0026#x27;s MEDIA library. Use this for actual image/video bytes (multipart upload). To create a markdown/text document instead, use create_library_file. The returned media asset can be attached to a document via attach_media_to_file and used in post generation. Send an Idempotency-Key header to make a retry safe (a resend of the same file returns the original media asset instead of uploading a duplicate). Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max size: 20 MB for images, 500 MB for video. Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this workspace is not in your org. 404 resource_not_found: No workspace with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Marky API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mymarky.ai/api-reference/upload-media\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://marky-2d226b8c.mintlify.app/_mintlify/api/og/v2?division=Media\u0026amp;title=Upload+media\u0026amp;description=Upload+a+binary+image+or+video+file+into+a+workspace%27s+MEDIA+library.%0A%0AUse+this+for+actual+image%2Fvideo+bytes+%28multipart+upload%29.+To+create+a%0Amarkdown%2Ftext+docum\u0026amp;theme=feb25d55a2046f66c0b700e9\u0026amp;signature=76727bddbe441d48d84ea6940bd852f1aaf4d2df98cbd634a6c89ec49471f9d7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upload media - Marky API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload a binary image or video file into a workspace\u0026#x27;s MEDIA library. Use this for actual image/video bytes (multipart upload). To create a markdown/text document instead, use create_library_file. The returned media asset can be attached to a document via attach_media_to_file and used in post generation. Send an Idempotency-Key header to make a retry safe (a resend of the same file returns the original media asset instead of uploading a duplicate). Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max size: 20 MB for images, 500 MB for video. Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this workspace is not in your org. 404 resource_not_found: No workspace with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://marky-2d226b8c.mintlify.app/_mintlify/api/og/v2?division=Media\u0026amp;title=Upload+media\u0026amp;description=Upload+a+binary+image+or+video+file+into+a+workspace%27s+MEDIA+library.%0A%0AUse+this+for+actual+image%2Fvideo+bytes+%28multipart+upload%29.+To+create+a%0Amarkdown%2Ftext+docum\u0026amp;theme=feb25d55a2046f66c0b700e9\u0026amp;signature=76727bddbe441d48d84ea6940bd852f1aaf4d2df98cbd634a6c89ec49471f9d7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/marky-2d226b8c/2YHtFYr3jDlNjCE5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Marky API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366f1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mymarky.ai/api-reference/upload-media\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/upload-media.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mymarky.ai/#organization\",\"name\":\"Marky API\",\"url\":\"https://docs.mymarky.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/marky-2d226b8c/Z6-NzY89vZC-JBeX/logo/logo.png?fit=max\u0026auto=format\u0026n=Z6-NzY89vZC-JBeX\u0026q=85\u0026s=a7ccd17d02af75ecb6ba720fd9abdef3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mymarky.ai#website\",\"name\":\"Marky API\",\"url\":\"https://docs.mymarky.ai\",\"publisher\":{\"@id\":\"https://docs.mymarky.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mymarky.ai/api-reference/upload-media#webpage\",\"url\":\"https://docs.mymarky.ai/api-reference/upload-media\",\"name\":\"Upload media\",\"description\":\"Upload a binary image or video file into a workspace's MEDIA library. Use this for actual image/video bytes (multipart upload). To create a markdown/text document instead, use create_library_file. The returned media asset can be attached to a document via attach_media_to_file and used in post generation. Send an Idempotency-Key header to make a retry safe (a resend of the same file returns the original media asset instead of uploading a duplicate). Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max size: 20 MB for images, 500 MB for video. Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this workspace is not in your org. 404 resource_not_found: No workspace with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.\",\"dateModified\":\"2026-10-31T22:53:44.680Z\",\"isPartOf\":{\"@id\":\"https://docs.mymarky.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mymarky.ai/api-reference/upload-media#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mymarky.ai/api-reference/upload-media#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Marky API\",\"item\":\"https://docs.mymarky.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upload media\",\"item\":\"https://docs.mymarky.ai/api-reference/upload-media\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.mymarky.ai/api-reference/upload-media#apireference\",\"headline\":\"Upload media\",\"name\":\"Upload media\",\"description\":\"Upload a binary image or video file into a workspace's MEDIA library. Use this for actual image/video bytes (multipart upload). To create a markdown/text document instead, use create_library_file. The returned media asset can be attached to a document via attach_media_to_file and used in post generation. Send an Idempotency-Key header to make a retry safe (a resend of the same file returns the original media asset instead of uploading a duplicate). Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV. Images are automatically optimized. Max size: 20 MB for images, 500 MB for video. Errors: 400 invalid_value: The business_id is not a valid UUID. 401 authentication_required: API key or token is missing, invalid, or revoked. 403 permission_denied: Your plan does not include API access, or this workspace is not in your org. 404 resource_not_found: No workspace with that ID exists. 413 FILE_TOO_LARGE: The uploaded file is larger than the size limit (20 MB image / 500 MB video). 422 IDEMPOTENCY_KEY_CONFLICT: The Idempotency-Key was reused with a different file. 429 rate_limit_exceeded: You sent too many requests this minute.\",\"url\":\"https://docs.mymarky.ai/api-reference/upload-media\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mymarky.ai/api-reference/upload-media#webpage\"},\"dateModified\":\"2026-10-31T22:53:44.680Z\",\"publisher\":{\"@id\":\"https://docs.mymarky.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mymarky.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Marky API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Marky API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Generation","pages":[{"title":"Generate posts","openapi":"public-openapi.json post /api/businesses/{business_id}/posts/generate","href":"/api-reference/generate-posts"},{"title":"Get job status","openapi":"public-openapi.json get /api/businesses/{business_id}/jobs/{job_id}","href":"/api-reference/get-job-status"}]},{"group":"Posts","pages":[{"title":"Video Posts","href":"/api-reference/video-posts"},{"title":"Create post","openapi":"public-openapi.json post /api/businesses/{business_id}/posts","href":"/api-reference/create-post"},{"title":"List posts","openapi":"public-openapi.json get /api/businesses/{business_id}/posts","href":"/api-reference/list-posts"},{"title":"Get post","openapi":"public-openapi.json get /api/businesses/{business_id}/posts/{post_id}","href":"/api-reference/get-post"},{"title":"Update post","openapi":"public-openapi.json patch /api/businesses/{business_id}/posts/{post_id}","href":"/api-reference/update-post"},{"title":"Schedule post","openapi":"public-openapi.json post /api/businesses/{business_id}/posts/{post_id}/schedule","href":"/api-reference/schedule-post"},{"title":"Publish post now","openapi":"public-openapi.json post /api/businesses/{business_id}/posts/{post_id}/publish","href":"/api-reference/publish-post"}]},{"group":"Team review","pages":[{"title":"List post comments","openapi":"public-openapi.json get /api/businesses/{business_id}/posts/{post_id}/comments","href":"/api-reference/list-post-comments"},{"title":"Add post comment","openapi":"public-openapi.json post /api/businesses/{business_id}/posts/{post_id}/comments","href":"/api-reference/create-post-comment"},{"title":"Resolve post comment","openapi":"public-openapi.json patch /api/businesses/{business_id}/posts/{post_id}/comments/{comment_id}","href":"/api-reference/resolve-post-comment"}]},{"group":"Stats","pages":[{"title":"Stats Coverage by Platform","href":"/api-reference/stats-coverage"},{"title":"Get post stats","openapi":"public-openapi.json get /api/businesses/{business_id}/posts/{post_id}/stats","href":"/api-reference/get-post-stats"},{"title":"Get integration stats","openapi":"public-openapi.json get /api/businesses/{business_id}/integrations/{integration_id}/stats","href":"/api-reference/get-integration-stats"},{"title":"Get external post stats","openapi":"public-openapi.json get /api/businesses/{business_id}/integrations/{integration_id}/posts/{external_post_id}/stats","href":"/api-reference/get-integration-post-stats"}]},{"group":"Integrations","pages":[{"title":"List integrations","openapi":"public-openapi.json get /api/businesses/{business_id}/integrations","href":"/api-reference/list-integrations"},{"title":"List posts on a platform","openapi":"public-openapi.json get /api/businesses/{business_id}/integrations/{integration_id}/posts","href":"/api-reference/list-integration-posts"}]},{"group":"Workspaces","pages":[{"title":"Create workspace","openapi":"public-openapi.json post /api/workspaces","href":"/api-reference/create-business"},{"title":"List workspaces","openapi":"public-openapi.json get /api/workspaces","href":"/api-reference/list-businesses"},{"title":"Get workspace","openapi":"public-openapi.json get /api/workspaces/{workspace_id}","href":"/api-reference/get-business"},{"title":"Update workspace","openapi":"public-openapi.json patch /api/workspaces/{workspace_id}","href":"/api-reference/update-business"},{"title":"Delete workspace","openapi":"public-openapi.json delete /api/workspaces/{workspace_id}","href":"/api-reference/delete-business"}]},{"group":"Topics","pages":[{"title":"create topic","openapi":"public-openapi.json post /api/businesses/{business_id}/topics","href":"/api-reference/create-topic"},{"title":"list topics","openapi":"public-openapi.json get /api/businesses/{business_id}/topics","href":"/api-reference/list-topics"},{"title":"get topic","openapi":"public-openapi.json get /api/businesses/{business_id}/topics/{topic_id}","href":"/api-reference/get-topic"},{"title":"update topic","openapi":"public-openapi.json patch /api/businesses/{business_id}/topics/{topic_id}","href":"/api-reference/update-topic"},{"title":"delete topic","openapi":"public-openapi.json delete /api/businesses/{business_id}/topics/{topic_id}","description":"Soft-delete a topic.\n\nErrors:\n 401 authentication_required: API key or token is missing, invalid, or revoked.\n 403 permission_denied: Your plan does not include API access, or this topic is not in your org.\n 404 resource_not_found: No topic with that ID exists.\n 429 rate_limit_exceeded: You sent too many requests this minute.","href":"/api-reference/delete-topic"}]},{"group":"Media","pages":[{"title":"Upload media","openapi":"public-openapi.json post /api/businesses/{business_id}/media","href":"/api-reference/upload-media"},{"title":"List media","openapi":"public-openapi.json get /api/businesses/{business_id}/library","description":"List MEDIA ASSETS (uploaded images and videos) in a workspace's media library, newest first.\n\nUse this when the owner names media by when it arrived (\"my two latest\nvideos\", \"the photo I just uploaded\"): pass `type` and take the first items.\nTo find media by what it shows, use `search_media_library`.\n\nThis is the binary media library, NOT text documents. To list markdown/text\ndocuments use `list_files` instead. Use cursor for pagination.\n\nErrors:\n 400 invalid_value: The business_id is not a valid UUID.\n 401 authentication_required: API key or token is missing, invalid, or revoked.\n 403 permission_denied: Your plan does not include API access, or this workspace is not in your org.\n 404 resource_not_found: No workspace with that ID exists.\n 429 rate_limit_exceeded: You sent too many requests this minute.","href":"/api-reference/list-media"},{"title":"Get media","openapi":"public-openapi.json get /api/businesses/{business_id}/library/{media_id}","href":"/api-reference/get-media"},{"title":"Delete media","openapi":"public-openapi.json delete /api/businesses/{business_id}/library/{media_id}","href":"/api-reference/delete-media"}]},{"group":"Folders","pages":[{"title":"Create folder","openapi":"public-openapi.json post /api/businesses/{business_id}/folders","href":"/api-reference/create-folder"},{"title":"List folders","openapi":"public-openapi.json get /api/businesses/{business_id}/folders","href":"/api-reference/list-folders"},{"title":"Get folder","openapi":"public-openapi.json get /api/businesses/{business_id}/folders/{folder_id}","href":"/api-reference/get-folder"},{"title":"Update folder","openapi":"public-openapi.json patch /api/businesses/{business_id}/folders/{folder_id}","href":"/api-reference/update-folder"},{"title":"Delete folder","openapi":"public-openapi.json delete /api/businesses/{business_id}/folders/{folder_id}","href":"/api-reference/delete-folder"}]},{"group":"Files","pages":[{"title":"Create file","openapi":"public-openapi.json post /api/businesses/{business_id}/library/files","href":"/api-reference/create-file"},{"title":"List files","openapi":"public-openapi.json get /api/businesses/{business_id}/files","href":"/api-reference/list-files"},{"title":"Get file","openapi":"public-openapi.json get /api/businesses/{business_id}/files/{file_id}","href":"/api-reference/get-file"},{"title":"Update file","openapi":"public-openapi.json put /api/businesses/{business_id}/files/{file_id}","href":"/api-reference/update-file"},{"title":"Delete file","openapi":"public-openapi.json delete /api/businesses/{business_id}/files/{file_id}","href":"/api-reference/delete-file"},{"title":"Attach media to file","openapi":"public-openapi.json post /api/businesses/{business_id}/files/{file_id}/media","href":"/api-reference/attach-media"}]},{"group":"Webhooks","pages":[{"title":"Register webhook","openapi":"public-openapi.json post /api/webhooks","href":"/api-reference/create-webhook"},{"title":"List webhooks","openapi":"public-openapi.json get /api/webhooks","href":"/api-reference/list-webhooks"},{"title":"Delete webhook","openapi":"public-openapi.json delete /api/webhooks/{webhook_id}","href":"/api-reference/delete-webhook"},{"title":"List webhook deliveries","openapi":"public-openapi.json get /api/webhooks/{webhook_id}/deliveries","href":"/api-reference/list-webhook-deliveries"}]},{"group":"Feedback","pages":[{"title":"Submit feedback","openapi":"public-openapi.json post /api/feedback","href":"/api-reference/submit-feedback"}]}]}]},"basePath":"","title":"Upload media - Marky API","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js","Markdown-h4cOoD8d.js","clsx-B2v50t8t.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DJnKvr0g.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BHrrjR1K.js"]}