> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rogeriq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message

` POST /projects/{projectId}/conversations/{conversationId}/messages `

Send a message

## Servers

- ` https://api.rogeriq.com/api/v1 `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKey `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key with `riq_` prefix

## Parameters

### ` projectId ` (path, required)

- ` value `: type ` string `

### ` conversationId ` (path, required)

- ` value `: type ` string `

## Request body (required)

Content type: ` application/json `

- ` value `: type ` unknown `

## Responses

### ` 201 ` — Created message

Content type: ` application/json `

- ` value `: type ` object `

  - ` data `: type ` object `

    - ` id `: type ` string `

    - ` conversation_id `: type ` string `

    - ` sender_type `: type ` string `

      - enum: ` ["customer","agent","ai","system"] `

    - ` sender_id `: type ` string `; nullable

    - ` content `: type ` string `

    - ` content_type `: type ` string `

      - enum: ` ["text","html","markdown"] `

    - ` is_internal `: type ` boolean `

    - ` created_at `: type ` string `; format ` date-time `

## Request examples

### cURL

```curl
curl -X POST 'https://api.rogeriq.com/api/v1/projects/string/conversations/string/messages' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d 'null'
```

### JavaScript

```javascript
const response = await fetch('https://api.rogeriq.com/api/v1/projects/string/conversations/string/messages', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify(null)
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://api.rogeriq.com/api/v1/projects/string/conversations/string/messages', headers=headers, json=null)
print(response.json())
```