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

# Buffer

> Social media management API for scheduling and publishing posts and saving content ideas across 11 connected channels (Instagram, X, LinkedIn, TikTok, Facebook, Threads, Bluesky, Pinterest, YouTube, Google Business Profile, Mastodon).

Social media management API for scheduling and publishing posts and saving content ideas across 11 connected channels (Instagram, X, LinkedIn, TikTok, Facebook, Threads, Bluesky, Pinterest, YouTube, Google Business Profile, Mastodon). Best for agents that compose and queue social content, or draft ideas, on a user's behalf. GraphQL-only: every request is a POST to [https://api.buffer.com](https://api.buffer.com) with the operation in the body — see the routing hint for operation shapes.

6 example endpoints available through Lava's AI Gateway. See the [Buffer API docs](https://developers.buffer.com/) for full documentation.

<Warning>This provider requires your own credentials — connect your API key or OAuth account before use.</Warning>

<Info>This is a **catch-all provider** — any valid URL under `https://api.buffer.com` is supported. Buffer GraphQL API. Single endpoint: POST [https://api.buffer.com](https://api.buffer.com) (no path). Auth: Bearer personal API key (generate at publish.buffer.com/settings/api; free tier, limited beta). Body: \{"query": "\<graphql>", "variables": \{...}}. Typical flow: (1) query account.organizations to get organizationId; (2) query channels(input:\{organizationId}) to get channelId + service; (3) createPost / createIdea. Operations: account\{organizations\{id name}}; channels(input:\{organizationId})\{id name service}; posts(first,after,input:\{organizationId,filter:\{status,channelIds}}) — cursor pagination via first/after; createPost(input:\{text,channelId,schedulingType:automatic,mode:addToQueue|customScheduled,dueAt}) returns union (... on PostActionSuccess\{post\{id text dueAt}} / ... on MutationError\{message}); createIdea(input:\{organizationId,content:\{text}}); deleting scheduled/sent posts is also supported (see API Reference > Posts). Errors: GraphQL always returns HTTP 200 — typed mutation errors appear in data via ... on MutationError\{message}; system errors appear in top-level errors\[] with extensions.code (UNAUTHORIZED, FORBIDDEN, NOT\_FOUND, RATE\_LIMIT\_EXCEEDED, UNEXPECTED). Always include ... on MutationError\{message} in mutations. Rate limit: 100 req / 15 min per third-party client (2000/15min account-wide); 429 with extensions.retryAfter seconds. See [https://developers.buffer.com/](https://developers.buffer.com/) for the full reference. The endpoints below are curated examples.</Info>

## Endpoints

### Get the authenticated account and its organizations. Run this first — the organizationId is required by channels, posts, and createIdea.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "query GetOrganizations { account { organizations { id name } } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"query GetOrganizations { account { organizations { id name } } }"}'
    ```
  </Tab>
</Tabs>

### List connected social channels for an organization. The `service` field (twitter, instagram, …) tells you the platform; copy `id` to use as channelId when creating posts.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "query GetChannels { channels(input: { organizationId: \"your_org_id\" }) { id name service } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"query GetChannels { channels(input: { organizationId: \"your_org_id\" }) { id name service } }"}'
    ```
  </Tab>
</Tabs>

### Retrieve posts for an organization, filtered by channel and status. Cursor-paginated via `first` and `after`.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "query GetPosts { posts(first: 20, input: { organizationId: \"your_org_id\", filter: { channelIds: [\"your_channel_id\"] } }) { edges { node { id text dueAt status } } } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"query GetPosts { posts(first: 20, input: { organizationId: \"your_org_id\", filter: { channelIds: [\"your_channel_id\"] } }) { edges { node { id text dueAt status } } } }"}'
    ```
  </Tab>
</Tabs>

### Create a post and add it to the channel queue (next available slot). `text` and `channelId` are required. Always select both PostActionSuccess and MutationError on the union.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "mutation CreatePost { createPost(input: { text: \"Hello from the Buffer API!\", channelId: \"your_channel_id\", schedulingType: automatic, mode: addToQueue }) { ... on PostActionSuccess { post { id text dueAt } } ... on MutationError { message } } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"mutation CreatePost { createPost(input: { text: \"Hello from the Buffer API!\", channelId: \"your_channel_id\", schedulingType: automatic, mode: addToQueue }) { ... on PostActionSuccess { post { id text dueAt } } ... on MutationError { message } } }"}'
    ```
  </Tab>
</Tabs>

### Create a post scheduled for a specific time. Use mode: customScheduled with an ISO-8601 UTC `dueAt`.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "mutation CreateScheduledPost { createPost(input: { text: \"Scheduled for a specific time\", channelId: \"your_channel_id\", schedulingType: automatic, mode: customScheduled, dueAt: \"2026-06-01T15:00:00.000Z\" }) { ... on PostActionSuccess { post { id text dueAt } } ... on MutationError { message } } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"mutation CreateScheduledPost { createPost(input: { text: \"Scheduled for a specific time\", channelId: \"your_channel_id\", schedulingType: automatic, mode: customScheduled, dueAt: \"2026-06-01T15:00:00.000Z\" }) { ... on PostActionSuccess { post { id text dueAt } } ... on MutationError { message } } }"}'
    ```
  </Tab>
</Tabs>

### Save a content idea for later. Ideas belong to an organization (not a channel) since they are not yet assigned to a platform.

**POST** `https://api.buffer.com` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.buffer.com', {
      body: {
    "query": "mutation CreateIdea { createIdea(input: { organizationId: \"your_org_id\", content: { text: \"Blog post concept: ...\" } }) { ... on Idea { id content { text } } } }"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.buffer.com" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"mutation CreateIdea { createIdea(input: { organizationId: \"your_org_id\", content: { text: \"Blog post concept: ...\" } }) { ... on Idea { id content { text } } } }"}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
