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

# Send message

> Send a message in an existing conversation and receive the AI's response.

Sends a user message to an existing conversation and returns the assistant's response. The assistant processes the message using its configured AI model and any available tools.

## Endpoint

`POST /conversations/{uuid}/messages`

## Path parameters

<ParamField path="uuid" type="string" required>
  UUID of the conversation to send the message to.
</ParamField>

## Request

<ParamField body="message" type="string" required>
  The user's message. Maximum 2000 characters.
</ParamField>

## Response

<ResponseField name="status" type="boolean">Whether the request was successful.</ResponseField>
<ResponseField name="message" type="string">The assistant's response.</ResponseField>

<ResponseField name="function_calls" type="array">
  Functions executed by the assistant while processing the message. Empty array if none were called.

  <Expandable title="Function call properties">
    <ResponseField name="name" type="string">Name of the function called.</ResponseField>
    <ResponseField name="arguments" type="object">Arguments passed to the function.</ResponseField>
    <ResponseField name="result" type="object">Result returned by the function.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://portal.intellixent.ai/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7/messages" \
    -H "Content-Type: application/json" \
    -d '{"message": "I would like to schedule a demo for next week"}'
  ```

  ```javascript Node.js theme={null}
  const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';

  const response = await fetch(
    `https://portal.intellixent.ai/api/conversations/${conversationId}/messages`,
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ message: 'I would like to schedule a demo for next week' })
    }
  );

  const data = await response.json();
  console.log(data.message); // Assistant's response
  ```
</CodeGroup>

```json 200 Success theme={null}
{
  "status": true,
  "message": "I'd be happy to help you schedule a demo! I have availability on Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which time works best for you?",
  "function_calls": []
}
```

```json 200 With function calls theme={null}
{
  "status": true,
  "message": "I've checked our calendar and found available slots for next week.",
  "function_calls": [
    {
      "name": "check_calendar_availability",
      "arguments": {
        "start_date": "2025-01-13",
        "end_date": "2025-01-17"
      },
      "result": {
        "available_slots": ["2025-01-13 14:00", "2025-01-15 10:00"]
      }
    }
  ]
}
```

```json 404 Conversation not found theme={null}
{
  "status": false,
  "error": "Conversation not found"
}
```

```json 400 Insufficient balance theme={null}
{
  "status": false,
  "error": "Insufficient balance. Please top up your account."
}
```

<Note>
  Each user message in a `widget` conversation costs \$0.01. Test conversations are free.
</Note>
