Categories
Category Create
Create a category for organising posts.
POST
Create a category for organising posts.
cookie
storyden-session<token>application/json- body
name*CategoryNameA category's user-facing name.
slug?CategorySlugA category's URL-safe slug.
description*stringcolour*stringparent?IdentifierA unique identifier for this resource.
Format
xidcover_image_asset_id?IdentifierA unique identifier for this resource.
Format
xidmeta?Arbitrary metadata for the resource.
OK
application/json- response
id*IdentifierParent category identifier. Unset indicates a root-level category.
Format
xidcreatedAt*stringThe time the resource was created.
Format
date-timeupdatedAt*stringThe time the resource was updated.
Format
date-timedeletedAt?stringThe time the resource was soft-deleted.
Format
date-timemisc?Arbitrary extra data stored with the resource.
name*CategoryNameA category's user-facing name.
slug*CategorySlugA category's URL-safe slug.
description*stringcolour*stringsort*integerparent?IdentifierParent category identifier. Unset indicates a root-level category.
Format
xidcover_image?children*array<>meta?Arbitrary metadata for the resource.
postCount*integercurl -X POST 'https://example.com/api/categories' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "description": "string", "colour": "string"}'Example Response
{ "id": "string", "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": "string", "cover_image": { "id": "string", "filename": "string", "path": "string", "mime_type": "string", "width": 0, "height": 0, "parent": {} }, "children": [ {} ], "meta": {}, "postCount": 0}