Storyden
Threads

Thread Create

Create a new thread within the specified category.

POST
/threads

Create a new thread within the specified category.

Authorization

cookiestoryden-session<token>

Request Body

application/json
  1. body
title*ThreadTitle

The title of a thread.

pinned?PinnedRank

If the post is pinned, this indicates its rank among other pinned threads. Lower numbers are pinned higher up. A value of zero indicates that the post is not pinned.

locked?ThreadLocked

Whether replies are restricted to members with Manage Posts (including administrators). Only these members may set or change this field. Independent of lifecycle state; resolved threads may remain unlocked. New threads are unlocked unless explicitly created locked.

body?PostContent

Rich HTML content.

Storyden owns the HTML id attribute in this content. Client-supplied id attributes are ignored and removed during sanitisation.

For block-aware resources such as threads, replies, library nodes, and node versions, successful create and update operations assign stable server-owned block IDs to addressable block elements using the sdb_ prefix, for example <p id="sdb_d46b4s1fs0s8b8j6k2g0">. On updates, Storyden preserves existing sdb_ block IDs where the corresponding block can be matched across edits, so links and references to specific blocks can remain stable as content moves.

Read operations do not assign missing block IDs. Content created before block IDs were assigned, or content where a particular block has no server-owned ID yet, may be returned without block IDs until that resource is next written.

tags?array<>
meta?

Arbitrary metadata for the resource.

category?Identifier

A unique identifier for this resource.

Formatxid
visibility?Visibility
Value in"draft""unlisted""review""published"
url?URL

A web address

Formaturl

Response Body

Thread created.

application/json
  1. response

A thread reference includes most of the information about a thread but does not include the posts within the thread. Useful for rendering large lists of threads or other situations when you don't need the full data.

id*Identifier

The conclusion reply. For usage as a Q&A "answer" or "solution".

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.

title*ThreadTitle

The title of a thread.

description?PostDescription

A short version of the post's body text for use in previews.

slug*ThreadMark

A thread's ID and optional slug separated by a dash = it's unique mark. This allows endpoints to respond to varying forms of a thread's ID.

For example, given a thread with the ID cc5lnd2s1s4652adtu50 and the slug top-10-movies-thread, Storyden will understand both the forms: cc5lnd2s1s4652adtu50-top-10-movies-thread and cc5lnd2s1s4652adtu50 as the identifier for that thread.

Formatxid-prefixed-kebab-case-string
author*

A minimal reference to an account.

visibility*Visibility
Value in"draft""unlisted""review""published"
assets*array<>
reacts*array<>

A list of reactions this post has had from people.

collections*
likes*
meta?

Arbitrary metadata for the resource.

body*PostContent

Rich HTML content.

Storyden owns the HTML id attribute in this content. Client-supplied id attributes are ignored and removed during sanitisation.

For block-aware resources such as threads, replies, library nodes, and node versions, successful create and update operations assign stable server-owned block IDs to addressable block elements using the sdb_ prefix, for example <p id="sdb_d46b4s1fs0s8b8j6k2g0">. On updates, Storyden preserves existing sdb_ block IDs where the corresponding block can be matched across edits, so links and references to specific blocks can remain stable as content moves.

Read operations do not assign missing block IDs. Content created before block IDs were assigned, or content where a particular block has no server-owned ID yet, may be returned without block IDs until that resource is next written.

body_links*array<>
pinned*PinnedRank

If the post is pinned, this indicates its rank among other pinned threads. Lower numbers are pinned higher up. A value of zero indicates that the post is not pinned.

locked_at?string

When this thread was locked. Absent when unlocked. Only members with Manage Posts (including administrators) may reply to a locked thread.

Formatdate-time
read_status?

Information about the read status of a thread for the requesting authenticated user. If the user is not authenticated or they have not read the thread before, this will not be included in the Thread object.

reply_status*
category?
link?

A minimal object used to refer to a link without sending too much data.

lifecycle_state*ThreadLifecycleState

Whether a discussion is ongoing or has reached a conclusion. Independent of publication visibility and reply permissions. New threads start open.

Value in"open""resolved"
conclusion_reply_id?Identifier

The conclusion reply. For usage as a Q&A "answer" or "solution".

Formatxid
tags*array<>

A list of tags.

last_reply_at?string

The time of the last reply to the thread.

Formatdate-time
recomentations*array<||||>
replies*

To be composed with paginated resource responses.

Example Request
curl -X POST 'https://example.com/api/threads' \  -H 'Content-Type: application/json' \  -d '{  "title": "string"}'
Example Response
{  "id": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "deletedAt": "2019-08-24T14:15:22Z",  "misc": {},  "title": "string",  "description": "string",  "slug": "string",  "author": {    "id": "string",    "joined": "2019-08-24T14:15:22Z",    "suspended": "2019-08-24T14:15:22Z",    "handle": "string",    "name": "string",    "signature": "string",    "roles": [      {        "badge": true,        "default": true,        "id": "string",        "name": "string",        "colour": "string",        "meta": {}      }    ]  },  "visibility": "draft",  "assets": [    {      "id": "string",      "filename": "string",      "path": "string",      "mime_type": "string",      "width": 0,      "height": 0,      "parent": {}    }  ],  "reacts": [    {      "id": "string",      "emoji": "string",      "author": {        "id": "string",        "joined": "2019-08-24T14:15:22Z",        "suspended": "2019-08-24T14:15:22Z",        "handle": "string",        "name": "string",        "signature": "string",        "roles": [          {            "badge": true,            "default": true,            "id": "string",            "name": "string",            "colour": "string",            "meta": {}          }        ]      }    }  ],  "collections": {    "in_collections": 0,    "has_collected": true  },  "likes": {    "likes": 0,    "liked": true  },  "meta": {},  "body": "string",  "body_links": [    {      "id": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "deletedAt": "2019-08-24T14:15:22Z",      "misc": {},      "url": "string",      "slug": "string",      "domain": "string",      "title": "string",      "description": "string",      "favicon_image": {        "id": "string",        "filename": "string",        "path": "string",        "mime_type": "string",        "width": 0,        "height": 0,        "parent": {}      },      "primary_image": {        "id": "string",        "filename": "string",        "path": "string",        "mime_type": "string",        "width": 0,        "height": 0,        "parent": {}      },      "liveness_status": "unknown",      "liveness_checked_at": "2019-08-24T14:15:22Z",      "scrape_status": "pending",      "scrape_attempted_at": "2019-08-24T14:15:22Z",      "scraped_at": "2019-08-24T14:15:22Z"    }  ],  "pinned": 0,  "locked_at": "2019-08-24T14:15:22Z",  "read_status": {    "last_read_at": "2019-08-24T14:15:22Z",    "replies_since": 0,    "marked_unread_at": "2019-08-24T14:15:22Z"  },  "reply_status": {    "replies": 0,    "replied": 0  },  "category": {    "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": [      {        "id": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "deletedAt": "2019-08-24T14:15:22Z",        "misc": {},        "postCount": 0      }    ],    "meta": {}  },  "link": {    "id": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "deletedAt": "2019-08-24T14:15:22Z",    "misc": {},    "url": "string",    "slug": "string",    "domain": "string",    "title": "string",    "description": "string",    "favicon_image": {      "id": "string",      "filename": "string",      "path": "string",      "mime_type": "string",      "width": 0,      "height": 0,      "parent": {}    },    "primary_image": {      "id": "string",      "filename": "string",      "path": "string",      "mime_type": "string",      "width": 0,      "height": 0,      "parent": {}    },    "liveness_status": "unknown",    "liveness_checked_at": "2019-08-24T14:15:22Z",    "scrape_status": "pending",    "scrape_attempted_at": "2019-08-24T14:15:22Z",    "scraped_at": "2019-08-24T14:15:22Z"  },  "lifecycle_state": "open",  "conclusion_reply_id": "string",  "tags": [    {      "name": "string",      "colour": "string",      "item_count": 0    }  ],  "last_reply_at": "2019-08-24T14:15:22Z",  "recomentations": [    {      "kind": "post",      "ref": {        "id": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "deletedAt": "2019-08-24T14:15:22Z",        "misc": {},        "title": "string",        "description": "string",        "slug": "string",        "author": {          "id": "string",          "joined": "2019-08-24T14:15:22Z",          "suspended": "2019-08-24T14:15:22Z",          "handle": "string",          "name": "string",          "signature": "string",          "roles": [            {              "badge": true,              "default": true,              "id": "string",              "name": "string",              "colour": "string",              "meta": {}            }          ]        },        "visibility": "draft",        "assets": [          {            "id": "string",            "filename": "string",            "path": "string",            "mime_type": "string",            "width": 0,            "height": 0,            "parent": {}          }        ],        "reacts": [          {            "id": "string",            "emoji": "string",            "author": {              "id": "string",              "joined": "2019-08-24T14:15:22Z",              "suspended": "2019-08-24T14:15:22Z",              "handle": "string",              "name": "string",              "signature": "string",              "roles": [                {                  "badge": true,                  "default": true,                  "id": "string",                  "name": "string",                  "colour": "string",                  "meta": {}                }              ]            }          }        ],        "collections": {          "in_collections": 0,          "has_collected": true        },        "likes": {          "likes": 0,          "liked": true        },        "meta": {},        "body": "string",        "body_links": [          {            "id": "string",            "createdAt": "2019-08-24T14:15:22Z",            "updatedAt": "2019-08-24T14:15:22Z",            "deletedAt": "2019-08-24T14:15:22Z",            "misc": {},            "url": "string",            "slug": "string",            "domain": "string",            "title": "string",            "description": "string",            "favicon_image": {              "id": "string",              "filename": "string",              "path": "string",              "mime_type": "string",              "width": 0,              "height": 0,              "parent": {}            },            "primary_image": {              "id": "string",              "filename": "string",              "path": "string",              "mime_type": "string",              "width": 0,              "height": 0,              "parent": {}            },            "liveness_status": "unknown",            "liveness_checked_at": "2019-08-24T14:15:22Z",            "scrape_status": "pending",            "scrape_attempted_at": "2019-08-24T14:15:22Z",            "scraped_at": "2019-08-24T14:15:22Z"          }        ]      }    }  ],  "replies": {    "page_size": 0,    "results": 0,    "total_pages": 0,    "current_page": 0,    "next_page": 0,    "replies": [      {        "id": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "deletedAt": "2019-08-24T14:15:22Z",        "misc": {},        "title": "string",        "description": "string",        "slug": "string",        "author": {          "id": "string",          "joined": "2019-08-24T14:15:22Z",          "suspended": "2019-08-24T14:15:22Z",          "handle": "string",          "name": "string",          "signature": "string",          "roles": [            {              "badge": true,              "default": true,              "id": "string",              "name": "string",              "colour": "string",              "meta": {}            }          ]        },        "visibility": "draft",        "assets": [          {            "id": "string",            "filename": "string",            "path": "string",            "mime_type": "string",            "width": 0,            "height": 0,            "parent": {}          }        ],        "reacts": [          {            "id": "string",            "emoji": "string",            "author": {              "id": "string",              "joined": "2019-08-24T14:15:22Z",              "suspended": "2019-08-24T14:15:22Z",              "handle": "string",              "name": "string",              "signature": "string",              "roles": [                {                  "badge": true,                  "default": true,                  "id": "string",                  "name": "string",                  "colour": "string",                  "meta": {}                }              ]            }          }        ],        "collections": {          "in_collections": 0,          "has_collected": true        },        "likes": {          "likes": 0,          "liked": true        },        "meta": {},        "body": "string",        "body_links": [          {            "id": "string",            "createdAt": "2019-08-24T14:15:22Z",            "updatedAt": "2019-08-24T14:15:22Z",            "deletedAt": "2019-08-24T14:15:22Z",            "misc": {},            "url": "string",            "slug": "string",            "domain": "string",            "title": "string",            "description": "string",            "favicon_image": {              "id": "string",              "filename": "string",              "path": "string",              "mime_type": "string",              "width": 0,              "height": 0,              "parent": {}            },            "primary_image": {              "id": "string",              "filename": "string",              "path": "string",              "mime_type": "string",              "width": 0,              "height": 0,              "parent": {}            },            "liveness_status": "unknown",            "liveness_checked_at": "2019-08-24T14:15:22Z",            "scrape_status": "pending",            "scrape_attempted_at": "2019-08-24T14:15:22Z",            "scraped_at": "2019-08-24T14:15:22Z"          }        ],        "root_id": "string",        "root_slug": "string",        "reply_to": {}      }    ]  }}