proflead/codex-skills-library/buffer-api
Claude Code and agent skill by proflead/codex-skills-library
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install proflead/codex-skills-library/buffer-apiSKILL.md
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):
``graphql query { account { organizations { id name } } } ``
- Get channel IDs for your target platforms:
``graphql 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)
Schedule at a specific time
Save as draft
Post with image
Image URL must be publicly accessible. Each asset entry specifies exactly one type: image, video, document, or link.
Edit an existing post
Delete a post
List scheduled posts
For more pages, add after: "$endCursor" to input. Page size: 20–50 items.
Get post analytics
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
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.
| Plan | 15-min | 24-hr | 30-day | |
|---|---|---|---|---|
| Free | 100 | 100 | 3,000 | |
| Essentials | 100 | 250 | 7,500 | |
| Team | 100 | 500 | 15,000 |
Troubleshooting
- No `post` field in mutation response →
MutationErrorfired; logdata.<mutationName>.message. - `UNAUTHORIZED` → check
Authorization: Bearer $BUFFER_API_KEYheader is present and token is valid. - `FORBIDDEN` → token lacks the right scope (e.g.,
posts:writeneeded 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).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/api/buffer-api/SKILL.md
Popularity
- Repository stars
- 150
- Repository forks
- 33
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/proflead/codex-skills-library/buffer-api)