Create a Collection

Create a Collection

POST https://api.moltin.com/v2/collections

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API.

Request Body

NameTypeDescription

type

string

Represents the type of object being returned.

name

string

The name of the collection.

slug

string

A unique slug identifier for the collection.

description

string

Any description for this collection.

status

string

live, or draft depending on the collection status. (defaults to draft)

{
    "data": {
        "id": "a276571c-321e-4c48-af2a-5a3895394b08",
        "type": "collection",
        "status": "live",
        "name": "Winter Season",
        "slug": "winter-season",
        "description": "Our Winter Season is now live!",
        "relationships": {}
    }
}
curl -X POST https://api.moltin.com/v2/collections \
    -H "Authorization: Bearer XXXX" \
    -H "Content-Type: application/json" \
    -d $'{
     "data": {
        "type": "collection",
        "name": "Winter Season",
        "slug": "winter-season",
        "description": "Our Winter Season is now live!",
        "status": "live"
     }
}'

Last updated