# Send a message on a conversation

Queues a message on a conversation that already exists — the reply. The medium comes from the thread, so the one route sends a text or an email; subject and content_html belong to an email thread and are refused on a text. Reach for this when you have the conversation id, and for POST /v1/comms/send when you have only an address. `template_id` (with `definition_key` + `row_id` for the record that fills it) sends a workspace template the same way POST /v1/comms/send does.

Access class: `workspace`.

## Endpoint

`POST /v1/comms/conversations/{id}/messages`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "content": "string",
    "content_html": "string",
    "definition_key": "string",
    "media_count": 1,
    "parent_message_id": 1,
    "provider": "string",
    "row_id": "",
    "subject": "string",
    "template_id": 1
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "call": {
    "ai_summary": "string",
    "answered_at": "string",
    "duration_seconds": 1,
    "ended_at": "string",
    "provider": "string",
    "recording_count": 1,
    "recording_url": "string",
    "result": "string",
    "started_at": "string",
    "transcript": "string"
  },
  "content": "string",
  "content_html": "string",
  "conversation_id": 1,
  "delivered_at": "string",
  "delivery": {
    "attempts": 1,
    "claimed_at": "string",
    "claimed_by": "string",
    "error": "string",
    "next_attempt_at": "string",
    "settled_at": "string",
    "state": "string"
  },
  "direction": "string",
  "external_id": "",
  "id": 1,
  "is_deleted": true,
  "medium": "string",
  "occurred_at": "string",
  "parent_message_id": 1,
  "read_at": "string",
  "recorded_at": "string",
  "sender_id": 1,
  "sender_name": "string",
  "sender_type": "string",
  "status": "string",
  "subject": "string",
  "text": {
    "error_code": "string",
    "error_message": "string",
    "media_count": 1,
    "provider": "string",
    "segment_count": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
