POST /api/v1/community/threads/{threadId}/replies
Posts a comment on a thread, as the key's holder. With parentReplyId, the
comment answers a first-level comment of that same thread — conversations
are two levels deep, never more.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Conditional — in the spaces of its own enrollments in progress |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None |
| Resource scope | The thread belongs to the key's organization |
| Participation | For a MEMBER: an enrollment in progress in the space's program or cohort |
| Resource state | The thread's space is not archived |
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | UUID | yes | Thread of the key's organization |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this organization |
Idempotency-Key | yes | Stable key for this reply; a replay returns the first reply |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
body | string | yes | no | Markdown, 1 to 10000 characters |
parentReplyId | UUID | no | no | A first-level comment of this thread |
attachmentIds | array | no | no | Up to 5 ids from Upload an attachment |
curl -X POST "$COHORTE_API_BASE_URL/api/v1/community/threads/$THREAD_ID/replies" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: reply-welcome-ada" \
-H "Content-Type: application/json" \
-d '{"body": "Hi everyone — Ada, backend developer, here for the agents track."}'201 Created — the reply.200 OK — replayed: true: the key was already used, the original reply comes back.400 Bad Request — missing Idempotency-Key, invalid JSON, a body out of bounds, an archived space, a parentReplyId that is not a first-level comment of this thread, or attachments that cannot be attached.401 Unauthorized — missing, unknown or expired key.403 Forbidden — the bearer has no enrollment in progress in the space's scope.404 Not Found — the thread is unknown or belongs to another school.| Field | Type | Description |
|---|---|---|
data.id | UUID | Reply id |
data.threadId | UUID | Its thread |
data.parentReplyId | UUID | The comment it answers, or null |
data.body | string | As posted |
data.authorUserId | UUID | The key's holder |
data.createdAt | string | ISO 8601 |
{
"success": true,
"replayed": false,
"data": {
"id": "3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b",
"threadId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"parentReplyId": null,
"body": "Hi everyone — Ada, backend developer, here for the agents track.",
"authorUserId": "22222222-2222-4222-8222-222222222222",
"createdAt": "2026-10-01T08:35:00.000Z"
},
"correlationId": "c0ffee00-1111-4222-8333-444455556666"
}