Collections

collections#create - Create a collection

Parameters

Name Description
name required The name of the collection
title required The title of the collection

Request

Route

POST /v1/collections

Headers

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

Body

{
  "collection": {
    "name": "Awesome Collection #150",
    "title": "Best new collection ever"
  }
}

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

Body

{
  "collection": {
    "id": 143,
    "name": "Awesome Collection #150",
    "title": "Best new collection ever",
    "created_at": "2017-09-14T06:02:31.912-07:00",
    "updated_at": "2017-09-14T06:02:31.912-07:00",
    "featured_at": null,
    "subscriber_count": 0,
    "background_image_url": null,
    "category_id": null,
    "collection_url": "http://www.producthunt.com/@producthunter643/collections/awesome-collection-150?utm_campaign=producthunt-api\u0026utm_medium=api\u0026utm_source=Application%3A+Awesome+Oauth+App+%2370+%28ID%3A+20%29",
    "color": "blue",
    "posts_count": 0,
    "user": {
      "id": 165,
      "created_at": "2017-09-14T06:02:31.873-07:00",
      "name": "Karl User the 647th",
      "username": "producthunter643",
      "headline": "Product Hunter",
      "twitter_username": "hunter647",
      "website_url": "http://awesome.io",
      "profile_url": "http://www.producthunt.com/@producthunter643",
      "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"
      }
    },
    "posts": []
  }
}