> ## Documentation Index
> Fetch the complete documentation index at: https://docs.followr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing posts

> Create posts, schedule, queue or publish them, follow the result and retry failures.

A **post group** is one piece of content and holds the schedule. A **post** is that content for one network, with its own text (`description`), media (`assets_ids`) and options (`preferences`).

> [!NOTE]
>
> A post names its network with `social_network_type`, not an account ID: a company has at most one [account](https://docs.followr.ai/guides/social-accounts.md) per network.

Several posts for one network in a group become a **thread** on X (`twitter`), Threads and Bluesky, in creation order. Other networks get separate posts.

## Create and publish a post

### 1. Create a draft group

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/companies/1287/postGroups \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"title": "December launch", "draft": true, "auto_publish": false}'
```

```json Response (201) theme={null}
{
  "data": {
    "id": 88412,
    "title": "December launch",
    "draft": true,
    "auto_publish": false,
    "publish_at": null,
    "created_at": "2026-12-01T14:03:11.000000Z",
    "updated_at": "2026-12-01T14:03:11.000000Z"
  }
}
```

> [!WARNING]
>
> Send `"draft": true, "auto_publish": false`. Without them, the group publishes automatically from the queue. A draft with `auto_publish` on still takes a queue slot, then never publishes.

### 2. Add a post for each network

[Upload media](https://docs.followr.ai/guides/uploading-media.md) first, then list the asset IDs in `assets_ids`, in display order.

```bash Instagram theme={null}
curl --request POST https://api.followr.ai/api/postGroups/88412/posts \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "social_network_type": "instagram",
    "description": "Our second shop opens downtown on December 15. The first 100 guests get a free cup.",
    "assets_ids": [66120, 66121],
    "preferences": {"media_product_type": "FEED"},
    "comments_to_create": ["Find us at 12 Harbor Street."]
  }'
```

```bash LinkedIn theme={null}
curl --request POST https://api.followr.ai/api/postGroups/88412/posts \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "social_network_type": "linkedin",
    "description": "We are opening our second shop downtown on December 15, and hiring six baristas.",
    "assets_ids": [66120]
  }'
```

Network rules aren't checked here. A post that breaks them fails at publish time with `status: error`.

> [accordion] What each network takes
>
> | Network | Text | Media |
> | - | - | - |
> | `instagram` | Up to 2,200 characters | Required. `FEED`: 1 to 10 items (2 or more make a carousel, a video goes out as a Reel). `REEL`: 1 video. `STORY`: 1 item. |
> | `facebook` | `title` is the Reel title | `FEED`: up to 10 images or 1 video. `REEL`: 1 video. `STORY`: 1 item. |
> | `tiktok` | Video caption up to 2,200 characters. Photo posts: up to 4,000, and `title` is cut to 90. | Required: 1 video, or 1 to 35 images |
> | `youtube` | `title` up to 100 characters (empty: the text's start is used) | Required: 1 video |
> | `pinterest` | `link` is the pin's destination | Required: 1 to 5 images (more are ignored), or 1 video with a cover |
> | `linkedin` | Required, up to 3,000 characters | Up to 9 images or 1 video (with both, the images win) |
> | `twitter` | Up to 280 characters (more if verified) | Up to 4 images, or 1 video or GIF |
> | `threads` | Up to 500 characters | Up to 20 images and videos |
> | `bluesky` | Up to 300 characters. `link` shows as a card when there's no media. | Up to 4 images, or 1 video |
> | `medium` | Required: the body in HTML, and a `title` up to 100 characters | |
>
> First comments (`comments_to_create`) are posted on Facebook and Instagram only. Each network's `preferences` (Pinterest needs `board_id`) are listed in [Create a post](https://docs.followr.ai/api-reference/posts/create-a-post.md). For video covers, see [Uploading media](https://docs.followr.ai/guides/uploading-media.md).

### 3. Choose when it goes out

| `draft` | `auto_publish` | `publish_at` | The group is |
| - | - | - | - |
| `true` | any | any | A draft |
| `false` | `true` | a date | Scheduled |
| `false` | `true` | `null` | Queued |
| `false` | `false` | any | Manual (publish now) |

> [tab] Schedule
>
> ```bash cURL theme={null}
> curl --request PUT https://api.followr.ai/api/postGroups/88412 \
>   --header "Authorization: Bearer $FOLLOWR_API_KEY" \
>   --header "Accept: application/json" \
>   --header "Content-Type: application/json" \
>   --data '{"draft": false, "auto_publish": true, "publish_at": "2026-12-15T09:30:00Z"}'
> ```
>
> Send `publish_at` in UTC or with an offset. Followr checks for due posts every minute.

> [tab] Queue
>
> ```bash cURL theme={null}
> curl --request PUT https://api.followr.ai/api/postGroups/88412 \
>   --header "Authorization: Bearer $FOLLOWR_API_KEY" \
>   --header "Accept: application/json" \
>   --header "Content-Type: application/json" \
>   --data '{"draft": false, "auto_publish": true, "publish_at": null}'
> ```
>
> The group takes the next free slot of the queue that matches its tags. See [Queues](#queues).

> [tab] Publish now
>
> ```bash cURL theme={null}
> curl --request POST https://api.followr.ai/api/postGroups/88412/publish \
>   --header "Authorization: Bearer $FOLLOWR_API_KEY" \
>   --header "Accept: application/json" \
>   --header "Content-Type: application/json" \
>   --data '{"social_network_type": "instagram"}'
> ```
>
> Sends the group's pending and failed posts for one network. It turns off `auto_publish`, so call it for each network, or schedule the group again.
>
> | Status | Meaning |
> | - | - |
> | `204` | Publishing started. |
> | `202` | Media is still downloading. The posts go out when it finishes. |
> | `400` | Nothing to publish for this network. |

### 4. Follow the result

| Post `status` | Meaning |
| - | - |
| `pending` | Waiting for its time. |
| `publishing` | Being sent. Videos can take minutes, and temporary failures are retried for up to 3 hours. |
| `published` | Live. `published_at` and `external_id` (the network's post ID) are set. |
| `error` | Refused or not sent. `status_message` says why. |

Get notified with a [webhook](https://docs.followr.ai/webhooks/overview.md), or poll the group's posts:

```bash cURL theme={null}
curl https://api.followr.ai/api/postGroups/88412/posts \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json"
```

To find failures across a company, [list posts](https://docs.followr.ai/api-reference/posts/list-posts.md) with `filter[status]=error`.

### 5. Retry a failure

Fix the cause in `status_message`, then send it again:

* **One post**: `PUT /posts/{id}` with `{"status": "pending"}`. It goes out within a minute if its group publishes automatically and `publish_at` has passed.
* **Now**: `POST /postGroups/{id}/publish` for the post's network.
* **Later**: move the group's `publish_at` to the future. All its failed posts go back to `pending`.

> [!WARNING]
>
> If `status_message` says the post may already be live, check the network first, or it can be published twice.

## Edit and delete

Change a post with `PUT /posts/{id}` (`assets_ids` replaces the whole list). Move a group with `PUT /postGroups/{id}` and a new `publish_at`, or make it a draft again with `"draft": true, "auto_publish": false`. Deleting a group deletes its posts. `DELETE /postGroups/bulk` deletes up to 200 groups.

## Import many posts at once

[`POST /companies/{company_id}/postGroups/bulk`](https://docs.followr.ai/api-reference/post-groups/import-post-groups-in-bulk) creates up to 500 post groups, one per row, each with one post per listed network:

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/companies/1287/postGroups/bulk \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "social_network_types": ["instagram", "facebook"],
    "schedule_mode": "csv_dates",
    "rows": [
      {
        "content": "Our second shop opens downtown on December 15.",
        "media_urls": ["https://www.northside.example/media/new-shop.jpg"],
        "schedule_at": "2026-12-15T09:30:00Z",
        "first_comment": "Find us at 12 Harbor Street."
      },
      {
        "content": "Behind the bar: meet our new head roaster.",
        "media_urls": ["https://www.northside.example/media/roaster.mp4"],
        "network_overrides": {"instagram": {"media_product_type": "REEL"}}
      }
    ]
  }'
```

* `schedule_mode`: `draft`, `csv_dates` or `queue`. With the last two, rows with `schedule_at` are scheduled and rows without it are queued.
* `media_urls` must be public. Posts wait for their media to download.
* Each row gets its own result. A bad row doesn't stop the others.

## Queues

A queue has weekly **time slots** (weekday and time, in UTC) and optional tags. At each slot, it sets the `publish_at` of the oldest waiting group with matching tags. Create a queue, then its slots:

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/ruleGroups \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"company_id": 1287, "name": "Weekday mornings", "tags_ids": [731], "random_minutes": 15}'
```

```bash cURL theme={null}
curl --request POST https://api.followr.ai/api/rules \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{"group_id": 214, "frequency": "weekly", "day_of_week": 1, "time": "09:00"}'
```

* `day_of_week` runs from 0 (Sunday) to 6 (Saturday). Only `weekly` slots publish.
* `random_minutes` delays each group 0 to `random_minutes - 1` minutes after its slot (fixed per group).
* A company has one active queue per tag, plus one for untagged posts.
* Queues run only while the company owner's plan is active.

## Best time to post

[`GET /companies/{company_id}/postTimes/suggestions`](https://docs.followr.ai/api-reference/scheduling/suggest-posting-times) ranks weekday and hour slots by how the company's posts did, per network. It's free, but a network needs enough published posts.

```bash cURL theme={null}
curl "https://api.followr.ai/api/companies/1287/postTimes/suggestions?network=instagram&days=90&slots=5&time_zone=Europe/Madrid" \
  --header "Authorization: Bearer $FOLLOWR_API_KEY" \
  --header "Accept: application/json"
```

> [!NOTE]
>
> On plans with API limits, posts sent through the API count against a monthly allowance, and X may not be included. See [Plans and usage](https://docs.followr.ai/api/plans-and-usage.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.