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

# Send Chat Message

> Send an interactive message through chat node

## Header

<ParamField header="Authorization" type="string" required>
  Bearer token for API authentication. Format: `Bearer {{apiToken}}`
</ParamField>

## Request Body

<CodeGroup>
  ```json Slack theme={null}
  {
    "chatNodeId": "<chat_node_id>",
    "workflowExecutionId": "<workflow_execution_id>", 
    "body": "<slack_body>",
    "buttons": [
      {
        "text": "<button_text_1>",
        "value": "<button_value_1>",
        "style": "<button_style_1>"
      },
     {
        "text": "<button_text_1>",
        "value": "<button_value_1>",
        "style": "<button_style_1>"
      } 
    ],
    "threadId": "<thread_id>"
  }
  ```

  ```json Gmail theme={null}
  {
    "chatNodeId": "<chat_node_id>",
    "workflowExecutionId": "<workflow_execution_id>", 
  "subject": "Customer Support - Order #12345",
    "body": <email_body>",
    "threadId": "<thread_id>"
  }
  ```

  ```json Teams theme={null}
  {
    "chatNodeId": "<chat_node_id>",
    "workflowExecutionId": "<workflow_execution_id>", 
    "body": <team_message_body>",
    "threadId": "<thread_id>"
  }
  ```

  ```json Using Templates theme={null}
  {
    "chatNodeId": "<chat_node_id>",
    "workflowExecutionId": "<workflow_execution_id>", 
  "templateId": "<template_id>",
    "templateVariables":
          { // Variables to substitute in template
            "<variable_1>":<value_1>",
            "<variable_2>":<value_2>",
          },
    "threadId": "<thread_id>"
  }
  ```
</CodeGroup>

## Body Parameters

<ParamField body="template" type="object">
  Template configuration for the message
</ParamField>

<ParamField body="templateVariables" type="object">
  Key-value pairs to populate template placeholders
</ParamField>

<ParamField body="providerIntegration" type="object">
  Provider configuration
</ParamField>

<ParamField body="subject" type="string">
  Message subject (for EMAIL only)
</ParamField>

<ParamField body="body" type="string">
  Message body (for SLACK, EMAIL, TEAMS)
</ParamField>

<ParamField body="buttons" type="array">
  Interactive buttons (for SLACK only)
</ParamField>

<RequestExample>
  ```json Request Example theme={null}
  {
    "chatNodeId": "chat_node_id_1",
    "workflowExecutionId": "123e4567-e89b-12d3-a456-426614174000",
    "subject": "Your Order Update",
    "body": "Hello! We have an update on your order #12345. Please reply with your preferred delivery time.",
    "threadId": "email_thread_id_1"
  }

  ```
</RequestExample>

## Response

Success Response (200 OK)

* The API returns an empty response body with HTTP status 200 when the chat message is successfully queued for processing.

## Status Codes

* `200` - OK
* `400` - BAD REQUEST
* `401` - UNAUTHORISED
* `404` - NOT FOUND
