Create a Category

Create a Category

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

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API

Request Body

NameTypeDescription

type

string

Represents the type of the object being returned

name

string

The name of the category

slug

string

A unique slug identifier for the category

description

string

Any description for this category

status

string

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

{
    "data": {
        "id": "9dd56fc2-5746-46a2-bdf6-fe396bb6b7af",
        "type": "category",
        "status": "live",
        "name": "Clothing",
        "slug": "clothing",
        "description": "Browse our clothing line",
        "relationships": {}
    }
}
curl -X POST https://api.moltin.com/v2/categories \
    -H "Authorization: Bearer XXXX" \
    -H "Content-Type: application/json" \
    -d $'{
     "data": {
        "type": "category",
        "name": "Clothing",
        "slug": "clothing",
        "description": "Browse our clothing line",
        "status": "live"
     }
   }'

Last updated