---
title: "Add an internal comment to a thread"
method: POST
path: "/api/inboxes/{channelId}/threads/{threadId}/comments"
tags: ["Inboxes"]
---

# Add an internal comment to a thread

`POST /api/inboxes/{channelId}/threads/{threadId}/comments`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/inboxes/{channelId}/threads/{threadId}/comments`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/inboxes/:channelId/threads/:threadId/comments/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds an internal (team-only) comment to the thread, as the acting user,
the same as commenting in the app. It is never sent to the contact.
`content` is HTML and is sanitized. Mention markup in it labels the
thread for the mentioned users and teams, marks it unread for them and
notifies them. Mentioned contacts and location cards are related to the
thread.

The acting user is the delegate token's own user. With an API key or
partner token, name one in `userId`. Guests cannot comment.

## Path parameters

- `channelId` string, required
- `threadId` string, required

## Request body

- object
  - `content` string, required: Comment body, HTML.
  - `userId` string: Acting user (comment author). Required with an API key or partner token.

## Response `201`

Comment added.

- object
  - `data` object
    - `threadId` string
    - `commentId` string

## Other responses

- `400`: Invalid body or missing `userId`.
- `401`: The acting user is not in the company.
- `403`: No access to this inbox, or the acting user is a guest.
- `404`: Inbox or thread not found, or the acting user cannot see the thread.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
