Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    User API documentationAPI interactionMatching
      Profilesarrow
    • Import profileUpdate profileImport multiple profilesUpdate multiple profilesAdd multiple profilesAdd profile to databaseQuick profile importImport profile to RabbitMQGet profile dataUploading profiles to a fileSuspend all database profilesUnsuspend all profiles in a databaseDelete profileSubscription fields functional updateDatabase fields functional updateMerging multiple profilesUnsubscribe profile from resourceProfile splitting
        Subscriptionsarrow
      • Add or edit subscriptionGet all profile subscriptionsGet all subscriptions from multiple profilesGet profile subscriptionDelete profile subscriptionRestore deleted subscriptionSuspend all subscriptionsUnsuspend all suspended subscriptions
        Action historyarrow
      • Get profile action historyGet multiple profiles action history
        Profile relationsarrow
      • Attach relationDetach relationModify relation propertiesOverwrite relation propertiesGet profile relations infoGet profile relations info
      Get data for multiple profiles
      Databasesarrow
    • Get database statisticsUpdate statistics on databaseGet database listGet database informationGet database fieldsDatabase wipe
      Resourcesarrow
    • Get resource statisticsUpdate statistics on resourceGet resources listGet resource informationGet resource subscription fields
      Segmentsarrow
    • Get statistics on resourceUpdate statistics on segmentAdd or remove profileGet profile data in a static segmentCreate segmentUpdate segmentGet segment informationGet segments listDelete segment
      Suppression listsarrow
    • Create suppression listUpdate suppression listGet suppression list infoGet the list of suppression listsDelete suppression listUpload suppression list data to file
        Suppression list actionsarrow
      • Check if email is suppressedAdd email to suppression listAdd multiple emails to suppression listRemove email from suppression listRemove all emails from suppression listCheck if domain is suppressedAdd domain to suppression listAdd multiple domains to suppression listRemove domain from suppression listRemove all domains from suppression listCheck if phone number is suppressedAdd phone number to suppression listAdd multiple phones to suppression listRemove phone number from suppression listRemove all phone numbers from suppression list
      Templates and fragmentsarrow
    • Get templates listGet template infoDelete templateAdd templateUpdate templateChannel object
      Campaignsarrow
    • Get campaign informationGet campaign listActivate campaignComplete campaignDeactivate campaignGet campaign status
      Mailingsarrow
    • Activate mailingDeactivate mailingGet mailing listGet mailing informationGet mailing logClone mailingDelete mailingGet mailing status
        Broadcast mailingsarrow
      • Get broadcasts listGet broadcast informationCreate broadcast mailingUpdate broadcast mailingLaunch a broadcast mailing
        Regular mailingsarrow
      • Get regular mailings listGet regular mailing informationCreate regular mailingUpdate regular mailingLaunch a regular mailing
        Trigger mailingsarrow
      • Get trigger mailings listGet trigger mailing informationCreate trigger mailingUpdate trigger mailingTrigger launch (API call)Profile import + trigger mailing launchTask for bulk trigger launchTask for bulk profiles import + trigger launchBulk trigger launchBulk profiles import + trigger mailing launchClone a trigger mailingData array
      Automation scenariosarrow
    • Engage profile in scenarioImport and engage profile in scenarioBatch import and engage profiles in a scenarioTask for batch import and engaging profiles in the scenarioGet scenarios listActivate scenarioDeactivate scenario
      Loyalty Programsarrow
    • Get profile tier in a loyalty programExport points transactionsExpiring points for a periodGet profile account transactionsGet trigger promotions listAccrue points to a memberRedeem member pointsCommit temporary transactionPreliminary Order CalculationOrder ConfirmationRoll back temporary transactionCancel points transactionGet points account balanceRegister member in a loyalty programRemove member from loyalty program
      Promo codesarrow
    • Import promo codesGet promo code informationActivate promo codeUpdate promo codeAttach promo codeDetach promo codeGet all promo codes
      Goalsarrow
    • Goals and goal values registration
      Application push notificationsarrow
    • Processing and adding a subscriptionAdd app push events
      Marketarrow
      • Market objectsarrow
      • Order data objectProduct data objectSKU data objectCategories arrayCustom fields array
        Ordersarrow
      • Import order and item statusesGet orders listDelete orderGet order statusUpdate order line status
        Products and SKUarrow
      • Import products, SKUs and categoriesImport SKUs and categoriesGet products listGet SKUs listDelete productsDelete SKU
      Analytic reportsarrow
    • Get summary reportGet soft bounces reportGet undeliveries report
      SendersDevarrow
    • Get senders list
        Virtual senders (Smart accounts only)arrow
      • Get virtual senders listGet virtual sender informationClone virtual senderCreate virtual senderUpdate virtual senderDelete virtual sender
      External datatables queriesarrow
      • Segmentation queriesarrow
      • Add segmentation queryUpdate segmentation queryGet segmentation query informationGet segmentation queries listDelete segmentation query
        Template queriesarrow
      • Add template queryUpdate template queryGet template query informationGet template queries listDelete template query
      Objectsarrow
    • AKMTA objectContent objectEmail rule objectFile objectProfile data objectSMS rule objectSender objectSender typesStart schedule objectSubscription objectTrigger types
      Miscellaneousarrow
    • Upload fileGet message web versionPush providersDeduplication of requestsHow to send API request with RabbitMQList of gender identificationsObtain valid values for fields: browsers, devices, tz, oses, languages
    Importing the API collection in PostmanList of API endpoints
      SDKarrow
      • mSDKarrow
        • Androidarrow
        • Quick StartSDK FunctionalitySDK ConfigurationPublic SDK API
            Provider configuration androidarrow
          • Firebase Cloud MessagingHuawei Mobile ServicesRuStore
          iOSarrow
        • Quick StartSDK FunctionalitySDK ConfigurationPublic SDK API
            Provider configurationarrow
          • Apple Push Notification ServiceFirebase Cloud MessagingHuawei Mobile Services
          React Native (Android/iOS)arrow
        • Quick StartSDK ConfigurationSDK FunctionalityPublic SDK APIProvider setup
        Managing JWT and Role Token
  • Templates and fragments
  • Channel object

Channel object

Used in API requests related to adding and updating message templates.

  • JSON
{
"sid": "email",
"fields": {
"text": "Hello, world!",
"html": "<html>Hello, world!</html>",
"subject": "Welcome"
}
},
{
"sid": "sms",
"fields": {
"sms": "Hello, world!"
}
},
{
"sid": "push",
"fields": {
"title": "Welcome",
"body": "Hello, world!",
"icon": "https://example.com/images/picture.jpg",
"click_url": "https://example.com"
}
}

Description​

ParameterTypeExampleDescription
sidstring"email"
"sms"
"push"
"telegram_bot"
"telegram_group"
"custom_channel"
Channel name
fieldsobject
"fields":{
   "text": "Hello, world",
   "html": "Hello, world!",
   "subject": "Welcome"
}
Template settings for a certain channel

Fields object​

Each channel object contains a fields object:

Email fields​

  • JSON
{
"sid": "email",
"fields": {
"text": "Hello, world!",
"html": "<html>Hello, world!</html>",
"subject": "Subject line",
"from_email": "test@example.com",
"from_name": "Jenny's List",
"replyto_email": "test_reply@example.com",
"replyto_name": "Jenny",
"is_not_inline": true
}
}

Description​

ParameterTypeExampleDescription
textstring"Hello, world!"Text version of the message
htmlstring"<html>Hello, world!</html>"HTML version of the message
is_ampboolfalseIs there an amp version in the template or not
ampstring"<html>Hello, world!</html>"AMP HTML version of the message
subjectstring"Weather alert"Subject line
from_emailstring"test@example.com"Override "from-email"
from_namestring"Jenny's List"Override "from-name"
replyto_emailstring"test_reply@example.com"Override "replyto_email"
replyto_namestring"Jenny"Override "replyto_name"
is_not_inlinebooltrueDo not convert CSS to inline

SMS fields​

  • JSON
{
"sid": "sms",
"fields": {
"sms": "Hello, world!",
"sms_max_count": 0,
"add_sms_url_scheme": true
}
}

Description​

ParameterTypeExampleDescription
smsstring"Hello, world!"Message text
sms_max_countint0SMS limit
add_sms_url_schemebooltrueAdd "http://" to links

Push fields​

  • JSON
{
"sid": "push",
"fields": {
"title": "Welcome",
"body": "Hello, world!",
"icon": "https://example.com/images/icon.jpg",
"click_url": "https://example.com",
"custom_push_json_raw": "{}"
}
}

Description​

ParameterTypeExampleDescription
titlestring"Welcome"Notification title
bodystring"Hello, world!"Notification text
iconstring"https://example.com/images/test.jpg"URL where the notification icon is located
click_urlstring"https://example.com"Click-to-go link
custom_push_json_rawstring"{}"Custom JSON to send to mobile push

Notify fields​

  • JSON
  • XML
{
"sid": "notify",
"fields": {
"template": {
"id": 1,
"name": "message_after_purchase",
"type": "NOTIFY",
"status": "NOT_SENT",
"is_draft": true,
"edna_account_id": "",
"notify_service_name": "altcraft_testing",
"vk_data": {
"body": "Notify message content",
"buttons": [],
"attachments": [],
"enabled": true,
"inline_keyboard": false,
"hide_keyboard": false,
"reply_enabled": false
},
"ok_data": {
"enabled": true,
"body": "Notify message content"
},
"sms_data": {
"enabled": true,
"body": "Notify message content",
"type": "advert"
},
"routes": [
{
"route": "vk",
"deliv_timeout": 86400,
"read_timeout": 86400
},
{
"route": "ok",
"deliv_timeout": 86400,
"read_timeout": 86400
},
{
"route": "sms"
}
]
},
"info": {
"is_obsolete": false,
"not_found": false
},
"params": {
"name": "{{$.Lead._fname}}",
"order_number": "{{$.Lead.order_number}}"
}
}
}
<xml>
<sid>notify</sid>
<fields>
<info>
<is_obsolete>false</is_obsolete>
<not_found>false</not_found>
</info>
<params>
<name>{{$.Lead._fname}}</name>
<order_number>{{$.Lead.order_number}}</order_number>
</params>
<template>
<edna_account_id/>
<id>1</id>
<is_draft>true</is_draft>
<name>message_after_purchase</name>
<notify_service_name>altcraft_testing</notify_service_name>
<ok_data>
<body>Notify message content</body>
<enabled>true</enabled>
</ok_data>
<routes>
<deliv_timeout>86400</deliv_timeout>
<read_timeout>86400</read_timeout>
<route>vk</route>
</routes>
<routes>
<deliv_timeout>86400</deliv_timeout>
<read_timeout>86400</read_timeout>
<route>ok</route>
</routes>
<routes>
<route>sms</route>
</routes>
<sms_data>
<body>Notify message content</body>
<enabled>true</enabled>
<type>advert</type>
</sms_data>
<status>NOT_SENT</status>
<type>NOTIFY</type>
<vk_data>
<attachments/>
<body>Notify message content</body>
<buttons/>
<enabled>true</enabled>
<hide_keyboard>false</hide_keyboard>
<inline_keyboard>false</inline_keyboard>
<reply_enabled>false</reply_enabled>
</vk_data>
</template>
</fields>
</xml>

Description​

ParameterTypeExampleDescription
namestring"message_after_purchase"Template name
typestring"NOTIFY"Template type
statusstring"NOT_SENT"Sending status of the template
is_draftbooleantrueIndicates if the template is a draft
edna_account_idstring"123456"Edna account ID
notify_service_namestring"altcraft_testing"Name of the notification service
bodystring"Notify message content"VK message body
buttonsarray[]VK message buttons
attachmentsarray[]VK message attachments
enabledbooleantrueWhether VK message is enabled
inline_keyboardbooleanfalseWhether VK inline keyboard is used
hide_keyboardbooleanfalseWhether VK keyboard should be hidden
reply_enabledbooleanfalseWhether replies to VK message are allowed
enabledbooleantrueWhether OK message is enabled
bodystring"Notify message content"OK message body
enabledbooleantrueWhether SMS message is enabled
bodystring"Notify message content"SMS message body
typestring"advert"SMS message type
routestring"vk"Delivery channel
deliv_timeoutinteger86400Delivery timeout (in seconds)
read_timeoutinteger86400Read timeout (in seconds)
routestring"ok"Second delivery channel
routestring"sms"Third delivery channel
is_obsoletebooleanfalseWhether the template is obsolete
not_foundbooleanfalseWhether the template was found

Telegram fields​

  • JSON
  • XML
{
"sid": "telegram_bot",
"fields": {
"image": {
"attach": [
{
"content": "/9j/bcvb4234hgdffsd45",
"filekey": "678636591824633380762bee",
"name": "example.jpg",
"size": 65101,
"type": "image_path"
}
]
},
"image_caption": "Telegram bot message description",
"markup_style": "HTML"
}
}
<xml>
<sid>telegram_bot</sid>
<fields>
<image>
<attach>
<content>/9j/bcvb4234hgdffsd45</content>
<filekey>678636591824633380762bee</filekey>
<name>example.jpg</name>
<size>65101</size>
<type>image_path</type>
</attach>
</image>
<image_caption>Telegram bot message description</image_caption>
<markup_style>HTML</markup_style>
</fields>
</xml>

Description​

ParameterTypeExampleDescription
legacy_button_linkstring"https://example.com"Link attached to the button
legacy_button_namestring"button1"Button label
markdown_typestring"HTML"Text formatting type (HTML/Markdown)
textstring"example"Main message text
contentstring"/9j/bcvb4234hgdffsd45"File content in binary (base64)
filekeystring"678636591824633380762bee"Unique file identifier
namestring"example.jpg"Name of the attached file
sizeinteger65101File size in bytes
typestring"image_path"Attachment type (e.g., path to file)
image_captionstring"Image description"Caption for the image
audio_captionstring"Audio file description"Caption for the audio file
video_captionstring"Video file description"Caption for the video file
markup_stylestring"HTML"Markup style for Telegram (HTML/Markdown)

Whatsapp fields​

  • JSON
  • XML
{
"id": 9,
"sid": "whatsapp",
"fields": {
"type": "TEMPLATE",
"template": {
"type": "360DIALOG",
"name": "initiate_message_en",
"hsm_external_id": "c466caf6_c340_4d85_8659_6c9685618a9f_en_initiate_message_en",
"language": "en",
"wa_account_id": "+79999999999",
"hsm_hash_sum": "0b7ac0a91b0ba52e961b87c2297d2bd06a3f5bc1",
"is_invalid": false,
"hsm_not_found": false,
"account_not_found": false
},
"raw_hsm": {
"dialog_template": {
"components": [
{
"type": "BODY",
"text": "Hello! Thank you for waiting. I needed some time to clarify the information regarding your request. Could you please let me know when it's convenient for you to discuss the details? 😃"
}
],
"name": "initiate_message_en",
"namespace": "c466caf6_c340_4d85_8659_6c9685618a9f",
"category": "ISSUE_RESOLUTION",
"language": "en",
"rejected_reason": "NONE",
"status": "approved"
},
"edna_template": null
}
}
}

<xml>
<id>9</id>
<sid>whatsapp</sid>
<fields>
<type>TEMPLATE</type>
<template>
<type>360DIALOG</type>
<name>initiate_message_en</name>
<hsm_external_id>c466caf6_c340_4d85_8659_6c9685618a9f_en_initiate_message_en</hsm_external_id>
<language>en</language>
<wa_account_id>+79999999999</wa_account_id>
<hsm_hash_sum>0b7ac0a91b0ba52e961b87c2297d2bd06a3f5bc1</hsm_hash_sum>
<is_invalid>false</is_invalid>
<hsm_not_found>false</hsm_not_found>
<account_not_found>false</account_not_found>
</template>
<raw_hsm>
<dialog_template>
<components>
<component>
<type>BODY</type>
<text>Hello! Thank you for waiting. I needed some time to clarify the information regarding your request. Could you please let me know when it's convenient for you to discuss the details? 😃</text>
</component>
</components>
<name>initiate_message_en</name>
<namespace>c466caf6_c340_4d85_8659_6c9685618a9f</namespace>
<category>ISSUE_RESOLUTION</category>
<language>en</language>
<rejected_reason>NONE</rejected_reason>
<status>approved</status>
</dialog_template>
<edna_template xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</raw_hsm>
</fields>
</xml>

Description​

ParameterTypeExampleDescription
typestring"360DIALOG"WhatsApp template type
namestring"initiate_message_en"Template name
hsm_external_idstring"c466caf6_c340_4d85_8659_6c9685618a9f_en_initiate_message_en"External template ID
languagestring"en"Template language
wa_account_idstring"+79999999999"WhatsApp account ID
hsm_hash_sumstring"0b7ac0a91b0ba52e961b87c2297d2bd06a3f5bc1"Template hash
is_invalidbooleanfalseWhether the template is invalid
hsm_not_foundbooleanfalseWhether the HSM template was found
account_not_foundbooleanfalseWhether the account was found
name (in raw_hsm)string"initiate_message_en"Template name in raw_hsm
namespacestring"c466caf6_c340_4d85_8659_6c9685618a9f"Template namespace
categorystring"ISSUE_RESOLUTION"Template category
statusstring"approved"Template status (e.g., approved, rejected)
rejected_reasonstring"NONE"Reason for template rejection (if any)
components.typestring"BODY"Component type
components.textstring"Hello! Thank you for waiting..."Message body text
edna_templatestring"null"Edna template, if present (in this case — not present)

Viber™ fields​

  • JSON
  • XML
"id": 10,
{
"sid": "viber",
"fields": {
"series": [
{
"type": "TEXT",
"text": "message text"
},
{
"type": "IMAGE",
"image": "/849074172/3/example.jpg"
},
{
"type": "VIDEO",
"thumbnail": "/848985842/3/678632345824633380762bee/example.jpg",
"duration": 6,
"file_size": 2,
"action": "https://example.com/lib/preview/mp4/example.mp4"
},
{
"type": "TEXT_BUTTON",
"text": "Sample text",
"caption": "button text",
"action": "https://example.com"
},
{
"type": "FILE",
"file_type": "pdf",
"file_name": "example.pdf",
"action": "https://www.example.org/testfiles/resources/pdf/example.pdf"
}
]
}
}
<xml>
<id>10</id>
<sid>viber</sid>
<fields>
<series>
<element>
<type>TEXT</type>
<text>message text</text>
</element>
<element>
<type>IMAGE</type>
<image>/849074172/3/example.jpg</image>
</element>
<element>
<type>VIDEO</type>
<thumbnail>/848985842/3/678632345824633380762bee/example.jpg</thumbnail>
<duration>6</duration>
<file_size>2</file_size>
<action>https://example.com/lib/preview/mp4/example.mp4</action>
</element>
<element>
<type>TEXT_BUTTON</type>
<text>Sample text</text>
<caption>button text</caption>
<action>https://example.com</action>
</element>
<element>
<type>FILE</type>
<file_type>pdf</file_type>
<file_name>example.pdf</file_name>
<action>https://www.example.org/testfiles/resources/pdf/example.pdf</action>
</element>
</series>
</fields>
</xml>

Description​

ParameterTypeExampleDescription
typestring"TEXT"Type of message element
textstring"message text"Text content of the message
imagestring"/849074172/3/example.jpg"Path to the image
thumbnailstring"/848985842/3/678632345824633380762bee/example.jpg"Preview image for the video
durationinteger6Video duration in seconds
file_sizeinteger2File size in megabytes
actionstring"https://example.com/lib/preview/mp4/example.mp4"Action URL (used for video, button, or file)
captionstring"button text"Caption for the button
file_typestring"pdf"Type of the file (e.g., PDF)
file_namestring"example.pdf"Name of the attached file

* Viber™ is a trademark of Rakuten Group, Inc. Blocked in the Russian Federation.

Last updated on May 13, 2025
Previous
Update template
Next
Campaigns
  • Description
  • Fields object
    • Email fields
      • Description
    • SMS fields
      • Description
    • Push fields
      • Description
    • Notify fields
      • Description
    • Telegram fields
      • Description
    • Whatsapp fields
      • Description
    • Viber™ fields
      • Description
© 2015 - 2026 Altcraft, LLC. All rights reserved.