Comments and Comment Threads

comments#create - Create a nested reply to a comment

Parameters

Name Description
body required The text of the comment you want to save. Allowed html tags are: `br strong b em i img a`
post_id The id the post the comment belongs to (passed via URL)
live_event_id The id the LIVE event the comment belongs to (passed via URL)
parent_comment_id The id of the parent comment if this is a nested reply

Request

Route

POST /v1/comments

Headers

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

Body

{
  "comment" : {
    "body" : "This is a reply!",
    "post_id" : 42,
    "parent_comment_id" : 64
  }
}

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/"7ba138dd89527249998732e8480ae0b5"
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 7001

Body

{
  "comment" : {
    "id" : 65,
    "body" : "This is a reply!",
    "created_at" : "2017-09-14T06:02:38.932-07:00",
    "parent_comment_id" : 64,
    "user_id" : 382,
    "subject_id" : 42,
    "child_comments_count" : 0,
    "url" : "http://www.producthunt.com/posts/awesome-idea-136#comment-65",
    "post_id" : 42,
    "subject_type" : "Post",
    "sticky" : false,
    "votes" : 0,
    "post" : {
      "comments_count" : 0,
      "day" : "2017-09-14",
      "id" : 42,
      "name" : "Awesome Idea #136",
      "product_state" : "default",
      "tagline" : "Great new search engine",
      "ios_featured_at" : null,
      "category_id" : null,
      "created_at" : "2017-09-14T06:02:38.813-07:00",
      "current_user" : {
        "voted_for_post" : false,
        "commented_on_post" : true
      },
      "discussion_url" : "http://www.producthunt.com/posts/awesome-idea-136?utm_campaign=producthunt-api&utm_medium=api&utm_source=Application%3A+Awesome+Oauth+App+%2392+%28ID%3A+42%29",
      "exclusive" : null,
      "featured" : true,
      "maker_inside" : false,
      "makers" : [],
      "platforms" : [],
      "redirect_url" : "http://www.producthunt.com/r/f24fdf3e179f43/42?app_id=42",
      "screenshot_url" : {
        "300px" : "http://placehold.it/850x850.png",
        "850px" : "http://placehold.it/850x850.png"
      },
      "thumbnail" : {
        "id" : 42,
        "media_type" : "image",
        "image_url" : "https://ph-files.imgix.net/67f21f6d-2e40-476f-af93-a3992c33538c?auto=format&fit=crop&h=570&w=430",
        "metadata" : {}
      },
      "topics" : [],
      "user" : {
        "id" : 378,
        "created_at" : "2017-09-14T06:02:38.794-07:00",
        "name" : "Karl User the 860th",
        "username" : "producthunter856",
        "headline" : "Product Hunter",
        "twitter_username" : "hunter860",
        "website_url" : "http://awesome.io",
        "profile_url" : "http://www.producthunt.com/@producthunter856",
        "image_url" : {
          "30px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
          "32px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
          "40px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
          "44px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
          "48px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
          "50px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
          "60px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
          "64px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
          "73px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
          "80px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "88px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "96px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "100px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "110px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "120px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "132px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "146px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "160px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "176px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "220px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "264px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "32px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
          "40px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "44px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "88px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "32px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "40px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "44px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "88px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
          "original" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png"
        }
      },
      "votes_count" : 0
    },
    "user" : {
      "id" : 382,
      "created_at" : "2017-09-14T06:02:38.896-07:00",
      "name" : "Karl User the 864th",
      "username" : "producthunter860",
      "headline" : "Product Hunter",
      "twitter_username" : "hunter864",
      "website_url" : "http://awesome.io",
      "profile_url" : "http://www.producthunt.com/@producthunter860",
      "image_url" : {
        "30px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
        "32px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
        "40px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
        "44px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
        "48px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png",
        "50px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
        "60px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
        "64px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
        "73px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
        "80px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "88px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "96px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "100px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "110px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "120px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "132px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "146px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "160px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "176px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "220px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "264px" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "32px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4_bigger.png",
        "40px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "44px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "88px@2X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "32px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "40px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "44px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "88px@3X" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png",
        "original" : "https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png"
      }
    }
  }
}