API Documentation

posts/vote

Register a vote on a post.

URL

https://disqus.com/api/3.0/posts/vote.json

Accessibility

public key, secret key

Supported request methods

POST

Supported formats

json, jsonp

Requires authentication

no

Rate limited

inherits global rate limit

Arguments

Required

  • vote

    Choices: -1, 0, 1

  • post

    Looks up a post by ID

Example Responses

Expand json

POST vote=1&post=1

{
  "code": 0,
  "response": {
    "vote": 0,
    "likesDelta": 0,
    "post": {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": null,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "id": "1",
      "thread": "1",
      "points": 1,
      "createdAt": "2008-06-10T01:32:08",
      "isEdited": false,
      "message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 1
    },
    "dislikesDelta": 0,
    "delta": 0
  }
}
Expand json

POST vote=0&post=1

{
  "code": 0,
  "response": {
    "vote": 0,
    "likesDelta": 0,
    "post": {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": null,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "id": "1",
      "thread": "1",
      "points": 1,
      "createdAt": "2008-06-10T01:32:08",
      "isEdited": false,
      "message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 1
    },
    "dislikesDelta": 0,
    "delta": 0
  }
}
Expand json

POST vote=-1&post=1

{
  "code": 0,
  "response": {
    "vote": 0,
    "likesDelta": 0,
    "post": {
      "isJuliaFlagged": true,
      "isFlagged": false,
      "forum": "bobross",
      "parent": null,
      "author": {
        "username": "disqus_api",
        "about": "",
        "name": "disqus_api",
        "url": "",
        "isFollowing": false,
        "isFollowedBy": false,
        "profileUrl": "http://disqus.com/disqus_api/",
        "emailHash": "67f79ed8e10b74abf07a8dfe101bbab2",
        "avatar": {
          "permalink": "http://disqus.com/api/users/avatars/disqus_api.jpg",
          "cache": "http://mediacdn.disqus.com/1091/images/noavatar92.png"
        },
        "id": "1",
        "isAnonymous": false,
        "email": "example@disqus.com"
      },
      "media": [],
      "isApproved": true,
      "dislikes": 0,
      "raw_message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "id": "1",
      "thread": "1",
      "points": 1,
      "createdAt": "2008-06-10T01:32:08",
      "isEdited": false,
      "message": "\"We want happy paintings. Happy paintings. If you want sad things, watch the news.\"",
      "isHighlighted": false,
      "ipAddress": "127.0.0.1",
      "isSpam": false,
      "isDeleted": false,
      "likes": 1
    },
    "dislikesDelta": 0,
    "delta": 0
  }
}