Skip to main content
POST
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, parent comment author (for replies), 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.
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 an in-app notification.
  • { 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.