Categories
Category Create
Create a category for organising posts.
Create a category for organising posts.
POST
/categoriesstoryden-session<token>
In: cookie
nameCategoryName
A category's user-facing name.
slug?CategorySlug
A category's URL-safe slug.
descriptionstring
colourstring
parent?Identifier
Parent category identifier. Unset indicates a root-level category.
Format
xidcover_image_asset_id?Identifier
A unique identifier for this resource.
Format
xidmeta?Metadata
Arbitrary metadata for the resource.
Empty Object
Response Body
curl -X POST "https://loading/api/categories" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "colour": "string" }'{
"id": "cc5lnd2s1s4652adtu50",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"misc": {},
"name": "string",
"slug": "string",
"description": "string",
"colour": "string",
"sort": 0,
"parent": "cc5lnd2s1s4652adtu50",
"cover_image": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {}
}
},
"children": [
{
"id": "cc5lnd2s1s4652adtu50",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"misc": {},
"name": "string",
"slug": "string",
"description": "string",
"colour": "string",
"sort": 0,
"parent": "cc5lnd2s1s4652adtu50",
"cover_image": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {
"id": "cc5lnd2s1s4652adtu50",
"filename": "string",
"path": "string",
"mime_type": "string",
"width": 0,
"height": 0,
"parent": {}
}
},
"children": [],
"meta": {},
"postCount": 0
}
],
"meta": {},
"postCount": 0
}Empty
Empty
{
"error": "string",
"message": "string",
"suggested": "string",
"metadata": {}
}