> ## 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.

# Add Channel Template

> Add or update channel templates to draft version of template

## Header

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

## Query Parameters

<ParamField query="id" type="uuid" required>
  The ID of the template.
</ParamField>

```json Request Body theme={null}
{
    "SMS": {
        "body": "<message>",
        "channel": "SMS",
        "isFlash": false,
        "isUnicode": false,
        "dltTemplateId": "<dlt_template_id>"
    },
    "EMAIL": {
        "subject": "<subject>",
        "channel": "EMAIL",
        "body": "<html_body>",
        "fromName": "<from_name>",
        "fromEmail": "<from_email>",
        "replyTo": "<reply_to_email>",
        "cc": ["<cc_email>"],
        "bcc": ["<bcc_email>"],
        "attachments": [],
        "isRawHTML": true,
        "isPlainText": false
    },
    "SLACK": {
        "channel": "SLACK",
        "body": "<message>",
        "attachments": [],
        "buttons": []
    },
    "WHATSAPP": {
        "channel": "WHATSAPP",
        "type": "TEMPLATE",
        "template": {
        	"name": "<template_name>",
            "language": {
            	"code": "EN"
        	 },
         	"components": []
      	}
    },
    "PUSH": {
        "channel": "PUSH",
        "title": "<title>",
        "body": "<message>",
        "imageUrl": "<image_url>",
        "deepLink": "<deeplink_url>",
        "timeToLive": 86400,
        "priority": "<high|normal|low>",
        "analyticsLabel": "<event_name>",
        "android": {
            "channelId": "<channel_id>",
            "icon": "<icon_name>",
            "color": "<hex_color>",
            "sound": "<sound_name>"
        },
        "ios": {
            "sound": "<sound_name>",
            "badge": 1,
            "category": "<category_id>"
        },
        "web": {
            "icon": "<icon_url>",
            "badge": "<badge_url>"
        }
    },
    "IN_APP": {
        "channel": "IN_APP",
        "title": "<title>",
        "body": "<message>",
        "type": "<notification_type>",
        "priority": "<priority_level>",
        "expiry": 168,
        "actions": [
            {
                "type": "<action_type>",
                "label": "<button_label>"
            }
        ]
    }
}
```

<RequestExample>
  ```json Request Example theme={null}
  {
      "SMS": {
          "body": "Your verification code is 123456",
          "channel": "SMS",
          "isFlash": false,
          "isUnicode": false,
          "dltTemplateId": "TEMPLATE123"
      },
      "EMAIL": {
          "subject": "Welcome to Our Service",
          "channel": "EMAIL",
          "body": "<p>Hello,</p><p>Thank you for signing up!</p>",
          "fromName": "Support Team",
          "fromEmail": "noreply@example.com",
          "replyTo": "support@example.com",
          "cc": ["team@example.com"],
          "isRawHTML": true
      },
      "SLACK": {
          "channel": "SLACK",
          "body": "New user signup!\n*Name*: John Doe\n*Email*: john@example.com"
      },
      "WHATSAPP": {
              "channel": "WHATSAPP",
              "type": "TEMPLATE",
              "template": {
                  "name": "payment_request_template",
                  "language": {
                      "code": "EN"
                  },
                  "components": [
                      {
                          "type": "HEADER",
                          "parameters": [
                              {
                                  "type": "DOCUMENT",
                                  "document": {
                                      "link": "{{doc}}",
                                      "filename": "{{fileName}}"
                                  },
                                  "parameter_name": "document"
                              }
                          ]
                      },
                      {
                          "type": "BODY",
                          "parameters": [
                              {
                                  "text": "{{name}}",
                                  "type": "TEXT",
                                  "parameter_name": "1"
                              },
                              {
                                  "text": "{{event}}",
                                  "type": "TEXT",
                                  "parameter_name": "2"
                              },
                              {
                                  "text": "{{amount}}",
                                  "type": "TEXT",
                                  "parameter_name": "3"
                              }
                          ]
                      },
                      {
                          "type": "BUTTON",
                          "index": 0,
                          "sub_type": "URL",
                          "parameters": [
                              {
                                  "text": "https://www.mystore.com/",
                                  "type": "text",
                                  "parameter_name": "1"
                              }
                          ]
                      }
                  ]
              }
      },
      "PUSH": {
          "channel": "PUSH",
          "title": "Welcome!",
          "body": "Thanks for installing our app.",
          "priority": "high"
      },
      "IN_APP": {
          "channel": "IN_APP",
          "title": "Welcome Aboard!",
          "body": "Get started with our app by completing your profile.",
          "type": "WELCOME"
      }
  }
  ```
</RequestExample>

## Body Parameters

<ParamField body="SMS" type="object">
  Configuration for SMS channel.

  <ParamField type="string" required>
    Must be set to "SMS".
  </ParamField>

  <ParamField type="string" required>
    The message content for SMS.
  </ParamField>

  <ParamField type="boolean">
    Set to `true` to send as a flash SMS. Default: `false`.
  </ParamField>

  <ParamField type="boolean">
    Set to `true` for messages containing non-ASCII characters. Default: `false`.
  </ParamField>
</ParamField>

<ParamField body="EMAIL" type="object">
  Configuration for Email channel.

  <ParamField type="string" required>
    Must be set to "EMAIL".
  </ParamField>

  <ParamField type="string" required>
    The email subject line.
  </ParamField>

  <ParamField type="string" required>
    The email body content. Can be HTML or plain text based on `isRawHTML` and `isPlainText` flags.
  </ParamField>

  <ParamField type="string">
    The sender's email address.
  </ParamField>

  <ParamField type="string">
    The reply-to email address.
  </ParamField>

  <ParamField type="array">
    List of CC email addresses.
  </ParamField>

  <ParamField type="array">
    List of BCC email addresses.
  </ParamField>

  <ParamField type="array">
    Array of attachment objects.
  </ParamField>

  <ParamField type="boolean">
    Set to `true` if `body` contains raw HTML. Default: `false`.
  </ParamField>

  <ParamField type="boolean">
    Set to `true` if `body` is plain text. Default: `false`.
  </ParamField>
</ParamField>

<ParamField body="SLACK" type="object">
  Configuration for Slack channel.

  <ParamField type="string" required>
    Must be set to "SLACK".
  </ParamField>

  <ParamField type="string" required>
    The message content for Slack.
  </ParamField>

  <ParamField type="array">
    Array of Slack attachment objects.
  </ParamField>

  <ParamField type="array">
    Array of interactive button objects.

    <ParamField type="object">
      <ParamField type="string">
        The button's display text.
      </ParamField>

      <ParamField type="string">
        A unique identifier for the button's action.
      </ParamField>

      <ParamField type="string">
        The value sent when the button is clicked.
      </ParamField>

      <ParamField type="string">
        The button style (e.g., "primary", "danger").
      </ParamField>
    </ParamField>
  </ParamField>
</ParamField>

<ParamField body="WHATSAPP" type="object">
  Configuration for WhatsApp channel.

  <ParamField type="string" required>
    Must be set to "WHATSAPP".
  </ParamField>

  <ParamField type="string" required>
    The name of the WhatsApp template.
  </ParamField>

  <ParamField type="string" required>
    The language code for the template (e.g., "en").
  </ParamField>

  <ParamField type="string">
    The namespace for the WhatsApp template.
  </ParamField>

  <ParamField type="array">
    Array of message components (headers, body, buttons).

    <ParamField type="object">
      <ParamField type="string">
        Component type (e.g., "header", "body", "button").
      </ParamField>

      <ParamField type="array">
        Array of parameter objects for the component.

        <ParamField type="object">
          <ParamField type="string">
            Parameter type (e.g., "text", "image").
          </ParamField>

          <ParamField type="string">
            Text content (for text parameters).
          </ParamField>
        </ParamField>
      </ParamField>
    </ParamField>
  </ParamField>
</ParamField>

<ParamField body="PUSH" type="object">
  Configuration for Push Notifications.

  <ParamField type="string" required>
    Must be set to "PUSH".
  </ParamField>

  <ParamField type="string" required>
    The title of the push notification.
  </ParamField>

  <ParamField type="string" required>
    The message content of the push notification.
  </ParamField>

  <ParamField type="string">
    URL of an image to include in the push notification.
  </ParamField>

  <ParamField type="string">
    URL to open when the notification is clicked.
  </ParamField>
</ParamField>

<ParamField body="IN_APP" type="object">
  Configuration for In-App Notifications.

  <ParamField type="string" required>
    Must be set to "IN\_APP".
  </ParamField>

  <ParamField type="string" required>
    The title of the in-app notification.
  </ParamField>

  <ParamField type="string" required>
    The message content of the in-app notification.
  </ParamField>

  <ParamField type="string">
    The type of in-app notification.
  </ParamField>

  <ParamField type="string">
    The priority level of the notification.
  </ParamField>

  <ParamField type="integer">
    Time in hours after which the notification expires.
  </ParamField>

  <ParamField type="array">
    Array of action buttons for the notification.

    <ParamField type="object">
      <ParamField type="string">
        The type of action.
      </ParamField>

      <ParamField type="string">
        The display text for the action button.
      </ParamField>
    </ParamField>
  </ParamField>
</ParamField>

<ParamField body="PUSH.android" type="object">
  Android-specific push notification settings.

  <ParamField type="string">
    The Android notification channel ID.
  </ParamField>

  <ParamField type="string">
    The name of the icon to display.
  </ParamField>

  <ParamField type="string">
    The color of the notification (hex format).
  </ParamField>

  <ParamField type="string">
    The sound to play when the notification arrives.
  </ParamField>
</ParamField>

<ParamField body="PUSH.ios" type="object">
  iOS-specific push notification settings.

  <ParamField type="string">
    The sound to play when the notification arrives.
  </ParamField>

  <ParamField type="integer">
    The number to display as the app's icon badge.
  </ParamField>

  <ParamField type="string">
    The category identifier for custom actions.
  </ParamField>
</ParamField>

<ParamField body="PUSH.web" type="object">
  Web push notification settings.

  <ParamField type="string">
    URL of the icon to display.
  </ParamField>

  <ParamField type="string">
    URL of the badge to display.
  </ParamField>
</ParamField>

<ParamField body="PUSH.deepLink" type="string">
  The deep link URL to open when the notification is clicked.
</ParamField>

<ParamField body="PUSH.timeToLive" type="integer">
  Time in seconds that the push notification should be kept if the device is offline.
</ParamField>

<ParamField body="PUSH.priority" type="string">
  The priority of the push notification. Can be 'high', 'normal', or 'low'.
</ParamField>

<ParamField body="PUSH.analyticsLabel" type="string">
  A label for analytics tracking of the notification.
</ParamField>
