Migrate from Trigger API to Messaging-API
Here is a guide to help you migrate your call from Trigger-API to Messaging-API
General Info
The messaging API is asynchronous processing so the response to the call may be accepted but not sending the email (see detail below)
API Reference - Send a message
Design migration
Your design must have been migrated on SE2025 to get the new design ID → if you are not already on SE2025 request the migration of your design to our team
Simple comparison of both API
Trigger API (legacy)
URL:
https://s3s.fr/api/trigger/nph-10.pl
Authentication
Provide the Splio API key in the payload:
"key": "SplioAPIKey"
Design (legacy template)
Design template uses Splio syntax
, and the design ID looks like:
76rx7nZVC
HTTP method
There is either HTTP POST
or GET
method.
Example: HTTP POST
curl --request POST --url https://s3s.fr/api/trigger/nph-10.pl \
--header 'accept: application/json' \
--form 'universe="{{your_universe_id}}"' \
--form 'key="XXXXXXXXXXXXXXXXX"' \
--form 'message="7wK9fgq2m"' \
--form 'rcpts="[{"email":"[email protected]","firstname":"John", "lastname":"Doe", "c24":"vip1"},{"email":"[email protected]","firstname":"John2", "lastname":"Doe2", "c24":"prospect"}]"'
Response
Synchronous Response — The result of sending is received in the response.
200 - Success:
{
"status": "ok",
"result": {
"done": 2,
"campaign_id": "6VS8HJtyH",
"todo": 2
},
"message": "ok",
"code": 200
}
400 - Bad request:
{
"status": "error",
"message": "incorrect/missing parameters",
"code": 400
}
Messaging-API (SE 2025)
URL:
https://api.splio.com/messaging/v1/${your_universe_id}/messages
Authentication
Every call requires a JWT in the Authorization
header See full docs :
Authorization: Bearer XXX.YYY.ZZZ
Design (Splio Edition 2025)
Design template uses liquid syntax
.
Design ID format:
123a123a-123a-123a-123a-123a123a123a
Legacy email templates can be migrated to the new content id by splio team.
HTTP method
Only POST
is allowed.
Example: HTTP POST
curl --request POST --url https://api.splio.com/messaging/v1/${your_universe_id}/messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX.YYYYYY.ZZZZZ' \
--header 'content-type: application/json' \
--data '
{
"channel": "email",
"properties": {
"content_id": "123a123a-123a-123a-123a-123a123a123a"
},
"recipients": [
{
"email": "[email protected]"
}
]
}'
Response
Asynchronous Response — Indicates message is accepted for treatment.
201 - Created:
{
"task_id": "019681e0-e9d5-7dc5-939b-9ad431bffa7e",
"status": "accepted"
}
400 - Bad request:
{
"error": {
"code": "invalid_body",
"message": "Field 'rcpts' is required and must be a non-empty array.",
"details": []
}
}
New features of Messaging-API
Transactional
The API allow you to indicate if an email is transactional or not. When 'true', the message will be considered as transactional. It means that it will bypass some optins and blacklists.
⚠️ In the case of a marketing message, you cannot communicate with a contact which is not optin, and so not use this option.
Metadata
The metadata block is optional, It allow you to add specifics data to each email it will group them in statistics, use some in filters or get the metadata back into events export.
email_campaign_id
email_campaign_name
email_campaign_category
email_campaign_code_operation
You can also add any other fields but for the moment they will not be usable
ℹ️ The list isn't exhaustive and could change in the future.
Send a message to external recipient
External recipients means the contact isn't in Splio database and you push all the data to personalize the email in the payload.
Example for external recipient:
curl --request POST --url https://api.splio.com/messaging/v1/${your_universe_id}/messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX.YYYYYY.ZZZZZ' \
--header 'content-type: application/json' \
--data '
{
"channel": "email",
"transactional": true,
"properties": {
"content_id": "123a123a-123a-123a-123a-123a123a123a"
},
"metadata": {
"email_campaign_id": "campaignId",
"email_campaign_name": "campaignName",
"email_campaign_category": "campaignCategory",
"email_campaign_code_operation": "campaignCodeOperation"
},
"recipients": [
{
"email": "[email protected]",
"variables": {
"firstname": "John",
"lastname": "Doe",
"my_variable": "336139999"
}
},
{
"email": "[email protected]",
"variables": {
"firstname": "John2",
"lastname": "Doe2",
"my_variable": "336139999"
}
}
]
}'
Send a message to Contact in MA
You can use contacts that are already existing (or create them before through API) in Splio Marketing Automation without sending all there data in the payload.
To do so switch from email
to contact_id
in the payload, and as value use the unique contact key of the universe (e.g. email address, phone, custom field) How to choose your contact unique key .
Example for contact:
curl --request POST --url https://api.splio.com/messaging/v1/${your_universe_id}/messages \
--header 'accept: application/json' \
--header 'authorization: Bearer XXXXX.YYYYYY.ZZZZZ' \
--header 'content-type: application/json' \
--data '
{
"channel": "email",
"transactional": false,
"properties": {
"content_id": "123a123a-123a-123a-123a-123a123a123a"
},
"metadata": {
"email_campaign_id": "campaignId",
"email_campaign_name": "campaignName",
"email_campaign_category": "campaignCategory",
"email_campaign_code_operation": "campaignCodeOperation"
},
"recipients": [
{
"contact_id": "[email protected]"
}
]
}'
Design change between external recipient and internal contact
For external recipient you will pass all the data in the payload for personalization.
When passing data in the payload in "variables"
field of recipient, the syntax can differ from what is used in the designer.
In designer you can use this syntax to render the variable:
{{my_variable}}
{{object.test.my_variable}}
Those variables name don't need to be linked to a field in your contact.
For internal contact you can choose to render data that is in Splio platform, or in the payload "variables"
at the same time depending of your use-case.
The syntax in designer for data coming from contact table:
{{contact.id}}
{{contact.custom_fields["my_custom_fields"]}}
Get the deliverability and activity reports of a request to messaging-api
URL:
https://api.splio.com/api/v1/${universeID}/messages/${TASK_ID}
Example response:
{
"start_at": "2025-04-29T14:08:43Z",
"metadata": {
"campaign_name": "my_campaign_name",
"content_": "",
"content_version": "2",
"sending_mode": "test"
},
"tags": {},
"task_id": "019681e0-e9d5-7dc5-939b-9ad431bffa7e",
"idempotency_key": "019681e0-e9d5-7dc5-939b-9ad431bffa7e",
"universe": "universeID",
"content_id": "0196202f-b2a6-783a-9f52-273a88d37d42",
"communication_type": "transactional",
"channel": "email",
"stats": {
"total": 1,
"sending": {
"delivered": 0,
"failed": 0,
"queued": 1,
"soft_bounced": 0,
"hard_bounced": 0
},
"activity": {
"clicked": 0,
"opened": 0,
"unsubscribed": 0,
"complained": 0
}
}
}
Updated 19 days ago