buffer-api
FreeNo executable scriptsNot checkedManage Buffer content via the GraphQL API. Use when creating, scheduling, editing, or deleting posts, saving ideas, reading scheduled queues, or pulling post…
by proflead★ 171 GitHub starsAbout this skill
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
| Goal | API call |
|---|---|
| Create / schedule a post | createPost mutation |
| Save a post as draft | createPost with saveToDraft: true |
| Edit an existing post | editPost mutation |
| Delete a post | deletePost mutation |
| List scheduled / sent posts | posts query with filter: { status: [scheduled] } |
| Get a single post | post query by ID |
| Read post metrics | post { metrics } or aggregatedPostMetrics query |
| Save a content idea | createIdea mutation |
| Find channel IDs | channels query by organization ID |
| Find organization ID | account { 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
Get your organization ID (first time only):
query { account { organizations { id name } } }Get channel IDs for your target platforms:
query GetChannels($orgId: String!) { channels(input: { organizationId: $orgId }) { id name service } }Create or schedule the post using the relevant example below.
Check the response — the mutation returns a union type.
PostActionSuccessmeans it worked;MutationErrorcarries the reason it failed. GraphQL always responds with HTTP 200, so always inspect the response body.Edit or delete if needed using the post
idreturned in step 3.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)
mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
... on PostActionSuccess {
post { id text status dueAt }
}
... on MutationError { message }
}
}
{
"input": {
"text": "Your post content here",
"channelId": "$CHANNEL_ID",
"schedulingType": "automatic",
"mode": "addToQueue"
}
}
Schedule at a specific time
{
"input": {
"text": "Your post content here",
"channelId": "$CHANNEL_ID",
"schedulingType": "automatic",
"mode": "customScheduled",
"dueAt": "2026-07-01T14:00:00.000Z"
}
}
Save as draft
{
"input": {
"text": "Draft content here",
"channelId": "$CHANNEL_ID",
"schedulingType": "automatic",
"mode": "addToQueue",
"saveToDraft": true
}
}
Post with image
{
"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
mutation EditPost($input: EditPostInput!) {
editPost(input: $input) {
... on PostActionSuccess {
post { id text status dueAt }
}
... on MutationError { message }
}
}
{ "input": { "id": "$POST_ID", "text": "Updated content here" } }
Delete a post
mutation DeletePost {
deletePost(input: { id: "$POST_ID" }) {
... on PostActionSuccess { post { id } }
... on MutationError { message }
}
}
List scheduled posts
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
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, `
Install buffer-api in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the buffer-api 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.
How do I install the buffer-api skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the buffer-api skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic