---
title: "Create a comment."
method: POST
path: "/contracts/{contract_id}/comments"
tags: ["Contract - Comments"]
---

# Create a comment.

`POST /contracts/{contract_id}/comments`

Use this endpoint to add a comment to a specific contract. See [Comment](https://developer.oneflow.com/docs/comment) for more information.

## Path parameters

- `contract_id` integer, required

## Headers

- `x-oneflow-api-token` string, required
- `x-oneflow-user-email` string, email, required

## Request body

- object — An individual comment in a specific contract.
  - `_private_ownerside` object — Contract comment attributes that are private to the ownerside.
    - `custom_id` string, nullable
  - `body` string, required — The actual message of a comment.
  - `parent_id` integer, nullable — The id of the parent comment. It should not be an id of a reply comment.
  - `participants` object[] — A list containing the participant IDs that the comment should notify.
    - `participant_id` integer, required
  - `private` boolean — Indicates this comment is private or not.

## Response `200`

Returns the created comment.

- object — Contract comment.
  - `_links` object — Links to related endpoints.
    - `comments` object
      - `href` string, nullable
    - `contracts` object
      - `href` string, nullable
    - `contract` object
      - `href` string, nullable
    - `create` object
      - `href` string, nullable
    - `data_field` object
      - `href` string, nullable
    - `data_fields` object
      - `href` string, nullable
    - `events` object
      - `href` string, nullable
    - `event` object
      - `href` string, nullable
    - `files` object
      - `href` string, nullable
    - `file` object
      - `href` string, nullable
    - `next` object
      - `href` string, nullable
    - `parties` object
      - `href` string, nullable
    - `party` object
      - `href` string, nullable
    - `previous` object
      - `href` string, nullable
    - `publish` object
      - `href` string, nullable
    - `self` object
      - `href` string, nullable
    - `template_types` object
      - `href` string, nullable
    - `template_type` object
      - `href` string, nullable
    - `template` object
      - `href` string, nullable
    - `templates` object
      - `href` string, nullable
    - `workspaces` object
      - `href` string, nullable
    - `workspace` object
      - `href` string, nullable
    - `playbooks` object
      - `href` string, nullable
  - `_private_ownerside` object, nullable, required — Comment data that is private to the ownerside.
    - `custom_id` string, nullable, required
  - `body` string, required — The actual message of a comment.
  - `created_time` string, datetime, required — The time when the comment was created.
  - `id` integer, required — The id of a comment.
  - `parent_id` integer, nullable — The id of the parent comment. It should not be an id of a reply comment.
  - `participants` object, nullable — An object containing the participants' information that the comment should notify.
    - `sender` object — Contract comment related participant details.
      - `participant_id` integer, required
      - `participant_name` string, required
      - `party_id` integer, required
      - `party_name` string, required
    - `recipients` object[] — The list of recipients for particular comment.
      - `participant_id` integer, required
      - `participant_name` string, required
      - `party_id` integer, required
      - `party_name` string, required
  - `private` boolean, required — Indicates this comment is private or not.
  - `updated_time` string, datetime, nullable — The time when the comment was updated.

## Other responses

- `400` — Invalid format or content of the request.
- `401` — The API token or the user email is invalid.
- `403` — The request is not authorized by the server.
- `404` — A required entity is missing.
- `409` — A conflict occurred with the current state of the target resource.

---

[API](https://skmtc.net/oneflow/apis/public-api-for-oneflow.md) · [All operations](https://skmtc.net/oneflow/apis/public-api-for-oneflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneflow/public-api-for-oneflow/versions/0e73a45dec15/schema)
