Storyden
Threads

Thread Update

Publish changes to a thread using a partial update. Every update requires authentication and must be made by the thread author or a member with MANAGE_POSTS. Setting the pinned rank or locked state additionally requires MANAGE_POSTS, including when the requesting member is the thread author. Supply the properties to change. Omitted properties preserve their existing values unless a documented transition changes a related field; see ThreadMutableProps for lifecycle and conclusion transitions.

PATCH
/threads/{thread_mark}

Publish changes to a thread using a partial update. Every update requires authentication and must be made by the thread author or a member with MANAGE_POSTS. Setting the pinned rank or locked state additionally requires MANAGE_POSTS, including when the requesting member is the thread author.

Supply the properties to change. Omitted properties preserve their existing values unless a documented transition changes a related field; see ThreadMutableProps for lifecycle and conclusion transitions.

Authorization

cookiestoryden-session<token>

Path Parameters

thread_mark*string

Thread unique and permanent identifier.

Formatxid-prefixed-kebab-case-string

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<>
category?Identifier

A unique identifier for this resource.

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

A web address

Formaturl
lifecycle_state?ThreadLifecycleState

The thread author or a member with Manage Posts may change the state. Reopening clears the conclusion. Resolution does not restrict replies.

Value in"open""resolved"
conclusion_reply_id?|

Nominate a published, undeleted reply from anywhere in this thread's reply tree as its conclusion. Setting this also resolves the thread. Set null to remove conclusion without reopening. Omission preserves the current conclusion, unless lifecycle_state is set to open. A non-null conclusion with lifecycle_state open is invalid.

Formatxid
meta?

Arbitrary metadata for the resource.

Response Body

Thread updated.

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 PATCH 'https://example.com/api/threads/string' \  -H 'Content-Type: application/json' \  -d '{}'
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": {}      }    ]  }}