▪️Sending Messages via Smartico REST API

You can send personalized communications to your end-users — including Inbox messages, Emails, SMS, Push Notifications, Viber, Telegram, or WhatsApp — using the Smartico REST API.


General Information

Full documentation about the Smartico REST API can be found in the Back Office, under the Using REST API section.

To make an API call, you’ll need a private authorization key, which can be requested from your Success Manager.

Example API Request

curl --request POST \
--url 'https://apis.smartico.ai/api/external/events/v2' \
--header 'Authorization: your-private-auth-key' \
--header 'Content-Type: application/json'

Note that the endpoint and private-auth key depend on your environment, and can be found in the BackOffice in the REST API section

Example JSON Body

[
    {
        // unique UUID of the request
        "eid": "96b60b08-25f0-4129-b363-ef0d4db780ef",     
        // UTC timestamp of the request
        "event_date": 1680106470149,                          
        // brand ID in your system, you can 
        "ext_brand_id": "your-external-brand-id",             
        // user ID in your system
        "user_ext_id": "id-of-the-user-your-system",          
        // event type
        "event_type": "core_personal_message",                
        "payload": {
            "title": "Title of the message",
            "short_message": "Short message content",
            "rich_message": "<b>some rich message</b>",
            "icon": "https://mycdn.com/image.png",
            // channel type: inbox-api, email, sms, push, viber, whatsapp
            "channel": "email"                               
        }
    }
]

Note that all the parameters in the payload are fully defined by you.

You can pass as many parameters as you want, and name them according to your requirements.

All these parameters later can be used in the communication templates explained below.

You can specify the channel parameter in the payload to define where the message should be delivered — for example:

  • "channel": "inbox-api"

  • "channel": "email-api"

  • "channel": "sms-api"

  • "channel": "push-api"

  • "channel": "viber-api"

  • "channel": "whatsapp-api"

Setting Up Templates and Journeys

Before sending messages, you must create corresponding Journey and Message Templates in the Smartico Back Office.

1. Create a Message Template

Create a message template for your chosen channel (Inbox, Email, etc.). Ensure the tag names used in the template match exactly with the fields sent in the API request in the payload. You can include your own styles and HTML in the rich message area — this will serve as a base layout for all API-sent messages.

2. Configure the Journey

The Journey should be triggered by the “Core: send personal message” trigger. Set the channel field (e.g., inbox-api, email-api, etc.) under “Core: personal message channel” as shown below.

Set the entry mode to “Every time conditions are met…” and define the campaign duration as 1 minute.

3. Build the Journey Flow

Design a Journey flow using the template created earlier. This flow will determine how and when messages are delivered via your chosen communication channel.

Summary

By following these steps, you can use the Smartico REST API to send various types of messages — including Inbox messages, Emails, SMS, Push Notifications, Viber, and WhatsApp — with complete control over content, personalization, and delivery timing through the Back Office Journeys.

Note that following this example, you can trigger not just communication, but also cover more cases, for example, you can build campaigns and trigger over the API:

Last updated

Was this helpful?