API V1 is deprecated, Check out new API V2 here

Voting for posts

votes#create - Vote for a post

Parameters

Name Description
post_id required The ID of the post you want to vote for

Request

Route

POST /v1/posts/1554/vote

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer your_access_token-6PoQ9e5aAbV7bN1WmWweMSrGwMC7ETcDE
Host: api.producthunt.com

Body

{}

Response

Status

201 Created

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Rate-Limit-Limit: 900
X-Rate-Limit-Remaining: 900
X-Rate-Limit-Reset: 900
Content-Type: application/json; charset=utf-8
ETag: W/"8e6b94d28b421c49cd88f1deabd4fcb7"
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 2975

Body

{
  "vote": {
    "id": 1290,
    "created_at": "2021-05-05T04:39:22.183-07:00",
    "user_id": 10391,
    "post_id": 1554,
    "user": {
      "id": 10391,
      "created_at": "2021-05-05T04:39:22.165-07:00",
      "name": "Karl User the 919th",
      "username": "producthunter915",
      "headline": "Product Hunter",
      "twitter_username": "hunter919",
      "website_url": "http://awesome.io",
      "profile_url": "http://www.producthunt.com/@producthunter915",
      "image_url": {
        "30px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "32px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "40px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "44px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "48px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "50px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "60px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "64px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "73px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "80px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "88px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "96px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "100px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "110px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "120px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "132px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "146px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "160px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "176px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "220px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "264px": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "32px@2X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "40px@2X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "44px@2X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "88px@2X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "32px@3X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "40px@3X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "44px@3X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "88px@3X": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress",
        "original": "https://ph-static.imgix.net/guest-user-avatar.png?auto=format\u0026auto=compress"
      }
    }
  }
}