Posts

Canonical Thread view

Posts can be viewed in their thread via a short redirect at https://posts.pnut.io/{post_id}.

Object

Use live API calls for an example of the object.

Fields

Field Type Description
created_at string The time at which the post was created in ISO 8601 format.
id string Primary identifier for a post. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to Post objects. There can be a Post and User with the same ID; no relation is implied.
is_deleted boolean Only set if true. Post is deleted. `content` will not be set.
is_nsfw boolean Only set if true. User marked the post as "Not Safe For Work".
is_revised boolean Only set if true. Post has been revised. Looking up the revised posts will return a result.
revision string Only set if post is a "previous" version of a post. (i.e., from the /posts/{post_id}/revisions endpoint).
source object
Field Type Description
name string Description of the API consumer that created this post.
link string Link provided by the API consumer that created this post.
id string The public client id of the API consumer ("app") that created this post.
user object This is an embedded User object. Note: In certain cases (e.g., when a user account has been deleted), this key may be omitted.
thread_id string The id of the post at the root of the thread that this post is a part of. If thread_id==id then this property does not guarantee that the thread has > 1 post. Please see replies count.
reply_to string Optional id of the post this post is replying to.
repost_of string Optional embedded post object being reposted.
counts object
Field Type Description
bookmarks integer The number of users who have bookmarked this post.
replies integer The number of posts created in reply to this post.
reposts integer The number of users who have reposted this post.
threads integer The number of threads created in reply to this or other children of this post.
content object

NOTE: Not included if the post has been deleted.

Field Type Description
text string User supplied text of the post. All Unicode characters allowed. Maximum length 256 characters. The maximum length can be retrieved from the Configuration endpoint.
html string Server-generated annotated HTML rendering of post text.
entities object Rich text information for this post. See the Entities documentation.
links_not_parsed boolean If set, the server has not yet attempted to retrieve a title and description for link entities in this post.
you_bookmarked boolean (Optional) True if authenticated user bookmarked the post
you_reposted boolean (Optional) True if authenticated user reposted the post

General Post Parameters

Any endpoint that returns post objects can be subject to these parameters.

General Parameters

Name Type Description
include_deleted integer (0 or 1) Include deleted posts. Defaults to true.
include_client integer (0 or 1) Include the client object with the post. Defaults to true.
include_counts integer (0 or 1) Include the post's counts. Also affects any included user object. Defaults to true.
include_html integer (0 or 1) Should the post and user html field be included alongside the text field in the response objects? Defaults to true.
include_post_html integer (0 or 1) Should the post html field be included alongside the text field in the response objects? Defaults to true. Note that include_html takes priority if present.
include_bookmarked_by integer (0 or 1) Include bookmarked_by: a sampled list of users who bookmarked the post. Defaults to false.
include_reposted_by integer (0 or 1) Include reposted_by: a sampled list of users who reposted the post. Defaults to false.
include_directed_posts integer (0 or 1) Include posts with "leading mentions" of users you do not follow. Not applicable to all post streams. Defaults to true.
include_mention_posts integer (0 or 1) If false, do not include posts with mentions
include_copy_mentions integer (0 or 1) Include "copy mentions" in the /users/{user_id}/mentions endpoint. Defaults to true.
include_replies integer (0 or 1) If false, do not include posts replying to other posts
include_muted integer (0 or 1) Include posts from users you have muted. Defaults to false.
include_raw integer (0 or 1) Include raw on all objects. Defaults to false.
include_post_raw integer (0 or 1) Include raw on all post objects. Defaults to false.