# Posts (/growsocmed/docs/developers/posts)

Create, schedule, change, retry, cancel and remove posts.

A post has one text and media list, and one **target** per account it goes to. Each target can override the text and media and carries the platform's options. The post's status follows its targets.

## Create a post [#create-a-post]

```bash
curl -X POST https://socmed.growpaces.com/api/v1/posts \
  -H "Authorization: Bearer gs_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-2026-12-01" \
  -d '{
    "text": "Our December collection is here.",
    "media_ids": ["0193…"],
    "targets": [
      { "account_id": "6b1e…" },
      { "account_id": "a07c…", "text": "December collection, out now. Link in bio." },
      { "account_id": "c3d4…", "options": { "title": "December collection", "made_for_kids": false } }
    ],
    "scheduled_at": "2026-12-01T09:00:00+07:00"
  }'
```

| Field | |
| --- | --- |
| `text` | Up to 70,000 characters; each platform has its own lower limit. |
| `media_ids` | Up to 20 files of the media library, in order. They must be `ready`. |
| `targets` | 1 to 50 accounts, each at most once. `text` and `media_ids` on a target replace the post's own for that account. |
| `targets[].options` | Platform choices, see below. |
| `scheduled_at` | ISO 8601 with an offset. Leave it out (or give a time in the past) to publish now. |
| `idea_id` | The idea the post comes from, see [Ideas](/growsocmed/docs/developers/ideas). |

Every target is checked before anything is created: text length, media types, sizes, ratios and durations, number of files and required options. If one account cannot take the post, the whole request fails with `400 validation_failed` and `details.targets` lists the problems per account:

```json
{
  "error": {
    "code": "validation_failed",
    "message": "Some accounts cannot take this post",
    "details": { "targets": [ { "account_id": "6b1e…", "issues": [ { "code": "text_too_long", "max": 500, "length": 612 } ] } ] }
  }
}
```

Other issue codes include `media_required`, `too_many_media`, `mixed_media`, `media_type_not_supported`, `media_too_large`, `aspect_ratio_invalid`, `video_duration_invalid`, `too_many_videos`, `option_required`, `option_invalid`, `account_expired`, `account_not_found` and `media_unavailable`. Read the current limits with [`GET /platform-rules`](/growsocmed/docs/api-reference/posts/get-platform-rules), or on the [Platforms](/growsocmed/docs/platforms) page.

The response is `201` with `{ post, replayed }`.

### Platform options [#platform-options]

Options go in `targets[].options` of the account they belong to. The main ones:

| Platform | Options |
| --- | --- |
| YouTube | `title` (required, up to 100 characters), `made_for_kids` (required, `true` or `false`), `privacy`: `public`, `unlisted` or `private`. |
| TikTok | `privacy_level` (required, one of `PUBLIC_TO_EVERYONE`, `MUTUAL_FOLLOW_FRIENDS`, `FOLLOWER_OF_CREATOR`, `SELF_ONLY`), `disable_comment`, `disable_duet`, `disable_stitch`, `brand_content_toggle`, `brand_organic_toggle`, `is_aigc`, `title` (photo posts, up to 90 characters), `post_mode`: `direct` or `draft`. |
| Pinterest | `board_id` (required), `title`, `link`, `alt_text`. |
| Instagram | `format`: `feed` or `story` (a story has exactly one file), `collaborators` (up to 3), `trial`, `thumb_offset_ms`. |
| Threads | `reply_control`, `topic_tag`, `link_attachment`, `poll` (2–4 options, text posts), `thread` (up to 10 follow-up posts). |
| Facebook Page | `video_as`: `reel` or `video`, `link` (text posts). |
| LinkedIn | `visibility`: `PUBLIC` or `CONNECTIONS`, `document_title`. |
| Telegram | `disable_notification`. |
| Instagram, Facebook Page, TikTok | `first_comment`: a comment the account adds under the post. |

X posts are paid from the workspace owner's balance.

## Statuses [#statuses]

| Post status | Meaning |
| --- | --- |
| `scheduled` | Waiting for its time. |
| `publishing` | Being sent. |
| `published` | Out on every account. |
| `partial` | Out on some accounts, failed on others. |
| `failed` | Failed on every account. |
| `canceled` | Canceled before it went out. |

Each target has its own status (`pending`, `publishing`, `published`, `failed`, `canceled`), its `permalink` once published, and `error_code` and `error_message` when it failed. Posts over a platform's 24-hour publishing limit wait until there is room; they do not fail. Check the room left with [`GET /accounts/{id}/publishing-limit`](/growsocmed/docs/api-reference/accounts/get-publishing-limit).

The [webhooks](/growsocmed/docs/developers/webhooks) `post.published` and `post.failed` tell you when each target finishes, so you do not need to poll.

## List and read [#list-and-read]

- [`GET /posts`](/growsocmed/docs/api-reference/posts/list-posts): newest schedule first. Filter with `status`, `from` and `to` (schedule time) or `view=scheduled` (still to go out, soonest first) and `view=history`. Paginated with `cursor`.
- [`GET /posts/{id}`](/growsocmed/docs/api-reference/posts/get-post): one post with its targets.
- [`GET /posts/counts`](/growsocmed/docs/api-reference/posts/count-posts): the number of posts per status.

## Change, retry, cancel, remove [#change-retry-cancel-remove]

- [`PATCH /posts/{id}`](/growsocmed/docs/api-reference/posts/update-post) changes the text, media, time, or per-account `targets`. A scheduled post can change for every account. A `failed` or `partial` post can change only on its failed accounts (its time cannot change), then you retry it. The new content is checked like a new post.
- [`POST /posts/{id}/retry`](/growsocmed/docs/api-reference/posts/retry-post) publishes the failed accounts again, now.
- [`DELETE /posts/{id}`](/growsocmed/docs/api-reference/posts/cancel-post) cancels the accounts that have not published yet. Accounts already published stay published.
- [`POST /posts/{id}/remove`](/growsocmed/docs/api-reference/posts/remove-post) removes a finished post (published, failed or canceled) from GrowSocmed's history. Nothing is deleted on the platforms.

## Import from CSV [#import-from-csv]

[`POST /posts/import`](/growsocmed/docs/api-reference/posts/import-posts) schedules up to 100 posts to one account from CSV text. Send `account_id`, the `csv` (columns `time`, `text` and `media`, or `waktu`, `teks` and `media`; several media URLs separated by `|`) and the `timezone` of the times (`Asia/Jakarta` by default). `dry_run` is `true` by default and only checks the rows; send `false` to create the posts. Media URLs must be public `https://` addresses. Importing the same file again creates no duplicates.