Creates a new comment on an entity, or a reply to an existing comment. The comment is attributed to the authenticated user. Notifications are sent to the entity owner, parent comment author (for replies), and mentioned users.
Authentication required.
Body Parameters
The UUID of the entity this comment belongs to.
The text content of the comment. At least one of content, gif, or attachments must be provided.
A GIF to attach to the comment. At least one of content, gif, or attachments must be provided. {
"id" : "gif-id" ,
"altText" : "laughing cat" ,
"gifUrl" : "https://media.giphy.com/..." ,
"gifPreviewUrl" : "https://media.giphy.com/..." ,
"url" : "https://giphy.com/..." ,
"aspectRatio" : "16:9"
}
An array of generic attachment objects. At least one of content, gif, or attachments must be provided.
The UUID of the parent comment. When provided, this comment is treated as a reply to that comment. The parent comment’s author receives a reply notification.
The UUID of a comment being quoted or referenced. Used for quote-replies.
Your application’s identifier for this comment.
Users or spaces mentioned in the comment. Each mentioned user receives an in-app notification.
{ type: "user", id: string, username: string, foreignId?: string }
{ type: "space", id: string, slug: string }
A free-form JSON object for any custom data your application needs alongside the comment.
Attribute the comment to a specific user. Service or master key only. Useful for backfilling comments from external systems.
ISO 8601 datetime to backfill a creation timestamp. Service or master key only.
ISO 8601 datetime for updatedAt. Requires createdAt. Must be ≥ createdAt. Service or master key only.
Response
Returns 201 Created with the new Comment object, populated with the author’s user profile.
Error Responses
{ "error" : "Entity not found" , "code" : "comment/entity-not-found" }
{ "error" : "Missing user ID" , "code" : "comment/missing-user-id" }
Returned when none of content, gif, or attachments is provided.