Buffer CLI — Agent Reference Command Required Args Optional Flags Description buffer auth login <token>token— Save access token buffer auth status— -oShow auth status buffer auth logout— — Remove credentials
Command Required Args Optional Flags Description buffer profiles list— --access-token, -o, -q, -vList all profiles buffer profiles get--profile-id--access-token, -o, -q, -vGet profile details
Command Required Args Optional Flags Description buffer posts list--profile-id--count, --page, --access-token, -o, -q, -vList pending posts buffer posts sent--profile-id--count, --page, --access-token, -o, -q, -vList sent posts buffer posts create--profile-id, --text--media-link, --media-description, --scheduled-at, --now, --dry-run, --access-token, -o, -q, -vCreate a post buffer posts update--post-id, --text--media-link, --media-description, --scheduled-at, --dry-run, --access-token, -o, -q, -vUpdate a post buffer posts delete--post-id--dry-run, --access-token, -o, -q, -vDelete a post buffer posts share--post-id--dry-run, --access-token, -o, -q, -vShare immediately
Command Required Args Optional Flags Description buffer analytics get--profile-id--count, --page, --access-token, -o, -q, -vGet post analytics
Obtain an access token from https://buffer.com/developers/apps Run buffer auth login <token> to save it Or set BUFFER_ACCESS_TOKEN environment variable Verify with buffer auth status Token priority: --access-token flag > BUFFER_ACCESS_TOKEN env var > config file
Post to multiple profiles # Get profile IDs
PROFILES=$( buffer profiles list -o json | jq -r ' .[].id' ) # Post to a specific profile
buffer posts create --profile-id prof_abc123 --text " Hello world!" # Post to multiple profiles
buffer posts create --profile-id prof_abc123 prof_def456 --text " Cross-post!" Schedule a batch of posts buffer posts create --profile-id prof_abc123 --text " Morning post" --scheduled-at " 2024-03-01T09:00:00Z"
buffer posts create --profile-id prof_abc123 --text " Afternoon post" --scheduled-at " 2024-03-01T14:00:00Z"
buffer posts create --profile-id prof_abc123 --text " Evening post" --scheduled-at " 2024-03-01T19:00:00Z" buffer analytics get --profile-id prof_abc123 --count 100 -o csv > analytics.csv Check queue and share next post immediately # See what's in the queue
buffer posts list --profile-id prof_abc123 -o table
# Share the next post right now
buffer posts share --post-id upd_xyz789Arrays returned for list commands Single objects for get/create/update Error format: {"error": {"code": "ERROR_CODE", "message": "..."}} Human-readable aligned columns Long text fields are truncated with ... Timestamps shown in ISO 8601 Headers in first row Suitable for piping to spreadsheets or data tools Code Meaning Action AUTH_FAILEDInvalid or expired token Run buffer auth login <new-token> AUTH_MISSINGNo token provided Set token via flag, env var, or config RATE_LIMITED60 req/min limit exceeded Wait and retry (auto-retry built in) API_ERRORGeneral API error Check message for details CREATE_FAILEDPost creation failed Check profile ID and text content UPDATE_FAILEDPost update failed Check post ID is valid and pending DELETE_FAILEDPost deletion failed Check post ID exists SHARE_FAILEDImmediate share failed Check post ID is in pending queue
Limit: 60 authenticated requests per user per minuteResponse: HTTP 429 with Retry-After headerCLI behavior: Auto-retry with exponential backoff (up to 3 retries)Best practice: Use --count to fetch more items per request to reduce request count