API Status Get API Key

Buffer GraphQL API Examples

This collection demonstrates various operations that you can perform using our API.

Getting setup

Please ensure that you have followed the initial instructions over in the Getting Started Guide to set up your API access and authentication.

Available Examples

Browse through our examples using the sidebar on the left. Each example showcases different aspects of our GraphQL API:

  • Create Draft Post - Draft posts can be created using the createPost mutation with the saveToDraft argument set to true. When saving a post as a draft, there are several required arguments:
  • Create Idea - Create an idea post for a specified Organization, using the provided content.
  • Create Image Post - Creating a post with an image works in the same way as creating a text post, with the addition of the imageUrl argument. This argument is used to specify the URL of the image that you want to include in the post.
  • Create Scheduled Post - Scheduled posts can be created using the createPost mutation with the customScheduled mode and a dueAt timestamp. When creating a scheduled post, there are several required arguments:
  • Create Text Post - Text posts can be created using the createPost mutation. When creating a post, there are several required arguments:
  • Create Video Post - Creating a post with a video works in the same way as creating a text post, with the addition of the videos argument inside assets. This argument is used to specify the URL of the video that you want to include in the post. You can also optionally provide a thumbnailUrl for the video thumbnail.
  • Get Channel - Fetch a single channel by its ID.
  • Get Channels - Fetch all channels for the provided Organization ID.
  • Get Filtered Channels - Fetch all channels for the provided Organization ID.
  • Get Organizations - Fetch all of the organizations that belong to the authenticated account.
  • Get Paginated Posts - Fetch a list of posts with support for pagination.
  • Get Posts For Channels - Fetch a list of posts for a specific set of Channel IDs.
  • Get Posts With Assets - Fetch a list of posts along with their associated assets (images, videos, etc.) for a specific set of Channel IDs.
  • Get Scheduled Posts - Fetch a list of posts that are scheduled for future publishing.