# Conversations and Message Replies (Streaming/Synchronous)

Send messages to AI assistant and receive responses.

```bash
curl -X POST \
  'https://api.maiagent.ai/api/v1/chatbots/{chatbot_id}/completions/' \
  -H 'Authorization: Api-Key YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "conversation": "string|null",
    "message": {
      "content": "string",
      "attachments": []
    },
    "is_streaming": boolean
  }'
```

**Parameters:**

* `chatbot_id` (path parameter): Chatbot ID
* `conversation` (request content): Optional conversation ID for continuing conversations
* `message.content` (request content): Message content to be sent
* `message.attachments` (request content): Array of attachments (if any)
* `is_streaming` (request content): Whether to use streaming response

**Response (Non-streaming):**

```json
{
  "content": "string",
  "conversationId": "string"
}
```

**Response (Streaming):**

Server-sent events format:

```
data: {
  "content": "string",
  "conversation_id": "string",
  "done": boolean
}
```

Notes:

* For streaming responses, the server will send multiple events containing partial content until the response is complete
* The conversation ID returned in the response can be used for subsequent requests to continue the conversation

## Integration Results

{% embed url="<https://drive.google.com/file/d/1sCIoxxASZ-SnHPAmkjDT270B3dz0LyHo/view?usp=sharing>" %}
