Storyden
Categories

Category Create

Create a category for organising posts.

POST
/categories

Create a category for organising posts.

Authorization

cookiestoryden-session<token>

Request Body

application/json
  1. body
name*CategoryName

A category's user-facing name.

slug?CategorySlug

A category's URL-safe slug.

description*string
colour*string
parent?Identifier

A unique identifier for this resource.

Formatxid
cover_image_asset_id?Identifier

A unique identifier for this resource.

Formatxid
meta?

Arbitrary metadata for the resource.

Response Body

OK

application/json
  1. response
id*Identifier

Parent category identifier. Unset indicates a root-level category.

Formatxid
createdAt*string

The time the resource was created.

Formatdate-time
updatedAt*string

The time the resource was updated.

Formatdate-time
deletedAt?string

The time the resource was soft-deleted.

Formatdate-time
misc?

Arbitrary extra data stored with the resource.

name*CategoryName

A category's user-facing name.

slug*CategorySlug

A category's URL-safe slug.

description*string
colour*string
sort*integer
parent?Identifier

Parent category identifier. Unset indicates a root-level category.

Formatxid
cover_image?
children*array<>
meta?

Arbitrary metadata for the resource.

postCount*integer
Example Request
curl -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}