Storyden
Posts

Post Update

Publish changes to a single post.

PATCH
/posts/{post_id}

Publish changes to a single post.

Authorization

cookiestoryden-session<token>

Path Parameters

post_id*string

Unique post ID.

Formatxid

Request Body

Create a post within a thread.

application/json
  1. body
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.

meta?

Arbitrary metadata for the resource.

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

A web address

Formaturl

Response Body

Post updated successfully.

application/json
  1. response

A post represents a temporal piece of content, it can be a thread, or a reply to a thread or something else such as a blog, announcement, etc. Post is used in generic use-cases where it may not matter whether you want a thread or a reply, such as search results or recommendations.

id*Identifier

A unique identifier for this resource.

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<>
Example Request
curl -X PATCH 'https://example.com/api/posts/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"    }  ]}