Skip to main content
Create Comment
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 (for a top-level comment), the parent comment’s author (for a reply), and mentioned users. Authentication required.

Body Parameters

string
required
The UUID of the entity this comment belongs to.
string
The text content of the comment. At least one of content, gif, or attachments must be provided.
object
A GIF to attach to the comment. At least one of content, gif, or attachments must be provided.
aspectRatio is width ÷ height as a decimal string. Colon notation like "16:9" is rejected by clients that compute layout from it.
object[]
An array of generic attachment objects. At least one of content, gif, or attachments must be provided.
string
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.
string
The UUID of a comment being quoted or referenced. Used for quote-replies.
string
Your application’s identifier for this comment.
object[]
Users or spaces mentioned in the comment. Each mentioned user receives one in-app notification, however many times they are mentioned, except the person the comment already notifies: the entity owner for a top-level comment, or the parent comment’s author for a reply. A space mention sends no notification, and a commenter mentioning themselves is not notified.
  • { type: "user", id: string, username: string, foreignId?: string }
  • { type: "space", id: string, slug: string }
object
A free-form JSON object for any custom data your application needs alongside the comment.
string
Attribute the comment to a specific user. Service or master key only. Useful for backfilling comments from external systems.
string
ISO 8601 datetime to backfill a creation timestamp. Service or master key only.
string
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

Returned when none of content, gif, or attachments is provided.