Buffer Api logo

Buffer Api

Community
proflead
buffer-api

Manage Buffer content via the GraphQL API. Use when creating, scheduling, editing, or deleting posts, saving ideas, reading scheduled queues, or pulling post analytics. Not for general API debugging.

Overview

Publisherproflead
Repositorycodex-skills-library
Skill namebuffer-api
Stars
147
Forks
31
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by proflead on GitHub. Read the source before you install it.

Installation

Install the Buffer Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/proflead/codex-skills-library.git /tmp/codex-skills-library
mkdir -p .claude/skills
cp -r /tmp/codex-skills-library/skills/api/buffer-api .claude/skills/buffer-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Buffer Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Buffer Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Buffer Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Buffer API — Content Operations

Purpose

Create, schedule, edit, and analyze social media content through Buffer's GraphQL API at https://api.buffer.com.

Inputs to request

  • What to do: create, schedule, draft, edit, delete, list, or analyze a post — or save/list ideas.
  • Channel ID(s) to target (or ask the user to run the "get channels" query first).
  • Post content: text, and optionally image/video URLs or thread structure.
  • Scheduling intent: add to queue, schedule at a specific time, publish now, or save as draft.
  • For analytics: which post ID(s) and which metrics matter (impressions, reactions, comments, etc.).

Operations map

GoalAPI call
Create / schedule a postcreatePost mutation
Save a post as draftcreatePost with saveToDraft: true
Edit an existing posteditPost mutation
Delete a postdeletePost mutation
List scheduled / sent postsposts query with filter: { status: [scheduled] }
Get a single postpost query by ID
Read post metricspost { metrics } or aggregatedPostMetrics query
Save a content ideacreateIdea mutation
Find channel IDschannels query by organization ID
Find organization IDaccount { organizations { id } } query

Auth setup (one-time)

All requests need Authorization: Bearer $BUFFER_API_KEY and Content-Type: application/json.

For personal scripts and automations: use an API key from https://publish.buffer.com/settings/api. For multi-user apps: use OAuth 2.0 with PKCE — authorize at https://auth.buffer.com/auth, exchange at https://auth.buffer.com/token. Refresh tokens are single-use; always save the new one immediately after refresh.

Workflow

  1. Get your organization ID (first time only):

    graphql
    query { account { organizations { id name } } }
  2. Get channel IDs for your target platforms:

    graphql
    query GetChannels($orgId: String!) {
      channels(input: { organizationId: $orgId }) {
        id name service
      }
    }
  3. Create or schedule the post using the relevant example below.

  4. Check the response — the mutation returns a union type. PostActionSuccess means it worked; MutationError carries the reason it failed. GraphQL always responds with HTTP 200, so always inspect the response body.

  5. Edit or delete if needed using the post id returned in step 3.

  6. Pull analytics after the post publishes (metrics are refreshed daily; allow up to 24 hours after publish).

Examples

Create a text post (add to queue)

graphql
mutation CreatePost($input: CreatePostInput!) {
  createPost(input: $input) {
    ... on PostActionSuccess {
      post { id text status dueAt }
    }
    ... on MutationError { message }
  }
}
json
{
  "input": {
    "text": "Your post content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue"
  }
}

Schedule at a specific time

json
{
  "input": {
    "text": "Your post content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "customScheduled",
    "dueAt": "2026-07-01T14:00:00.000Z"
  }
}

Save as draft

json
{
  "input": {
    "text": "Draft content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue",
    "saveToDraft": true
  }
}

Post with image

json
{
  "input": {
    "text": "Your caption here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue",
    "assets": [{ "image": { "url": "https://your-public-image-url.jpg" } }]
  }
}

Image URL must be publicly accessible. Each asset entry specifies exactly one type: image, video, document, or link.

Edit an existing post

graphql
mutation EditPost($input: EditPostInput!) {
  editPost(input: $input) {
    ... on PostActionSuccess {
      post { id text status dueAt }
    }
    ... on MutationError { message }
  }
}
json
{ "input": { "id": "$POST_ID", "text": "Updated content here" } }

Delete a post

graphql
mutation DeletePost {
  deletePost(input: { id: "$POST_ID" }) {
    ... on PostActionSuccess { post { id } }
    ... on MutationError { message }
  }
}

List scheduled posts

graphql
query GetScheduledPosts($orgId: String!) {
  posts(input: {
    organizationId: $orgId,
    filter: { status: [scheduled] },
    sort: [{ field: dueAt, direction: asc }]
  }) {
    edges {
      node { id text dueAt channelId }
    }
    pageInfo { hasNextPage endCursor }
  }
}

For more pages, add after: "$endCursor" to input. Page size: 20–50 items.

Get post analytics

graphql
query GetPostMetrics {
  post(input: { id: "$POST_ID" }) {
    id text metricsUpdatedAt
    metrics { type name value unit }
  }
}

Available metric types (varies by network): reactions, reposts, comments, shares, impressions, reach, views, saves, follows, likes. Metrics appear up to ~24 hours after publish.

Save an idea

graphql
mutation CreateIdea($input: CreateIdeaInput!) {
  createIdea(input: $input) {
    ... on MutationError { message }
  }
}
json
{
  "input": {
    "organizationId": "$ORG_ID",
    "content": { "title": "Optional title", "text": "Idea content here" }
  }
}

Ideas are org-level (not tied to a channel). Promote to a post by using the idea's text in createPost.

Rate limits

Buffer enforces three time windows. On HTTP 429, read retryAfter (seconds) from the response body.

Plan15-min24-hr30-day
Free1001003,000
Essentials1002507,500
Team10050015,000

Troubleshooting

  • No post field in mutation responseMutationError fired; log data.<mutationName>.message.
  • UNAUTHORIZED → check Authorization: Bearer $BUFFER_API_KEY header is present and token is valid.
  • FORBIDDEN → token lacks the right scope (e.g., posts:write needed for create/edit/delete).
  • Metrics missing → post published less than 24 hours ago; check metricsUpdatedAt.
  • Image not attaching → URL must be publicly accessible; see the Hosting Media guide.

Quality bar

  • Always use GraphQL variables — never interpolate user content into query strings.
  • Include ... on MutationError { message } in every mutation.
  • Never expose real tokens or channel IDs in examples.
  • Metrics API is preview-only and available for personal API keys only (not OAuth apps).

Frequently asked questions

What does the Buffer Api AI skill do?

Manage Buffer content via the GraphQL API. Use when creating, scheduling, editing, or deleting posts, saving ideas, reading scheduled queues, or pulling post analytics. Not for general API debugging.

Why use Buffer Api on TypingMind?

Because you install it once and use it with any model. Buffer Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Buffer Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/proflead/codex-skills-library/tree/master/skills/api/buffer-api. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Buffer Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Buffer Api?

As many as you like. As long as a model supports skills, you can use Buffer Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Buffer Api AI skill free?

It is published on GitHub by proflead. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇