---
title: "Create mass comments"
method: POST
path: "/{sub_domain}/api/comments/mass-comments"
tags: ["Comments"]
---

# Create mass comments

`POST /{sub_domain}/api/comments/mass-comments`

## Request

- Base URL: `https://api.commpeak.com/dialer`
- URL: `https://api.commpeak.com/dialer/{sub_domain}/api/comments/mass-comments`
- Auth: API key in header `Authorization`

Add several comments to campaign leads in a single request.

**When to use.** Create many comments at once instead of calling Create comment repeatedly. Each item is validated and stored independently, so one invalid item does not stop the others from being created.

**Parameters.** Send an array of comment objects. Each object needs `creator_user_id`, `campaign_lead_id` and `body`, and the referenced user and campaign lead must already exist.

**Returns.** `{ "comments": [ ... ] }` with one result per submitted item. Each result carries a `success` field: `true` when the comment was created, returned alongside its `id` and `created_at`, or a message explaining why the item was rejected.

**Example.**

```json
[
  {
    "creator_user_id": "100",
    "campaign_lead_id": "1234",
    "body": "first comment"
  },
  {
    "creator_user_id": "100",
    "campaign_lead_id": "1235",
    "body": "second comment"
  }
]
```

## Path parameters

- `sub_domain` string, required: Dialer Name (subdomain)

## Request body

- CreateCommentInput[]
  - `creator_user_id` string, required: ID of the user creating the comment.
  - `campaign_lead_id` string, required: ID of the campaign lead the comment relates to.
  - `body` string, required: The comment's text.

## Response `201`

Successful Response

- CommentsResponse
  - `comments` CommentItem[], required
    - `id` integer, nullable: Comment ID (present only for successfully created items).
    - `campaign_lead_id` integer, nullable: Campaign lead ID the comment belongs to.
    - `creator_user_id` integer, nullable: ID of the user who created the comment.
    - `lead_id` integer, nullable: Lead ID.
    - `body` string, nullable: The comment's text.
    - `created_at` string, nullable: Timestamp the comment was created (present only for successfully created items).
    - `username` string, nullable: Username of the comment's creator.
    - `original_identifier` string, nullable: Lead original identifier.
    - `success` boolean, nullable: true when the comment was created; otherwise a string describing why it failed.
  - `total_comments` integer, nullable: Total number of comments in the response.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-dialer-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/revisions/18c5edc07544?raw)
