social.coves.community.comment.create
Create a comment on a post or another comment. Comments support nested threading, rich text, embeds, and self-labeling.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | comment.community.coves.social |
| Indexed |
Showing version bafyreihf26dbc6x5tizakgrfnx24nkrzxtwaujjuw5iuh6zdak6bwogeka. Show the latest
Checks
Validlarge-stringdefs.main.input.schema.properties.contentmaxLength is over 20 KB. Use a blob for content that large.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Create a comment on a post or another comment. Comments support nested threading, rich text, embeds, and self-labeling.",
"errors": [
{
"description": "The reply reference is invalid, malformed, or refers to non-existent content",
"name": "InvalidReply"
},
{
"description": "Comment content exceeds maximum length constraints",
"name": "ContentTooLong"
},
{
"description": "Comment content is empty or contains only whitespace",
"name": "ContentEmpty"
},
{
"description": "User is not authorized to create comments on this content",
"name": "NotAuthorized"
},
{
"description": "Rich text facets are malformed, exceed limits, or reference byte ranges outside the content",
"name": "InvalidFacets"
},
{
"description": "An #image facet breaks a placement rule: its index does not name an image of an images embed, it shares its facet with another feature, it places an index already placed, its range is empty, or its range lies inside a #code or #codeBlock range",
"name": "InvalidImageFacet"
},
{
"description": "The embed is not a social.coves.embed.images, social.coves.embed.imagesWithAttachment with a quoted post, or social.coves.embed.post that satisfies its lexicon and the embed write rules; the message describes the failure",
"name": "InvalidEmbed"
},
{
"description": "The embed carries more than 8 images",
"name": "TooManyImages"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"content": {
"description": "Comment text content",
"maxGraphemes": 10000,
"maxLength": 100000,
"type": "string"
},
"embed": {
"description": "Embedded media or quoted posts",
"refs": [
"social.coves.embed.images",
"social.coves.embed.imagesWithAttachment",
"social.coves.embed.post"
],
"type": "union"
},
"facets": {
"description": "Annotations for rich text (mentions, links, formatting, block structure)",
"items": {
"ref": "social.coves.richtext.facet",
"type": "ref"
},
"maxLength": 200,
"type": "array"
},
"labels": {
"description": "Self-applied content labels",
"ref": "com.atproto.label.defs#selfLabels",
"type": "ref"
},
"langs": {
"description": "Languages used in the comment content (ISO 639-1)",
"items": {
"format": "language",
"type": "string"
},
"maxLength": 3,
"type": "array"
},
"reply": {
"description": "References for maintaining thread structure. Root always points to the original post, parent points to the immediate parent (post or comment).",
"properties": {
"parent": {
"description": "Strong reference to the immediate parent (post or comment) being replied to",
"ref": "com.atproto.repo.strongRef",
"type": "ref"
},
"root": {
"description": "Strong reference to the original post that started the thread",
"ref": "com.atproto.repo.strongRef",
"type": "ref"
}
},
"required": [
"root",
"parent"
],
"type": "object"
}
},
"required": [
"reply",
"content"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"cid": {
"description": "CID of the created comment record",
"format": "cid",
"type": "string"
},
"uri": {
"description": "AT-URI of the created comment",
"format": "at-uri",
"type": "string"
}
},
"required": [
"uri",
"cid"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "social.coves.community.comment.create",
"lexicon": 1
}