---
title: "Create a comment"
method: POST
path: "/comments.create"
tags: ["Comments"]
---

# Create a comment

`POST /comments.create`

Create a comment

## Request body

- object
  - `id` string, uuid
  - `documentId` string, uuid, required
  - `parentCommentId` string, uuid
  - `data` object, required

## Response `200`

OK

- object
  - `data` Comment
    - `id` string, uuid — Unique identifier for the object.
    - `data` object — The editor data representing this comment.
    - `documentId` string, uuid — Identifier for the document this is related to.
    - `parentCommentId` string, uuid — Identifier for the comment this is a child of, if any.
    - `createdAt` string, date-time — The date and time that this object was created
    - `createdBy` User
      - `id` string, uuid — Unique identifier for the object.
      - `name` string — The name of this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `avatarUrl` string, uri — The URL for the image associated with this user, it will be displayed in the application UI and email notifications.
      - `email` string, email — The email associated with this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `role` 'admin' | 'member' | 'viewer' | 'guest'
      - `isSuspended` boolean — Whether this user has been suspended.
      - `lastActiveAt` string, date-time — The last time this user made an API request, this value is updated at most every 5 minutes.
      - `createdAt` string, date-time — The date and time that this user first signed in or was invited as a guest.
    - `updatedAt` string, date-time — The date and time that this object was last changed
    - `updatedBy` User
      - `id` string, uuid — Unique identifier for the object.
      - `name` string — The name of this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `avatarUrl` string, uri — The URL for the image associated with this user, it will be displayed in the application UI and email notifications.
      - `email` string, email — The email associated with this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `role` 'admin' | 'member' | 'viewer' | 'guest'
      - `isSuspended` boolean — Whether this user has been suspended.
      - `lastActiveAt` string, date-time — The last time this user made an API request, this value is updated at most every 5 minutes.
      - `createdAt` string, date-time — The date and time that this user first signed in or was invited as a guest.

## Other responses

- `401` — The API key is missing or otherwise invalid.
- `403` — The current API key is not authorized to perform this action.
- `404` — The specified resource was not found.

## Changes

- **2024-07-06** `7b33b538cd7d` — 9 info
  - added the optional property `data` to the response with the `401` status
  - added the optional property `data` to the response with the `403` status
  - added the optional property `data` to the response with the `404` status
  - added the optional property `message` to the response with the `401` status
  - …5 more

[Change history](https://skmtc.dev/defaulr/apis/outline-api/changes/comments.create/post.md)

---

[API](https://skmtc.dev/defaulr/apis/outline-api.md) · [All operations](https://skmtc.dev/defaulr/apis/outline-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/defaulr/outline-api/revisions/7b33b538cd7d/schema)
