Mutation to Schedule Reddit Posts

Written by Grant, Creator of Postpone
Updated 2 years ago

First, read through our API introduction article for info on how to work with our API playground and make API calls.

Next, make an API call with the following GraphQL query:

mutation createRedditPost(
  $redditUsername: String!
  $title: String!
  $content: String
  $link: String
  $comment: String
  $imageId: String
  $campaignId: String
  $submissions: [SubmissionInput]!
  $sendRepliesToInbox: Boolean
  $nsfw: Boolean
  $spoiler: Boolean
) {
  createRedditPost(
    redditUsername: $redditUsername
    title: $title
    content: $content
    link: $link
    comment: $comment
    imageId: $imageId
    campaignId: $campaignId
    submissions: $submissions
    sendRepliesToInbox: $sendRepliesToInbox
    nsfw: $nsfw
    spoiler: $spoiler
  ) {
    success
    errors
  }
}

Pass the following variables to the query:

{
    "redditUsername": "YOUR_USERNAME",
    "title": "This is a post",
    "content": "",
    "link": "https://google.com",
    "comment": "",
    "campaignId": "",
    "imageId": "",
    "submissions": [
        {
            "subreddit": "python",
            "postAt": "2022-10-05T14:30",
            "flairId": ""
        },
        {
            "subreddit": "webdev",
            "postAt": "2022-10-05T14:30",
            "flairId": ""
        }
    ],
    "sendRepliesToInbox": true,
    "nsfw": false,
    "spoiler": false
}
Did this answer your question?