# sendCoachingMessage

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/ai-coaching/conversations/{conversationId}/messages |

| Field | Value |
|---|---|
| operationId | sendCoachingMessage |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /ai-coaching/conversations/{conversationId}/messages |
| tags | `AI Coaching` |
| summary | Stream an AI coaching message response |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| conversationId | path | true | string |  |

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/SendMessageBodyDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | SSE stream of coaching events (text/event-stream) |  |
| 400 | Invalid message payload | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 404 | Conversation not found (pre-stream) | #/components/schemas/ApiErrorResponseDto |
| 429 | Per-individual AI-coaching rate limit exceeded | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Conversation not found",
  "error": "CONVERSATION_NOT_FOUND"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "Too many coaching requests",
  "error": "THROTTLED"
}
```
