> ## 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.

# Quickstart

> Schedule your first post through the API in five requests.

Find your company, check its social accounts, create a post and schedule it. It takes about five minutes.

> [!NOTE]
>
> You need a plan that includes the API, and at least one social account connected to a company (in the app: **Company settings > Integrations**). This guide posts to LinkedIn, which accepts text only. Other networks have [their own rules](https://docs.followr.ai/guides/publishing-posts.md).

### 1. Get an API key

Create a key in [**Settings > API keys**](https://app.followr.ai/settings/api-keys) and export it:

```bash theme={null}
export FOLLOWR_API_KEY="paste-your-whole-key-here"
```

Paste the whole key as the app shows it, including the number and the `|` at the start. Responses below are shortened.

### 2. Find your company

A company is a brand or client workspace. Everything you publish belongs to one.

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

```json Response theme={null}
{
  "data": [
    { "id": 1287, "name": "Northside Coffee", "website": "https://www.northside.example" }
  ],
  "meta": { "current_page": 1, "per_page": 30, "total": 1 }
}
```

Keep the `id` (`1287` here).

### 3. Check its social accounts

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

```json Response theme={null}
{
  "data": [
    { "id": 3303, "type": "linkedin", "name": "Northside Coffee", "expires_at": "2027-11-30T09:00:00.000000Z" }
  ]
}
```

`type` is the network you post to. If `expires_at` is in the past, reconnect the account in the app.

### 4. Create a draft and its post

A **post group** is one piece of content and its schedule, with one **post** per network. Create the group as a draft:

```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": "My first API post", "draft": true, "auto_publish": false}'
```

```json Response (201) theme={null}
{ "data": { "id": 88412, "title": "My first API post", "draft": true, "auto_publish": false, "publish_at": null } }
```

Then add the LinkedIn post:

```bash cURL 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": "Hello from the Followr API. This post was scheduled by code."
  }'
```

```json Response (201) theme={null}
{ "data": { "id": 240553, "social_network_type": "linkedin", "status": "pending", "external_id": null } }
```

### 5. Schedule it

Take the group out of draft and give it a time a few minutes from now, in UTC or with an offset:

```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"}'
```

Done. At `publish_at`, the post's `status` goes from `pending` to `publishing` to `published`, and `external_id` gets LinkedIn's ID. If it ends in `error`, `status_message` says why. Check it with `GET /postGroups/88412/posts`.

## The whole flow in code

```python Python theme={null}
import os
from datetime import datetime, timedelta, timezone

import requests

API = "https://api.followr.ai/api"
session = requests.Session()
session.headers.update({
    "Authorization": f"Bearer {os.environ['FOLLOWR_API_KEY']}",
    "Accept": "application/json",
})


def call(method, path, **kwargs):
    response = session.request(method, f"{API}{path}", timeout=30, **kwargs)
    response.raise_for_status()
    return response.json() if response.content else None


company = call("GET", "/companies")["data"][0]
accounts = call("GET", f"/companies/{company['id']}/socialNetworks")["data"]
print("Connected networks:", [account["type"] for account in accounts])

group = call("POST", f"/companies/{company['id']}/postGroups",
             json={"title": "My first API post", "draft": True, "auto_publish": False})["data"]

call("POST", f"/postGroups/{group['id']}/posts", json={
    "social_network_type": "linkedin",
    "description": "Hello from the Followr API. This post was scheduled by code.",
})

publish_at = (datetime.now(timezone.utc) + timedelta(minutes=10)).isoformat()
call("PUT", f"/postGroups/{group['id']}",
     json={"draft": False, "auto_publish": True, "publish_at": publish_at})

print(f"Post group {group['id']} scheduled for {publish_at}")
```

```javascript JavaScript theme={null}
const API = "https://api.followr.ai/api";

async function call(method, path, body) {
  const response = await fetch(`${API}${path}`, {
    method,
    headers: {
      Authorization: `Bearer ${process.env.FOLLOWR_API_KEY}`,
      Accept: "application/json",
      ...(body ? { "Content-Type": "application/json" } : {}),
    },
    body: body ? JSON.stringify(body) : undefined,
  });
  if (!response.ok) {
    throw new Error(`${method} ${path} failed with ${response.status}: ${await response.text()}`);
  }
  return response.status === 204 ? null : response.json();
}

const { data: companies } = await call("GET", "/companies");
const company = companies[0];

const { data: accounts } = await call("GET", `/companies/${company.id}/socialNetworks`);
console.log("Connected networks:", accounts.map((account) => account.type));

const { data: group } = await call("POST", `/companies/${company.id}/postGroups`, {
  title: "My first API post",
  draft: true,
  auto_publish: false,
});

await call("POST", `/postGroups/${group.id}/posts`, {
  social_network_type: "linkedin",
  description: "Hello from the Followr API. This post was scheduled by code.",
});

const publishAt = new Date(Date.now() + 10 * 60 * 1000).toISOString();
await call("PUT", `/postGroups/${group.id}`, {
  draft: false,
  auto_publish: true,
  publish_at: publishAt,
});

console.log(`Post group ${group.id} scheduled for ${publishAt}`);
```

## Next steps

> [card] [Publishing posts](https://docs.followr.ai/guides/publishing-posts.md)
>
> Media, queues, publishing now and recovering from failures.

> [card] [Uploading media](https://docs.followr.ai/guides/uploading-media.md)
>
> Add pictures and videos to your posts.

> [card] [Webhooks](https://docs.followr.ai/webhooks/overview.md)
>
> Get told when a post is published or fails.

> [card] [API reference](https://docs.followr.ai/api-reference/overview.md)
>
> Every endpoint, with a playground.


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