---
title: "POST /simulate/call-executions/{call_execution_id}/chat/send-message/"
method: POST
path: "/simulate/call-executions/{call_execution_id}/chat/send-message/"
tags: ["simulate"]
---

# POST /simulate/call-executions/{call_execution_id}/chat/send-message/

`POST /simulate/call-executions/{call_execution_id}/chat/send-message/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/simulate/call-executions/{call_execution_id}/chat/send-message/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Send a message to a chat execution

## Request body

- SendChatRequest
  - `messages` ChatMessageContract[], nullable
    - `role` 'user' | 'assistant' | 'tool', required
    - `content` string, nullable
    - `tool_call_id` string, nullable
    - `name` string, nullable
    - `metadata` object, nullable
    - `tool_calls` ChatToolCall[], nullable
      - `id` string, required
      - `type` string, required
      - `function` ChatToolCallFunction, required
        - `name` string, required
        - `arguments` string, required
  - `metrics` object, nullable
  - `initiate_chat` boolean

## Response `200`

OK

- ChatSendMessageResponse
  - `status` boolean
  - `result` ChatSendMessageResult, required
    - `input_message` ChatMessageContract[], nullable
      - `role` 'user' | 'assistant' | 'tool', required
      - `content` string, nullable
      - `tool_call_id` string, nullable
      - `name` string, nullable
      - `metadata` object, nullable
      - `tool_calls` ChatToolCall[], nullable
        - `id` string, required
        - `type` string, required
        - `function` ChatToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - `output_message` ChatMessageContract[], nullable
      - `role` 'user' | 'assistant' | 'tool', required
      - `content` string, nullable
      - `tool_call_id` string, nullable
      - `name` string, nullable
      - `metadata` object, nullable
      - `tool_calls` ChatToolCall[], nullable
        - `id` string, required
        - `type` string, required
        - `function` ChatToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - `message_history` ChatMessageContract[], required
      - `role` 'user' | 'assistant' | 'tool', required
      - `content` string, nullable
      - `tool_call_id` string, nullable
      - `name` string, nullable
      - `metadata` object, nullable
      - `tool_calls` ChatToolCall[], nullable
        - `id` string, required
        - `type` string, required
        - `function` ChatToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - `chat_ended` boolean

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
