Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ai/tools-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Attach a library file to a post. Does **not** upload a new file. REST: [`POST /p

| Tool | Description |
|------|-------------|
| **list-content-types-tool** | Returns `{ platforms: [...] }` — same catalog as [`GET /content-types`](/api-reference/endpoint/list-content-types). Each platform has `max_content_length`, `recommended_content_length`, `allowed_media_types`, `default_content_type`, and `content_types[]` rows with `max_media_count`, `min_media_count`, `requires_media`, `accept_images` / `accept_videos` / `accept_documents` / `accepts_gif`, `forbids_mixed_media`, and per-type byte caps. **20** content types total — there is no `linkedin_carousel` / `instagram_carousel`. Use before `create-post-tool` / `update-post-tool`. |
| **list-content-types-tool** | Returns `{ platforms: [...] }` — same catalog as [`GET /content-types`](/api-reference/endpoint/list-content-types). Each platform has `max_content_length`, `recommended_content_length`, `allowed_media_types`, `default_content_type`, and `content_types[]` rows with `max_media_count`, `min_media_count`, `requires_media`, `accept_images` / `accept_videos` / `accept_documents` / `accepts_gif` / `accepts_mov`, `forbids_mixed_media`, and per-type byte caps. **20** content types total — there is no `linkedin_carousel` / `instagram_carousel`. Use before `create-post-tool` / `update-post-tool`. |

## Signatures

Expand Down
2 changes: 1 addition & 1 deletion api-reference/endpoint/attach-media-from-url.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ For uploading a file directly from your machine instead of fetching a URL, use [

- The post must belong to the caller's current workspace; otherwise the response is `404`.
- Allowed media types are **intersected with the platforms enabled on the post**. If an enabled platform doesn't support the file type (e.g. video on a platform that's image-only), that file is rejected and listed in `failed_urls`.
- Successful attachments are appended to the post's `media[]` array (image `alt` becomes `media[].meta.alt_text`).
- Successful attachments are appended to the post's `media[]` array with `size` and `meta` (image `alt` becomes `media[].meta.alt_text`; videos carry `meta.duration` read from the file). Per-network size, duration, GIF and MOV caps are enforced when the post is scheduled or published — see [Media → Enforced on the server](/knowledge-base/media#enforced-on-the-server-not-just-in-the-editor).

## Response

Expand Down
10 changes: 7 additions & 3 deletions api-reference/endpoint/list-content-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ Returns `{ "platforms": [ ... ] }` — one object per social platform.
| `accept_videos` | Whether videos are allowed. |
| `accept_documents` | Whether PDFs are allowed (e.g. LinkedIn document posts). |
| `accepts_gif` | Whether GIF is accepted as an image. |
| `accepts_mov` | Whether QuickTime/MOV is accepted. `false` on Bluesky (MP4 only). |
| `forbids_mixed_media` | When `true`, do not mix images and videos in one post. |
| `max_video_duration_sec` | Max video length in seconds, or `null`. |
| `max_image_bytes` | Max image size in bytes, or `null`. |
| `max_video_bytes` | Max video size in bytes, or `null`. |
| `max_video_duration_sec` | Max video length in seconds, or `null`. TikTok reports the 10-minute API ceiling; `creator_info` may lower it per account. |
| `max_image_bytes` | Max image size in bytes, or `null`. Already clamped to the instance upload cap. |
| `max_video_bytes` | Max video size in bytes, or `null`. Already clamped to the instance upload cap (Cloud: 1 GB, so X's 8 GB reads as 1 GB here). |
| `max_document_bytes` | Max PDF size in bytes, or `null`. |

Byte and duration caps are enforced server-side on publish/schedule as well as in the editor — see [Media → Enforced on the server](/knowledge-base/media#enforced-on-the-server-not-just-in-the-editor).

### Current `content_type` values (20)

| Platform | Values |
Expand Down Expand Up @@ -91,6 +94,7 @@ Returns `{ "platforms": [ ... ] }` — one object per social platform.
"accept_videos": true,
"accept_documents": true,
"accepts_gif": false,
"accepts_mov": true,
"forbids_mixed_media": true,
"max_video_duration_sec": 600,
"max_image_bytes": 5242880,
Expand Down
2 changes: 1 addition & 1 deletion api-reference/endpoint/request-media-upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Send as `multipart/form-data` with a single `media` field.

The FormRequest upper bound is the video ceiling; the per-type cap is enforced after MIME detection. MIME is detected from the file's magic bytes (not the extension or `Content-Type` header).

`request-media-upload-tool` also returns these limits as `max_bytes` (video ceiling) and `max_bytes_by_type`.
`request-media-upload-tool` also returns these limits as `max_bytes` (video ceiling) and `max_bytes_by_type`. These are the workspace-wide ceilings; each network's own size, duration, GIF and MOV caps (`list-content-types-tool`) are enforced when the post is scheduled or published. A video's `duration` is read from the file on the server and stored in `meta`.
</ParamField>

## Authentication
Expand Down
1 change: 1 addition & 0 deletions api-reference/endpoint/update-post.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ description: "Update a post's content, schedule, enabled platforms, or labels
- On update, `meta` is **merged** into the platform's existing object. Send a key as `null` to remove it (e.g. `"title": null`).
- Required-to-publish keys are enforced on this request when `status` is `scheduled` or `publishing` **and** you include a `platforms[]` array in the body (each submitted row is checked). Drafts are not checked. A missing key returns `422` on `platforms.{i}.meta.{field}` (e.g. `platforms.0.meta.channel_id`).
- If you publish with only `{ "status": "publishing" }` (no `platforms[]`), this endpoint does **not** re-validate stored meta — ensure `board_id` / `privacy_level` / `channel_id` were saved earlier. The MCP `publish-post-tool` always validates stored meta before publishing.
- **Media compatibility is always re-checked** on `scheduled` / `publishing`, with or without `platforms[]`: every enabled platform's effective `content_type` is validated against the post's effective media (media kind, GIF/MOV acceptance, byte cap via `size`, and video duration read from the file on upload). A failure is `422` on `platforms.{i}.content_type`, e.g. `Video exceeds the 300 MB limit for this post type (yours is 900.0 MB).` — see [Media → Enforced on the server](/knowledge-base/media#enforced-on-the-server-not-just-in-the-editor).
- Enum-like fields are **JSON strings** — send the exact literal (e.g. `"privacy_level": "PUBLIC_TO_EVERYONE"`), not an integer or a different casing.
- Platforms with **no** `meta` keys: X, YouTube, Threads, Bluesky, Mastodon, Telegram.

Expand Down
2 changes: 1 addition & 1 deletion api-reference/endpoint/upload-media.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Send as `multipart/form-data` with a single `media` field.
- The file's MIME type is **intersected with the platforms enabled on the post**. For example, uploading an image to a TikTok-only post returns `422` unless the post targets `tiktok_photo`. Uploading a PDF only succeeds on platforms that accept documents (e.g. LinkedIn `linkedin_post`).
- Per-type size caps are enforced after MIME detection. The FormRequest uses the video ceiling as an overall bound; per-type limits still apply.
- PNG and WebP still images are normalized to **JPEG (q100)** at storage time for universal platform compatibility. GIF is preserved (animation kept for X / Bluesky / Mastodon / Telegram / Discord). MP4, MOV, and PDF are stored as-is.
- The new media is stored under `medias/{uuid}.{ext}` on the configured filesystem disk (`local`, `s3`, or `r2`) and appended to the post's `media[]` array.
- The new media is stored under `medias/{uuid}.{ext}` on the configured filesystem disk (`local`, `s3`, or `r2`) and appended to the post's `media[]` array with its `size` and `meta` (image `width`/`height`, video `duration` in seconds read from the file). Per-network size, duration, GIF and MOV caps are enforced when the post is scheduled or published — see [Media → Enforced on the server](/knowledge-base/media#enforced-on-the-server-not-just-in-the-editor).

## Response

Expand Down
Loading