buffer-api
Skill0 starsChanged 3 months agoMITView on GitHub
Schedule, manage and analyze social media posts via the Buffer GraphQL API from any AI agent.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- genericService/claude-skillstheir own version, first seen Nov 8, 2026
- proflead/codex-skills-librarytheir own version, first seen Jun 18, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- proflead/codex-skills-library★ 153same name
- genericService/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use Buffer's GraphQL API to schedule, manage, and analyze social posts across Instagram, Threads, LinkedIn, X/Twitter, Facebook, Google …
- Very specific: line 93
ALWAYS spread both PostActionSuccess AND MutationError (or your ...
- Very specific: line 148
Threads / X / Bluesky / Mastodon: create a threaded post (metadata.{network}.thread)
- Distinctive: line 149
LinkedIn / Facebook / Instagram: add a first comment on the scheduled post
- Very specific: line 157
Always include the ... on <Error> fragment so mutation errors surface.
- Very specific: line 165
urllib / non-ASCII bodies: if you are writing Python, urllib.request throws UnicodeEncodeError: 'latin-1' on a non-ASCII char (e.g.
- Very specific: line 168
JSON-LD/latin-1 hardware: run scripted API calls with a healthy interpreter (env -u PYTHONPATH python3 on the Hermes box).
- Distinctive: line 172
Do not use it.
- Very specific: line 193
JSON-LD / non-ASCII bodies: use requests or any JSON-safe HTTP client, not urllib (latin-1 crash).
- Very specific: line 221
After creating a post, poll post(input:{ id }) and confirm status: scheduled -> sent.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Buffer API — Schedule, Manage & Analyze Social Posts
Use Buffer's GraphQL API to schedule, manage, and analyze social posts across Instagram, Threads, LinkedIn, X/Twitter, Facebook, Google Business, Mastodon, YouTube, Pinterest, and Bluesky — from any AI agent (Claude, Cursor, Codex, OpenClaw, Hermes, n8n).
When to Use
- Schedule/create/delete/retrieve posts or drafts in a Buffer queue.
- Automate repetitive posting or cross-platform content distribution.
- Retrieve account, organization, channel, idea, post-metric state.
- Route TikTok (and other owned-account) automation through Buffer's approved integration instead of a platform's Direct Post API.
Progress Disclosure (read only what you need)
- Quick operation (list channels, schedule a post, check a post) → SKILL.md alone.
- Media / images / video / per-network metadata / threads →
references/media-and-metadata.md. - Full API reference (all types, unions, inputs) → local spec at
../openclaw-imports/openclaw-seo-geo-optimization/...if needed; else fetch https://developers.buffer.com/reference.html. - MCP alternative (if your host supports Model Context Protocol): Buffer ships a
first-party MCP server at
https://mcp.buffer.com/mcpwith headerAuthorization: Bearer <API_KEY>. Prefer the raw GraphQL below when a script exists or when you need the bytes (binary media) that MCP tends to not expose.
Prerequisites
- A Buffer account with at least one connected channel and an API key (https://publish.buffer.com/settings/api). The key acts on YOUR OWN account.
- Auth: send
Authorization: Bearer <API_KEY>on every request tohttps://api.buffer.com(GraphQL, POST,Content-Type: application/json). - Least-privilege: the API key is scoped to your own Buffer account; never ask a user for a platform's account password. Use the Buffer key the same way you would an app password.
- For images/video on a post: the asset URL must be public. See
references/media-and-metadata.mdfor hosting + verification.
Core Endpoint & Auth
POST https://api.buffer.com
Authorization: Bearer <API_KEY>
Content-Type: application/json
Body: {"query": "<graphql>", "variables": {...}}The API is GraphQL only. Use the Buffer API Explorer (https://developers.buffer.com/explorer.html) to exercise schema. Scalar DateTime is ISO 8601 UTC.
1. Account & Organization
Find org + channel IDs — the two IDs you'll need for nearly everything.
query GetAccount {
account { id email organizations { id name } }
}query GetChannels {
channels(input: { organizationId: "ORG_ID" }) { id name service type }
}service = the platform (instagram, tiktok, linkedin, twitter/mastodon/youtube/pinterest/bluesky/facebook/gbp).
type = Page/Profile/Business/Group/Account.
2. Create a Post
mutation CreatePost {
createPost(input: {
text: "Hello from the Buffer API!"
channelId: "CHANNEL_ID"
schedulingType: automatic
mode: addToQueue # addToQueue or customScheduled
# dueAt: "2026-03-10T15:00:00.000Z" # required when mode=customScheduled
}) {
... on PostActionSuccess { post { id text dueAt } }
... on MutationError { message }
}
}- Required:
text,channelId,schedulingType: automatic. At least one ofmode(addToQueue / customScheduled) ordueAt. mode: addToQueue→ next available slot from the channel's posting schedule.mode: customScheduled+dueAt→ exact date/time (ISO 8601, UTC).- ALWAYS spread both
PostActionSuccessANDMutationError(or your... on { }) so errors surface, not silently vanish.
3. Images / Video / Assets (media by public URL)
assets is an ordered list; each entry carries exactly one of image, video,
document, or link. For an image post:
createPost(input: {
text: "Hello there, this is another one!"
channelId: "CHANNEL_ID" schedulingType: automatic mode: addToQueue
assets: [ { image: { url: "https://your-cdn.example.com/image.jpg" } } ]
}) { ... on PostCreatedSuccess { post { id assets { id mimeType } } } ... on CreateError { message } }The url MUST be publicly reachable — Buffer fetches media from that URL. See
references/media-and-metadata.md (hosting + a curl verification you should run
before creating the post).
4. Retrieve / Manage Posts
- Get one post (poll status — note: Buffer polls by
post(input: { id }), NOT agetPostfield):
query PostById { post(input: { id: "POST_ID" }) { id text status dueAt channelId } }status values: scheduled → sent (successfully published) → error. Confirm
status == "sent" (the string is sent, not published).
- List posts (cursor pagination):
query GetPosts {
posts(first: 20, after: "CURSOR", input: { organizationId: "ORG_ID"
filter: { status: [scheduled, sent] channelIds: ["CHANNEL_ID"] } }) {
edges { node { id text status dueAt } }
pageInfo { endCursor hasNextPage }
}
}first + after are cursor-based; loop after until hasNextPage is false.
- Edit
editPostmutation (same union shape). - Delete
deletePost(input: { postId })(returns DeletePostPayload union). - Move in queue
movePostInQueue(experimental) — reorder queued posts.
5. Ideas (save content for later)
- Create:
createIdea(input: { organizationId ideaGroupId text media }). - List:
ideas(input: { organizationId } ). Media attaches viaurltoo (image/video/gif document/link; video not exposed on public API). - Idea groups:
ideaGroups(input:).
6. Post Metrics
Once a post is sent, per-network performance is normalized on Post.metrics.
aggregatedPostMetrics(aggregate across channels/posts)dailyPostingLimits(per-channel daily caps)post(input: { id }) { metrics { ... } }for a single post. Metrics are read-only and available for personal/workflow use.
Supported Platforms & Per-Network Metadata
Supported services: instagram, threads, linkedin, twitter, facebook, google-business-profiles, mastodon, youtube, pinterest, bluesky.
Beyond the shared fields, metadata on createPost per network enables:
- Threads / X / Bluesky / Mastodon: create a threaded post (
metadata.{network}.thread) - LinkedIn / Facebook / Instagram: add a first comment on the scheduled post
- Instagram: post type (post / story / reel), user tags per image
- Pinterest: attach a board to a pin
You only provide the metadata for the network the channel belongs to. Read
references/media-and-metadata.md for the exact per-network shape.
Errors & Error Handling
- Always include the
... on <Error>fragment so mutation errors surface. - Common: invalid channelId; missing required text/channelId; queue limit reached.
- A "same thing twice so close together" from Buffer = ALREADY QUEUED (the mutation
returns a limit/duplicate-like error). Treat
ok=falseon a retry as already-queued, do NOT keep re-submitting. - Union types:
createPostreturnsPostActionPayload(union). Spread:{ ... on PostCreatedSuccess { post {...} } ... on CreateError { message } }. postQUERY (notgetPost): Buffer has NOgetPostfield; the arg isinput: { id }.- urllib / non-ASCII bodies: if you are writing Python,
urllib.requestthrowsUnicodeEncodeError: 'latin-1'on a non-ASCII char (e.g. an em dash) in a JSON body — userequests.post(..., json=...)for non-ASCII payloads. This is a real, repeated gotcha. - JSON-LD/latin-1 hardware: run scripted API calls with a healthy interpreter
(
env -u PYTHONPATH python3on the Hermes box). - Auth is Bearer only. The legacy REST (
api.bufferapp.com/1/) is RETIRED (2027-02-01) and 401s "Public API tokens are not accepted for REST API access." Do not use it.
End-to-end flows (cheat sheets)
- Schedule next available:
account → organizations → channels(input:{organizationId}) → createPost(mode:addToQueue) → poll
post(input:{id})until status -> sent. - Post with an image: host public URL → verify (GET 200) → createPost(assets:[{image:{url}}]) → poll.
- Stand up TikTok / IG automation:
use Buffer +
metadata(post type) for owned-account scheduling, not the platform's Direct Post API (Triggered-Use) — one shared API key across channels, no per-platform token juggling.
Pitfalls & Hard-Won Lessons
- API is GraphQL, not REST. Point everything at
https://api.buffer.com. Legacy REST is retired.api.bufferapp.com/1/is dead. - Polling is
post(input:{ id }), notgetPost. A query field namedgetPostdoes NOT exist. Usepost(input: { id: "..." }) { id status }. Poll confirms both creation andsending->sent. status == "sent"— the string issent, notpublished, in Buffer GraphQL.- Asset URL must be public — images/videos via
assets:[{image:{url}}]. No raw blob upload mutation. Verify with a HEAD/GET (200) before creating. - JSON-LD / non-ASCII bodies: use
requestsor any JSON-safe HTTP client, noturllib(latin-1 crash). - Don't hammer a duplicate. Close-together repeat of the same post = already
queued. Handle
ok=falseas already-queued; don't retry. - Rate / queue limits surface as
CreateError/LimitReachedError— read the message, adjust cadence, never blind-retry-loop. - No auth to Publish UI for most graph ops — some preview
🧪endpoints (post templates, updatePostTemplate) are preview-only. - Custom scalars ≠ generic
ID(verified live). Buffer params likeorganizationId/channelId/postIduse DISTINCT custom scalars (OrganizationId!,ChannelId!,PostId!). Declaring a query variable asID!where the field expectsOrganizationId!fails GraphQL validation. Either inline the ID as a string literal or type the variable with the exact scalar.
References
references/api-reference.md— full GraphQL schema: all queries/mutations, type fields, unions (account, channels, posts, ideas, metrics, post templates).references/media-and-metadata.md— public media hosting + verification, per-network metadata shapes (threads/bluesky/mastodon threads; LI/FB/IG first comment; IG post type/user tags; Pinterest board), scheduling, ideas.references/graphql-helpers.md— ready-to-run queries and mutation templates.scripts/buffer_graphql.py— a small, dependency-light Python helper to POST JSON GraphQL safely (handles non-ASCII, unions, pagination), so you don't re-render a fragment stack.
Verification
- Run
scripts/buffer_graphql.py --query "{ account { id organizations { id } } }"→ expect{"account":{...}}(proves auth + endpoint). - After creating a post, poll
post(input:{ id })and confirmstatus:scheduled -> sent.
Last verified: 2026-08-21 against https://developers.buffer.com (guide + reference).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

