Questa pagina è la reference tecnica delle Magnews REST API: qui trovi l’elenco completo degli endpoint, con metodi, parametri, payload, esempi di richiesta e risposta, e codici di errore.
Se stai iniziando ora con le API di magnews, parti dalla Guida introduttiva alle REST API: trovi una panoramica completa e tutti i concetti fondamentali.
Se invece vuoi mettere subito le mani sugli endpoint, apri la nostra collezione Postman e prova le chiamate in pochi minuti.
Transactional
GET | Get simple message status
/v19/simplemessages/message/:idmessageGet the delivery status and the engagement data (opens, clicks, conversions) of a simple message by ID.
Response
| Key | Type | Description |
|---|---|---|
messageId |
String | ID of the transactional message. |
address |
String | Email or SMS recipient. |
actualStatus |
String | Status of the transactional message. Possible values: internalError, hardBounce, waiting, sent, notSent, softBounce. |
sentDate |
Date | Delivery date. |
opened |
Boolean |
true if the message was opened. |
lastOpenedTs |
Date | Timestamp of the last open event. |
clicked |
Boolean |
true if the message was clicked. |
lastClickedTs |
Date | Timestamp of the last click event. |
idbouncecategory |
Integer | The ID of the bounce category. |
complainted |
Boolean |
true if the message resulted in a complaint. |
notSentCause |
String | Detailed reason if actualStatus is notSent. Possible values: unknown, blacklisted_recipient, cancelled, unsubscribed, forbidden_from, forbidden_replyto, maxsize_exceeded, phonerecipient_notallowed, empty_recipient, forbidden_smsfrom, forbidden_smsnumericfrom, no_credit. |
converted |
Boolean |
true if the message led to a conversion. |
lastConversionTs |
Date | Timestamp of the last conversion. |
expectedDeliveryTs |
Date | Expected delivery date requested by the sender. |
messageRetention |
String | Retention policy of the message: minimal (the body is discarded), full (the whole message is kept) or reserved (the recipient is discarded). |
externalId |
String | Custom ID associated to the message. |
Dates are Unix timestamps in milliseconds. If the message does not exist, the response is HTTP 204 with no body.
Path variables
| Variable | Description |
|---|---|
idmessage |
ID of the transactional message |
Example responses
200 - Get simple message status
{
"messageId": "27335",
"address": "test@example.com",
"actualStatus": "sent",
"notSentCause": null,
"sentDate": 1773658427452,
"opened": true,
"lastOpenedTs": 1773675603586,
"clicked": true,
"lastClickedTs": 1773675603586,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1773658412517,
"messageRetention": "full",
"externalId": null
}GET | Get simple message status by external id
/v19/simplemessages/messagebyexternalid/:externalIdGet the status of a simple message by external ID
Path variables
| Variable | Description |
|---|---|
externalId |
Logical external id of the transactional message (if specified when sending this message) |
Example responses
200 - Success Response
{
"messageId": "27335",
"address": "test@example.com",
"actualStatus": "sent",
"notSentCause": null,
"sentDate": 1773658427452,
"opened": true,
"lastOpenedTs": 1773675603586,
"clicked": true,
"lastClickedTs": 1773675603586,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1773658412517,
"messageRetention": "full",
"externalId": null
}GET | Get simple message info
/v19/simplemessages/message/:idmessage/infoGet the subject and the body of a simple message by ID.
Response
| Field | Type | Description |
|---|---|---|
messageId |
String | ID of the transactional message. |
messageSubject |
String | Subject of the message. |
messageBody |
String | Body of the message. |
If the message does not exist, the response is HTTP 404.
Path variables
| Variable | Description |
|---|---|
idmessage |
ID of the transactional message |
Example responses
200 - Success Response
{
"messageId": "27335",
"messageSubject": "Your order has been shipped",
"messageBody": "<html><body><p>Hi, your order has been shipped.</p></body></html>"
}POST | Create transactional message
/v19/transactionals/createCreates a new transactional message (template used by simple messages) starting from a design template. Only the email channel is supported.
To fill its content pass the Q sections in the sections field of this same call (see below). Without sections the message is created with the default body of the design template: to change it later use _Write communication sections_ (see the _Communications_ section) on its work in progress copy, i.e. the draft opened in the designer, since the published template itself cannot be written directly. Once the content is ready, trigger the message with _Send simple message using template_.
A transactional message is triggered per contact, so it exposes no default target nor expected delivery date.
Writing the Q sections in the same call
The optional sections field fills the transactional message with Q sections in the same call, so there is no need to call _Write communication sections_ afterwards. The catalog items available for the template are returned by _Get template Q catalog_ (see the _Templates_ section).
Note: sections requires Magnews Q to be enabled on the account, otherwise HTTP 403 is returned. Contact your account manager to activate it.
The creation is all or nothing: when a section cannot be written the transactional message is not created at all and only the error is returned. A parameter whose qtype is an image (image) also accepts the URL of a remote image: the image is downloaded into the media of the transactional message and the parameter points to that copy, so the email never loads images from the original site. An image that cannot be downloaded keeps the default image of the design template.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
name |
String | \- | Required. Name of the transactional message. |
idjourney |
Integer | \- | Required. ID of the journey the transactional message belongs to. |
template |
String | \- |
Required. ID of the design template: global: for global templates, custom: for custom templates. |
channel |
String | "email" |
Channel of the message. Only email is supported. |
subject |
String | null |
Email subject. |
preheader |
String | null |
Email preheader (preview text). |
from_name |
String | null |
From header name. |
from_email |
String | null |
From header email address. |
replyto |
String | null |
Reply-To header email address. |
newsletter_key |
String | null |
Logical key of the transactional message, used to trigger it via API (see _Send simple message using template_). |
message_type |
Integer | null |
ID of the message type. |
production_ready |
Boolean | false |
When true the transactional message is published and ready to be used in production, otherwise it stays as work in progress. With sections the message is published only after the sections have been written. |
sections |
Array | null |
Q sections to write in the transactional message as part of its creation, replacing the default body of the design template. Same format as the body of _Write communication sections_: at least 1 and at most 100 section objects, each with catalogItemId, params and blocks. Requires Magnews Q (see below). |
Response
HTTP 201 Created with a JSON object:
| Field | Type | Description |
|---|---|---|
id |
Integer | ID of the newly created transactional message. |
sections |
Integer | Number of sections written. Returned only when sections was in the request. |
previewUrl |
String | URL of the preview of the transactional message. Returned only when sections was in the request. |
Errors
| Status | When |
|---|---|
| 400 | Missing body, missing name, idjourney or template, channel other than email, unknown template, invalid journey, invalid sections (all the problems are listed in a single error), or validation errors reported by the creation engine (message, errors, genericErrors). |
| 403 | The user lacks the manage templates permission on the journey, or sections is given and Magnews Q is not enabled or the user lacks the edit newsletter permission. |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"name": "Order confirmation",
"idjourney": 1,
"template": "global:inspireemail",
"channel": "email",
"subject": "Your order [inputparam:order_id]",
"from_name": "Shop",
"from_email": "orders@example.com",
"newsletter_key": "order-confirmation",
"production_ready": true,
"sections": [
{
"catalogItemId": "bundled/global:inspireemail/intro1",
"params": {
"headline": "Thank you for your order",
"cta": "Track your order",
"content_url": "https://example.com/orders",
"image": "https://example.com/images/order.jpg"
}
}
]
}Example responses
201 - Create transactional message
{
"id": 3280,
"sections": 1,
"previewUrl": "https://myaccount.example.it/newsletterthumb/7/3280?_cv=212955310&s=33eb060c10d36d498f6eaea15deab6e362264787501879e786184b46dd442a12"
}POST | Send simple message
/v19/simplemessages/messageSend a transactional message
Request Body
options
| Option | Type | Default Value | Description |
|---|---|---|---|
idcontact |
Integer | null |
Lookup contact profile by internal ID. |
iddatabase |
Integer | null |
If contact not found, renders email as if sent to a contact in this database. |
contactprimarykey |
String | null |
Lookup contact profile by primary key in the specified database (see iddatabase). |
contactprimarykeyoptional |
Boolean | false |
If contact isn’t found, uses message.to as recipient instead of failing. Note: No statistics are recorded if contact is not found. |
usecontactemail |
Boolean | false |
Override message.to with the contact’s email. |
cssinline |
Boolean | false |
Apply CSS inline to HTML content. |
embeddedimages |
Boolean | false |
Download and embed images from HTML content. |
idwebsite |
Integer | (default website ID) | Website ID used to render absolute URLs (images, unsubscribe links, etc.). |
usenewsletterastemplate |
Boolean | false |
Use a communication template (notification template) as the message body. |
renderatsend |
Boolean | false |
Render the message at send time (preferred with usenewsletterastemplate; no DB persistence). |
usehtmlcodeastemplate |
Boolean | false |
Use provided HTML code as the message body (allows Giotto conditions). |
idnewsletter |
Integer | null |
Communication template ID for rendering (requires usenewsletterastemplate=true). |
newsletterkey |
String | null |
Communication template key for rendering (requires usenewsletterastemplate=true). If both idnewsletter and newsletterkey are set, idnewsletter takes precedence. |
format |
String | "html" |
Message format: "html", "text", or "multipart". |
validatesmslength |
Boolean | true |
Validate SMS parts count against maxsmsparts and account settings. |
maxsmsparts |
Integer | (account max SMS parts) | Maximum allowed SMS parts; messages exceeding this limit are not sent. |
expectedDeliveryTs |
Timestamp | (empty = ASAP) | Schedule message delivery; empty means send immediately. |
trackingPolicyOverrideMode |
String | null |
Tracking policy of the message: "enabled" tracks opens and clicks even if the contact has tracking disabled (notrack) or the recipient is not a contact, "disabled" turns off open and click tracking, "account" applies the privacy options of the account. When null the tracking policy of the communication template is used, if any. Any other value returns HTTP 400 (in Batch Send simple messages, an error for that message only). Not available for MIME messages. |
temp.xxx |
String | - |
Set initial value of temp.xxx Giotto variables ([temp:xxx] syntax). |
messageRetention |
String | "minimal" |
Retention policy: "minimal" (discard body), "full" (keep body & headers), "reserved". |
externalId |
String | null |
Assign an external ID to the message. |
inputparam.xxx |
String | - |
Set inputparam.xxx Giotto variables ([inputparam:xxx] syntax). |
nospool |
Boolean | false |
Attempt to send without spooling for timelier delivery. |
idlanguage |
String | null |
Language ID: "ITA", "ENG", "FRA", or null. |
usecontactcell |
Boolean | false |
Override message.to with contact’s phone number for SMS. |
values
| Field | Type | Default Value | Description |
|---|---|---|---|
type |
String | null |
Message type: "email" or "sms". |
to |
String | null |
Recipient email address or phone number. |
fromemail |
String | null |
From header email address (email messages only). |
fromname |
String | null |
From header name (email messages only). |
replyto |
String | null |
Reply-To header email address (email messages only). |
subject |
String | null |
Email subject (email messages only). |
preheader |
String | null |
Preview text (email messages only). |
charset |
String | null |
Email charset (email messages only). |
htmlbody |
String | null |
HTML content (email messages only). |
textbody |
String | null |
Plain-text content (email messages only). |
from |
String | null |
SMS sender ID (phone number or name, SMS only). |
smsbody |
String | null |
SMS message text (SMS only). |
idmessagetype |
Integer | (none) | Transactional message type ID for stats aggregation. |
attachments |
Array | null |
Array of attachment objects (see below). |
header.xxxx |
String | (none) | Custom header lines, e.g. header.Message-ID=MyID@server (email messages only). |
Attachment object
| Property | Type | Description |
|---|---|---|
filename |
String | Attachment file name. |
contenttype |
String | MIME type; inferred from filename if omitted. |
body |
String | File content as Base64-encoded string. |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"usecontactemail": false,
"nospool": false
},
"values": {
"type": "email",
"fromemail": "sender@example.com",
"fromname": "Sender Name",
"to": "recipient@example.com",
"subject": "Test Email",
"htmlbody": "This is a <i>test</i> email"
}
}Example responses
200 - Success Response
{
"messageId": "27335",
"address": "recipient@example.com",
"actualStatus": "waiting",
"notSentCause": null,
"sentDate": null,
"opened": false,
"lastOpenedTs": null,
"clicked": false,
"lastClickedTs": null,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1773658412517,
"messageRetention": "full",
"externalId": null
}400 - Error Response - Empty From Email
{
"error": "an empty fromemail is not valid",
"debugMessage": "HTTP 400 an empty fromemail is not valid"
}POST | Send simple message using contact data
/v19/simplemessages/messageSend a transactional message with an attachment to a platform contact
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"usecontactemail": true,
"idcontact": 1,
"nospool": false
},
"values": {
"type": "email",
"fromemail": "sender@example.com",
"fromname": "Sender Name",
"subject": "Test Email for Contact",
"htmlbody": "This is a <i>test</i> email for contact",
"attachments": [
{
"filename": "hello.csv",
"contenttype": "text/csv",
"body": "bmFtZSxlbWFpbAp0ZXN0LHRlc3RAZXhhbXBsZS5jb20="
}
]
}
}Example responses
200 - Success Response
{
"messageId": "123456",
"address": "contact@example.com",
"actualStatus": "waiting",
"sentDate": "2023-06-15T10:30:00.000Z",
"opened": false,
"clicked": false,
"complainted": false,
"converted": false,
"messageRetention": "full",
"externalId": null
}POST | Send simple message using template
/v19/simplemessages/messageSend a transactional message using a communication as a template filled with temp vars
subject value, you must remove the renderatsend option (and vice versa).Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"usenewsletterastemplate": "true",
"idnewsletter": 5,
"renderatsend": "true",
"temp.myvar1": "hello",
"temp.myvar2": "world"
},
"values": {
"type": "email",
"fromemail": "email@test.informatica.it",
"fromname": "Test",
"replyto": "email@test.informatica.it",
"to": "recipient@domain.it"
}
}Example responses
200 - Success Response
{
"messageId": "123456",
"address": "contact@example.com",
"actualStatus": "waiting",
"sentDate": "2023-06-15T10:30:00.000Z",
"opened": false,
"clicked": false,
"complainted": false,
"converted": false,
"messageRetention": "full",
"externalId": null
}POST | Send SMS message
/v19/simplemessages/messageSend transactional SMS message
Send a single SMS message using the same options as the email message request.
See Send simple message options for full details.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"usenewsletterastemplate": "true",
"idnewsletter": 5
},
"values": {
"type": "sms",
"from": "smssender",
"smsbody": "helloooo",
"to": "+390000000"
}
}Example responses
- Success Response
POST | Send WhatsApp message
/v19/simplemessages/messageSend transactional WhatsApp message
Send a single WhatsApp message using the same options as the email message request.
See Send simple message options for full details.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"usecontactemail": false,
"usenewsletterastemplate": true,
"idnewsletter": 1,
"usehtmlcodeastemplate": false,
"renderatsend": true,
"nospool": false,
"temp.myvar": "hello"
},
"values": {
"type": "custom",
"customchannel": "whatsappbusiness",
"to": "+39...."
}
}Example responses
- Success Response
{
"messageId": "2",
"address": "+39340000000",
"actualStatus": "waiting",
"notSentCause": null,
"sentDate": null,
"opened": false,
"lastOpenedTs": null,
"clicked": false,
"lastClickedTs": null,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1725372853855,
"messageRetention": "minimal",
"externalId": null
}POST | Send MIME message
/v19/simplemessages/mimemessage?recipient=recipient@example.com&cssinline=false&idmessagetype=0&retention=full&destination=frontendSend a MIME transactional message
If the message is sent successfully, this function returns the message ID; otherwise it returns an error.
Prerequisites:
- Define the mandatory
recipientquery parameter.
- Include the header:
Content-Type: message/rfc822.
Query parameters
| Key | Type | Description |
|---|---|---|
recipient |
String | Recipient email address (mandatory). |
idcontact |
Integer | ID of the contact to link to the message (optional). |
expectedDeliveryTs |
Timestamp | Unix timestamp in milliseconds (default null) to schedule future delivery. |
destination |
String | Specifies delivery channel: frontend (contact), backend (platform user), or bulk (Simply-SMTP). Default is frontend. |
idmessagetype |
Integer | Message type for statistics aggregation. |
cssinline |
Boolean | Whether to apply CSS inline to the HTML content. |
retention |
String | Retention policy: minimal (discard body), full (store body & headers), or reserved. |
externalId |
String | Custom external ID (up to 1000 chars) for mapping the message to another system. |
Result
Returns a JSON object:
| Field | Description |
|---|---|
ok |
true or false
|
error |
Error description (if ok is false) |
messageId |
ID of the transactional message (if ok is true) |
Query parameters
| Parameter | Description |
|---|---|
recipient |
recipient@example.com |
cssinline |
false |
idmessagetype |
0 |
retention |
full |
destination |
frontend |
Headers
| Header | Value |
|---|---|
Content-Type |
message/rfc822 |
Request body
From: "MN test" <sender@example.com>
Message-ID: <5bec11c119194c14999e592feb46e3cf@localhost>
Subject: Test Email
To: recipient@example.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="start"
--start
Content-type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html>
<head>
</head>
<body>
<div>This is a test email</div>
</body>
</html>
--start--Example responses
200 - Success Response
{
"messageId": 1,
"ok": true,
"error": ""
}400 - Error Response - Empty From Email
{
"messageId": null,
"ok": false,
"error": "Empty from in body message"
}POST | Batch Send simple messages
/v19/simplemessages/messagesSend multiple simple messages in a batch.
Options are the same as _Send simple message_.
Response
A list with one object per message, in the same order as the request: result has the status of the message, with the same fields as _Get simple message status_, and error the reason why the message was not sent. The call returns HTTP 200 also when some messages fail.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"messages": [
{
"options": {
"usecontactemail": false,
"nospool": false
},
"values": {
"type": "email",
"fromemail": "sender@example.com",
"fromname": "Sender Name",
"to": "recipient1@example.com",
"subject": "Test Email 1",
"htmlbody": "This is a <i>test</i> email 1"
}
},
{
"options": {
"usecontactemail": false,
"nospool": false
},
"values": {
"type": "email",
"fromemail": "sender@example.com",
"fromname": "Sender Name",
"to": "recipient2@example.com",
"subject": "Test Email 2",
"htmlbody": "This is a <i>test</i> email 2"
}
}
]
}Example responses
200 - Success Response
[
{
"error": null,
"result": {
"messageId": "27335",
"address": "recipient1@example.com",
"actualStatus": "waiting",
"notSentCause": null,
"sentDate": null,
"opened": false,
"lastOpenedTs": null,
"clicked": false,
"lastClickedTs": null,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1773658412517,
"messageRetention": "full",
"externalId": null
}
},
{
"error": null,
"result": {
"messageId": "27336",
"address": "recipient2@example.com",
"actualStatus": "waiting",
"notSentCause": null,
"sentDate": null,
"opened": false,
"lastOpenedTs": null,
"clicked": false,
"lastClickedTs": null,
"idbouncecategory": null,
"complainted": false,
"converted": false,
"lastConversionTs": null,
"expectedDeliveryTs": 1773658412517,
"messageRetention": "full",
"externalId": null
}
}
]200 - Error on a single message
[
{
"error": "HTTP 400 an empty fromemail is not valid",
"result": null
}
]Communications
GET | Get newsletter basic information
/v19/newsletters/:id/infoGet newsletter (communication or transactional template) basic information such as name, type, status, thumbnail image, channel details (like email headers), etc.
When the SMS of the newsletter is translated, the sms channel also has languages, the languages of the SMS with the main one first, and localized_bodies, the text of each translation keyed by language, only for the languages that have one. body is the text of the main language. The channel of an SMS that is not translated has neither of the two.
Path variables
| Variable | Description |
|---|---|
id |
ID of the communication (or transactional template) |
Example responses
200 - Communication example
{
"id": 101,
"name": "Summer Deals Newsletter",
"type": "communication",
"status": "draft",
"idjourney": 202,
"journey": "Summer Campaign 2025",
"idworkflow": 0,
"idlandingpage": 0,
"creationDate": 1730707200000,
"lastUpdateDate": 1731285600000,
"sentDate": null,
"scheduledSendDate": null,
"channels": [
{
"preheader": "Save big on your summer essentials",
"from_email": "offers@magnews.com",
"channel": "email",
"absplit": false,
"from_name": "Magnews Marketing Team"
}
],
"thumbnail": "http://myfrontendinstance/newsletterthumb/6/101?_cv=704942055&s=b3ffd470b2e15490d33eb314a1e7102ef6fe760c401120982a9df241fdcf849e"
}200 - Translated SMS example
{
"id": 397,
"name": "sms tradotto",
"type": "communication",
"status": "draft",
"idjourney": 11,
"journey": "My journey",
"idworkflow": 0,
"idlandingpage": 0,
"creationDate": 1793950651720,
"lastUpdateDate": 1793950725290,
"sentDate": null,
"scheduledSendDate": null,
"channels": [
{
"languages": [
"ITA",
"BUL",
"CZE",
"DAN",
"DEU",
"DUT",
"ELL",
"ENG",
"FIN",
"FRA",
"HEB",
"HRV",
"HUN",
"JPN",
"KAT",
"KOR",
"LIT",
"NOR",
"POL",
"POR",
"RON",
"RUS",
"SLO",
"SLV",
"SPA",
"SRP",
"SWE",
"THA",
"TUR",
"UKR",
"ZHO"
],
"localized_bodies": {
"BUL": "sandokan"
},
"channel": "sms",
"from": "diana",
"body": "pincopallino"
}
],
"thumbnail": "http://myfrontendsite/newsletterthumb/6/397?_cv=1916441062&s=970f028897cb7fd7bfe2cc90b6e60c57d556a7328ad2dceac262bcd87219b786"
}200 - Transactional example
{
"id": 337,
"name": "WhatsApp test Rest API",
"type": "transactional",
"status": "active",
"idjourney": 11,
"journey": "My journey",
"idworkflow": 0,
"idlandingpage": 0,
"creationDate": 1725360693687,
"lastUpdateDate": 1725370784810,
"sentDate": null,
"scheduledSendDate": null,
"channels": [
{
"channel": "whatsappbusiness"
}
],
"thumbnail": "http://myfrontendsite/newsletterthumb/6/337?_cv=1419749233&s=4db29bf46d558cd9f5226e1fd19bc547f04a7060526747fa4c799122aab8288f"
}POST | Create communication
/v19/communications/createCreates a new communication (marketing newsletter) starting from a design template. Only the email channel is supported.
Writing the Q sections in the same call
The optional sections field fills the communication with Q sections in the same call, so there is no need to call _Write communication sections_ afterwards. The catalog items available for the template are returned by _Get template Q catalog_ (see the _Templates_ section).
Note: sections requires Magnews Q to be enabled on the account, otherwise HTTP 403 is returned. Contact your account manager to activate it.
The creation is all or nothing: when a section cannot be written the communication is not created at all and only the error is returned. A parameter whose qtype is an image (image) also accepts the URL of a remote image: the image is downloaded into the media of the communication and the parameter points to that copy, so the email never loads images from the original site. An image that cannot be downloaded keeps the default image of the design template.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
name |
String | \- | Required. Name of the communication. |
idjourney |
Integer | \- | Required. ID of the journey the communication belongs to. |
template |
String | \- |
Required. ID of the design template: global: for global templates, custom: for custom templates. |
channel |
String | "email" |
Channel of the communication. Only email is supported. |
subject |
String | null |
Email subject. |
preheader |
String | null |
Email preheader (preview text). |
from_name |
String | null |
From header name. |
from_email |
String | null |
From header email address. |
replyto |
String | null |
Reply-To header email address. |
target |
String | null |
Comma separated list of audience IDs used as default target, e.g. "12,15". |
scheduled_date |
Timestamp | null |
Expected delivery date. |
sections |
Array | null |
Q sections to write in the communication as part of its creation, replacing the default body of the design template. Same format as the body of _Write communication sections_: at least 1 and at most 100 section objects, each with catalogItemId, params and blocks. Requires Magnews Q (see below). |
Response
HTTP 201 Created with a JSON object:
| Field | Type | Description |
|---|---|---|
id |
Integer | ID of the newly created communication. |
sections |
Integer | Number of sections written. Returned only when sections was in the request. |
previewUrl |
String | URL of the preview of the communication. Returned only when sections was in the request. |
Errors
| Status | When |
|---|---|
| 400 | Missing body, missing name, idjourney or template, channel other than email, unknown template, invalid journey, invalid sections (all the problems are listed in a single error), or validation errors reported by the creation engine (message, errors, genericErrors). |
| 403 | The user lacks the edit newsletter permission on the journey, or sections is given and Magnews Q is not enabled. |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"name": "Spring newsletter",
"idjourney": 1,
"template": "global:inspireemail",
"channel": "email",
"subject": "Spring news",
"preheader": "What's new this spring",
"from_name": "Magnews",
"from_email": "news@example.com",
"replyto": "support@example.com",
"target": "129",
"sections": [
{
"catalogItemId": "bundled/global:inspireemail/intro1",
"params": {
"headline": "Spring is here",
"cta": "Shop now",
"content_url": "https://example.com/spring",
"image": "https://example.com/images/spring.jpg"
}
},
{
"catalogItemId": "bundled/global:inspireemail/content8",
"blocks": [
{
"block": "Column 1",
"params": {
"headline": "Shoes",
"description": "The new collection",
"cta": "Discover",
"content_url": "https://example.com/shoes"
}
},
{
"block": "Column 2",
"params": {
"headline": "Bags",
"description": "Handmade in Italy",
"cta": "Discover",
"content_url": "https://example.com/bags"
}
}
]
}
]
}Example responses
201 - Create communication
{
"id": 3282,
"sections": 2,
"previewUrl": "https://myaccount.example.it/newsletterthumb/7/3282?_cv=925831002&s=7dd8c125b8a57d5b67310d5a2f43a3558afbb97d74eb127c2a53631c859ee679"
}POST | Update newsletter basic information
/v19/newsletters/:id/updateUpdates an existing newsletter. This endpoint allows modifying fields such as the name, subject, sender information, and descriptions. If the newsletter has an A/B split test enabled, you can target a specific variant for the update.
Usage Notes
- Transactional Newsletters: The
newsletterKeyfield can only be set if the newsletter is configured as a transactional template.
- A/B Split Test: If the newsletter has an active A/B test, the
subject,preheader,fromEmailandfromNamefields will update the specific variant if the endpoint is called with theabsplitversionquery parameter (e.g.,/update?absplitversion=b).
- Optionality: It is not necessary to send all fields; you can include only the ones you actually intend to modify in the JSON body.
Path variables
| Variable | Description |
|---|---|
id |
ID of the communication (or transactional template) |
Request body
{
"name": "Newsletter Promozionale Gennaio 2026",
"subject": "Sconti esclusivi solo per te!",
"fromEmail": "marketing@example.com",
"fromName": "Team Marketing MagNews",
"emailReplyTo": "supporto@example.com",
"preheader": "Scopri le offerte riservate ai nostri migliori clienti.",
"usersDescription": "Campagna per il lancio dei saldi invernali 2026.",
"contactsDescription": "Comunicazioni periodiche su sconti e promozioni."
}Example responses
200 - Update newsletter basic information
POST | Write communication sections
/v19/communications/communication/:id/sectionsReplaces the content of the editable sections container of a communication with the requested sections, each one instantiated from a Q catalog item of the design template the communication was created from. The catalog items available for a template, with their qtype parameters and blocks, are returned by _Get template Q catalog_ (see the _Templates_ section).
Note: this endpoint requires Magnews Q to be enabled on the account, otherwise HTTP 403 is returned. Contact your account manager to activate it.
The communication must be a draft (not sent yet). A transactional message or a communication template cannot be written directly: write the sections of its work in progress copy instead.
The existing sections of the container are dropped and the requested ones are added in the given order. The whole request is validated first and the document is restored on failure, so the communication is never left half written. All the validation problems of the request (unknown catalog items, blocks or qtypes, missing values) are reported together in a single error.
A parameter whose qtype is an image (image) also accepts the URL of a remote image: the image is downloaded into the media of the communication and the parameter points to that copy, so the email never loads images from the original site. An image that cannot be downloaded keeps the default image of the design template.
To create a communication or a transactional message and write its sections in a single call, use the sections field of _Create communication_ or _Create transactional message_.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
sections |
Array | \- | Required. Ordered list of the sections to write, at least 1 and at most 100 (see below). |
Section object
| Field | Type | Default Value | Description |
|---|---|---|---|
catalogItemId |
String | \- |
Required. ID of the Q catalog item as returned by _Get template Q catalog_: bundled// or shared//. |
params |
Object | {} |
Map of qtype to value, applied to every parameter of the section carrying that qtype, whatever its block. |
blocks |
Array | [] |
Per block values, for sections made of several content blocks (e.g. the columns of a gallery). See below. |
Block object
| Field | Type | Default Value | Description |
|---|---|---|---|
block |
String | \- |
Required. Name of the block, i.e. the qcontentblock of the catalog item parameters. Each block can appear once per section. |
params |
Object | {} |
Map of qtype to value for the parameters of this block. Overrides the section wide params on this block. |
Response
| Field | Type | Description |
|---|---|---|
idnewsletter |
Integer | ID of the communication. |
sections |
Integer | Number of sections written. |
previewUrl |
String | URL of the preview of the communication. |
Errors
| Status | When |
|---|---|
| 400 | The communication has already been sent, is a template, has no source template or no editable sections container; sections is empty or exceeds 100 items; a catalog item, block or qtype is unknown or does not belong to the communication template (all the problems are listed in a single error). |
| 403 | Magnews Q is not enabled, or the user lacks the edit newsletter permission. |
| 404 | The communication does not exist. |
Path variables
| Variable | Description |
|---|---|
id |
ID of the communication (or of the work in progress copy of a transactional message) |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"sections": [
{
"catalogItemId": "bundled/global:inspireemail/intro1",
"params": {
"headline": "Spring is here",
"cta": "Shop now",
"content_url": "https://example.com/spring",
"image": "https://example.com/images/spring.jpg"
}
},
{
"catalogItemId": "bundled/global:inspireemail/content8",
"blocks": [
{
"block": "Column 1",
"params": {
"headline": "Shoes",
"description": "The new collection",
"cta": "Discover",
"content_url": "https://example.com/shoes",
"image": "https://example.com/images/shoes.jpg"
}
},
{
"block": "Column 2",
"params": {
"headline": "Bags",
"description": "Handmade in Italy",
"cta": "Discover",
"content_url": "https://example.com/bags",
"image": "https://example.com/images/bags.jpg"
}
}
]
}
]
}Example responses
200 - Success Response
{
"idnewsletter": 391,
"sections": 2,
"previewUrl": "https://mysite.it/newsletterthumb/6/391?_cv=2013395898&s=1daafd05ceaf3ab8b1fde76e9243e1b72f9f2455e0ca1683fa0a44ec08caf8a1"
}POST | Send communication (create delivery)
/v19/communications/communication/:id/sendTriggers the sending of a communication (newsletter) to a specified target. This creates a new Delivery instance. You can configure scheduling (immediate, postponed, periodic, or partitioned) and various delivery options for different channels (email, sms).
Request body includes this fields:
-
enableEmail: Whether to enable email channel.
-
enableSms: Whether to enable sms channel.
-
customChannels: List of custom channels to enable (comma separated).
-
target: List of target group IDs.
-
skipConfirmation: If true, skips the confirmation step if required by the campaign.
-
schedule: Scheduling configuration (see below)
-
options: Delivery options (see below)
Scheduling configuration:
-
type: Type of schedule:immediate,scheduled,periodic,partitioned.
-
period: For periodic:daily,weekly,monthly,yearly.
-
year,month,day,hour,minute: Date and time components for the schedule.
-
sendtimeOptimization: If true, enable send-time optimization.
-
useContactsTimeZone: If true, use the contacts' time zone for delivery time.
-
weekDays: For weekly period:monday,tuesday,..
-
partitions: For partitioned deliveries: list of { "delta": long, "percent": int }
-
startInterval,endInterval: Dates used to define a range for periodic deliveries.
Options:
-
recall: Whether this is a recall delivery.
-
failOnEmptyTarget: If true, the request fails if the target has no contacts.
-
ignoreUserPreferencesOnChannels: Ignore global user channel preferences and send the message anyway.
-
additionalTargetFilterQuery: MQL filter to further restrict the target.
-
email: Email specific options (subject override, encoding, images embedding, etc.).
-
sms: SMS specific options (from override, encoding).
-
speedLimiter: Limit the sending speed (enabled,maxSpeedPerMinute).
-
authorization: Configure authorization workflow.
-
report: Configure delivery report notification.
-
trackingPolicyOverrideMode: Tracking policy of the delivery:enabledtracks opens and clicks even for contacts with tracking disabled (notrack),disabledturns off open and click tracking for every contact,accountapplies the privacy options of the account. When omitted the tracking policy of the communication is used. It takes precedence overemail.webBug, which is still accepted:truecorresponds toaccount,falsetodisabled. Any other value returns HTTP 400.
Response:
-
iddelivery: id of the delivery to use in/delivery/:iddelivery/status|pause|stop|resumeendpoints
-
errors: detailed errors (no channels enabled for communication, missing required parameters, no target for sending,...)
Each error has channel, location, description, type, value and ref. When the error is about a translated text, such as a translation of the SMS, it also has language, the language of that text.
Path variables
| Variable | Description |
|---|---|
id |
ID of the communication to send |
Request body
{
"enableEmail": true,
"skipConfirmation": true,
"target": [
129
],
"schedule": {
"type": "immediate"
},
"options": {
"failOnEmptyTarget": true,
"useAllChannels": true,
"email": {
"useNewsletterOptions": true,
"allowDuplicatedRecipients": false
},
"additionalTargetFilterQuery": "SELECT * FROM CONTACTS WHERE email like '%diennea.com'"
}
}Example responses
200 - Send communication
{
"iddelivery": 81,
"errors": null
}GET | Get delivery status
/v19/deliveries/delivery/:iddelivery/statusRetrieves the detailed status and configuration of a specific delivery. Returns information about the current state, scheduling, and target audience.
Response Body
The response is a JSON object with the following fields:
-
iddelivery(int): The unique identifier of the delivery.
-
idnewsletter(int): The identifier of the newsletter associated with the delivery.
-
trial(boolean): Indicates if it's a trial delivery.
-
status(string): The current status of the delivery. Possible values are:
- unconfirmed: The delivery has not been confirmed.
- scheduled: The delivery is waiting to be sent at the scheduled time.
- sending: The delivery is being prepared or sent.
- error: An error occurred during preparation or sending.
- finished: The delivery has completed successfully.
- paused: The delivery has been paused.
- stopped: The delivery was interrupted or stopped.
-
target(list of integers): A list of audience IDs that are the target of this delivery.
-
targetUsesAdditionalFilter(boolean): Indicates if additional filters are applied to the target
-
requestedMessages(map): A map showing the number of requested messages per channel (e.g., "email", "sms").
-
startDate(date): The timestamp when the delivery started or is scheduled to start.
-
schedule(object): An object describing the scheduling configuration.
Path variables
| Variable | Description |
|---|---|
iddelivery |
ID of the delivery (as returned by Send communication) |
Example responses
200 - Get delivery status
{
"iddelivery": 81,
"idnewsletter": 372,
"trial": false,
"status": "sending",
"target": [
129
],
"targetUsesAdditionalFilter": true,
"requestedMessages": {
"sms": 0,
"email": 12
},
"startDate": 1769176616187,
"schedule": {
"type": "immediate"
}
}POST | Pause delivery
/v19/deliveries/delivery/:iddelivery/pausePauses an active delivery. Suspends the execution of a delivery. The delivery must be active and not yet completed or moved to history. Requires "send newsletter" permissions.
Path variables
| Variable | Description |
|---|---|
iddelivery |
ID of the delivery (as returned by Send communication) |
Example responses
200 - Pause delivery
POST | Resume delivery
/v19/deliveries/delivery/:iddelivery/resumeResumes a previously paused delivery. Restarts a delivery that was suspended. It sets the resume time to the current system time. Requires "send newsletter" permissions.
Path variables
| Variable | Description |
|---|---|
iddelivery |
ID of the delivery (as returned by Send communication) |
Example responses
200 - Resume delivery
POST | Stop delivery
/v19/deliveries/delivery/:iddelivery/stopStops an active delivery. This method attempts to cancel an ongoing delivery. It requires "send newsletter" permissions for the campaign associated with the delivery.
Path variables
| Variable | Description |
|---|---|
iddelivery |
ID of the delivery (as returned by Send communication) |
Example responses
200 - Stop delivery
GET | Query deliveries
/v19/deliveries/query?query=SELECT * from DELIVERIES where idnewsletter=5Queries delivery records that satisfy an MQL query; a delivery represents a single instance created each time a communication is sent, whether for testing or for a production send.
The response is a JSON array of objects containing:
-
iddelivery: ID of the delivery
-
idnewsletter: ID of the associated communication
-
trial: whether the delivery is a test (trial)
-
status: a value between "sending", "error", "unconfirmed", "scheduled", "paused", "finished", "stopped"
-
target: list of target audience IDs
-
targetUseAdditionalFilter: whether an additional filter is applied to the target
-
requestedMessages: count of requested messages per channel (ie: 'email': 23, 'sms': 2)
-
startDate: start date and time of delivery (unix ts milliseconds)
-
schedule: the scheduling configuration
The schedule object contains a type field which determines the structure:
-
immediate: No additional fields.
-
scheduled: Includesyear, month, day, hour, minute, sendTimeOptimization, useContactsTimeZone.
-
periodic: Includes period (daily, weekly, monthly, yearly),month, day, hour, minute, weekDays, useContactsTimeZone, sendTimeOptimization, startInterval, endInterval.
-
partitioned: Includes partitions (a list of objects with delta and percent).
Query parameters
| Parameter | Description |
|---|---|
query |
MQL query to filter deliveries |
Example responses
200 - Query communication deliveries
[
{
"iddelivery": 2,
"idnewsletter": 5,
"trial": false,
"status": "finished",
"target": [
8
],
"targetUsesAdditionalFilter": false,
"requestedMessages": {
"sms": 1,
"email": 0
},
"startDate": 1487852029587,
"schedule": {
"type": "immediate"
}
}
]Templates
Design templates (global and custom) are the starting point of communications and transactional messages created via API. This section exposes the Q catalog of a template, i.e. the sections that can be written into a communication with Write communication sections.
GET | Get template Q catalog
/v19/templates/:templateId/qcatalogReturns the Q catalog of a design template: the catalog items (sections) that can be written into a communication created from that template through _Write communication sections_, with the parameters they expose.
Note: this endpoint requires Magnews Q to be enabled on the account, otherwise HTTP 403 is returned. Contact your account manager to activate it.
Only global (global:) and custom (custom:) newsletter templates are supported. The template must be available to the user: active, not marked for import, and, for a custom template restricted to some journeys, the user must be allowed to use at least one of them.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
templateId |
String | ID of the design template: global: for global templates, custom: for custom templates. |
Response
| Field | Type | Description |
|---|---|---|
templateId |
String | ID of the template. |
items |
Array | List of the Q catalog items (see below). |
Catalog item object
| Field | Type | Description |
|---|---|---|
id |
String | ID of the catalog item, prefixed with its source: bundled// for items bundled in the template, shared// for items of the shared catalog. Use it as catalogItemId in _Write communication sections_. |
name |
String | Localized name of the item. |
qDescription |
String | Description of the section. |
params |
Array | Parameters of the section (see below). |
Parameter object
| Field | Type | Description |
|---|---|---|
name |
String | Name of the parameter in the template. |
qtype |
String | Key to use in params when writing the section. |
qcontentblock |
String | Block the parameter belongs to, null for section wide parameters. |
type |
String | Parameter type declared in the template layout (e.g. text, html, image, url), null when not available. |
defaultValue |
String | Default value of the parameter. |
Errors
| Status | When |
|---|---|
| 400 | The template ID is not a global or custom template ID. |
| 403 | Magnews Q is not enabled, or the user cannot use the template. |
| 404 | The template does not exist or is not available. |
Path variables
| Variable | Description |
|---|---|
templateId |
ID of the design template: global:<id> for global templates, custom:<id> for custom templates |
Example responses
200 - Get template Q catalog
{
"templateId": "global:inspireemail",
"items": [
{
"id": "bundled/global:inspireemail/intro0",
"name": "Hero immersiva",
"qDescription": "Opening hero with full-width image only, dominant visual weight, no text, and strong atmospheric impact.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_b2.jpg w=800 h=533]"
}
]
},
{
"id": "bundled/global:inspireemail/intro1",
"name": "Hero overlay",
"qDescription": "Opening hero with background image, left-aligned overlaid headline and CTA, high visual impact and low text density.",
"params": [
{
"name": "bgimg",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_b1.jpg w=800 h=400]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza<br>del mondo"
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/intro2",
"name": "Hero split",
"qDescription": "Opening two-column hero with text and CTA on the left, large image on the right, balanced visual and informational weight.",
"params": [
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": null,
"type": "html",
"defaultValue": "Abbandonati all'avventura e scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_b3.jpg w=800 h=1080]"
}
]
},
{
"id": "bundled/global:inspireemail/intro3",
"name": "Hero testuale",
"qDescription": "Opening text-only hero with centered kicker, headline, paragraph and CTA, high typographic hierarchy and no imagery.",
"params": [
{
"name": "text",
"qtype": "kicker",
"qcontentblock": null,
"type": "html",
"defaultValue": "ESPLORA IL MONDO"
},
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Migliori offerte [temp:currentYear{static.currentYear}]"
},
{
"name": "text",
"qtype": "description_long",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi. Non esiste emozione più grande che partire per un viaggio, lasciare la routine quotidiana e immergersi in un mondo nuovo."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content1",
"name": "Testo editoriale",
"qDescription": "Single-column editorial block with headline followed by long text, low visual weight and continuous reading flow.",
"params": [
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo, lasciati trasportare dal cuore"
},
{
"name": "text",
"qtype": "description_long",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi. Non esiste emozione più grande che partire per un viaggio, lasciare la routine quotidiana e immergersi in un mondo nuovo."
}
]
},
{
"id": "bundled/global:inspireemail/content2",
"name": "Blocco paragrafo",
"qDescription": "Single-column paragraph-only block with minimal hierarchy, very low visual weight and high text density.",
"params": [
{
"name": "text",
"qtype": "description_long",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi. Non esiste emozione più grande che partire per un viaggio, lasciare la routine quotidiana e immergersi in un mondo nuovo."
}
]
},
{
"id": "bundled/global:inspireemail/content3",
"name": "Articolo immagine piccola sinistra",
"qDescription": "Two-column article with small image on the left, text and CTA on the right, compact horizontal rhythm.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_c4.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content4",
"name": "Articolo immagine piccola destra",
"qDescription": "Two-column article with text and CTA on the left, small image on the right, compact mirrored horizontal rhythm.",
"params": [
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_c2.jpg w=800 h=650]"
}
]
},
{
"id": "bundled/global:inspireemail/content5",
"name": "Blocco story",
"qDescription": "Single-column article with large image on top, headline, long text and CTA below, strong vertical storytelling flow.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_b1.jpg w=800 h=400]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo, lasciati trasportare dal cuore"
},
{
"name": "text",
"qtype": "description_long",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi. Non esiste emozione più grande che partire per un viaggio, lasciare la routine quotidiana e immergersi in un mondo nuovo."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content6",
"name": "Articolo immagine grande sinistra",
"qDescription": "Two-column article with large image on the left, text and CTA on the right, strong visual entry point.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_c3.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo, lasciati trasportare dal cuore"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content9",
"name": "Articolo immagine grande destra",
"qDescription": "Two-column article with text and CTA on the left, large image on the right, strong mirrored visual rhythm.",
"params": [
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo, lasciati trasportare dal cuore"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": null,
"type": "html",
"defaultValue": "Il viaggio è un sogno che non ha confini. Un'avventura che ci conduce in luoghi lontani e sconosciuti, alla scoperta di culture diverse e di noi stessi."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": null,
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": null,
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": null,
"type": "image",
"defaultValue": "[image:c_c1.jpg w=800 h=650]"
}
]
},
{
"id": "bundled/global:inspireemail/content8",
"name": "2 colonne",
"qDescription": "Two-column article layout with equal columns, image on top and text below, medium browsing density.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 1",
"type": "image",
"defaultValue": "[image:c_c3.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Abbandonati all'avventura e scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 1",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 1",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 2",
"type": "image",
"defaultValue": "[image:c_c1.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Abbandonati all'avventura e scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 2",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 2",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content10",
"name": "3 colonne",
"qDescription": "Three-column article layout with repeated image-top structure, medium-high density and balanced browsing rhythm.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 1",
"type": "image",
"defaultValue": "[image:c_c2.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 1",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 1",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 2",
"type": "image",
"defaultValue": "[image:c_c3.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 2",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 2",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 3",
"type": "image",
"defaultValue": "[image:c_c4.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 3",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 3",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 3",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 3",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/content11",
"name": "4 colonne",
"qDescription": "Four-column compact article layout with repeated image-top structure, high density and strong scannability.",
"params": [
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 1",
"type": "image",
"defaultValue": "[image:c_c1.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 1",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 1",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 1",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 2",
"type": "image",
"defaultValue": "[image:c_c2.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 2",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 2",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 2",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 3",
"type": "image",
"defaultValue": "[image:c_c3.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 3",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 3",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 3",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 3",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
},
{
"name": "src",
"qtype": "image",
"qcontentblock": "Column 4",
"type": "image",
"defaultValue": "[image:c_c4.jpg w=800 h=650]"
},
{
"name": "text",
"qtype": "headline",
"qcontentblock": "Column 4",
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
},
{
"name": "text",
"qtype": "description",
"qcontentblock": "Column 4",
"type": "html",
"defaultValue": "Scopri posti nuovi, lascia che il sogno del viaggio diventi realtà."
},
{
"name": "text",
"qtype": "cta",
"qcontentblock": "Column 4",
"type": "text",
"defaultValue": "Partiamo"
},
{
"name": "link",
"qtype": "content_url",
"qcontentblock": "Column 4",
"type": "url",
"defaultValue": "[var:BRAND_WEBSITE]"
}
]
},
{
"id": "bundled/global:inspireemail/title1",
"name": "Titolo eyebrow",
"qDescription": "Section header with small eyebrow above large title, left-aligned typography and medium visual emphasis.",
"params": [
{
"name": "text",
"qtype": "kicker",
"qcontentblock": null,
"type": "html",
"defaultValue": "Esplora il mondo"
},
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri posti nuovi"
}
]
},
{
"id": "bundled/global:inspireemail/title2",
"name": "Titolo banner",
"qDescription": "Full-width dark banner title with centered text, strong contrast and high section separation weight.",
"params": [
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
}
]
},
{
"id": "bundled/global:inspireemail/title3",
"name": "Titolo divider",
"qDescription": "Left-aligned section title with short divider underneath, compact hierarchy transition and low visual density.",
"params": [
{
"name": "text",
"qtype": "headline_short",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo"
}
]
},
{
"id": "bundled/global:inspireemail/title4",
"name": "Titolo icona",
"qDescription": "Centered editorial title with decorative icon above, refined visual accent and medium section emphasis.",
"params": [
{
"name": "text",
"qtype": "headline",
"qcontentblock": null,
"type": "html",
"defaultValue": "Scopri la bellezza del mondo,<br>lasciati trasportare dal cuore"
}
]
}
]
}Contacts
GET | Find contact by id
/v19/contacts/contact/:idcontactFind a contact by ID.
The response has iddatabase, idcontact, status and fields, the values of all the fields of the contact keyed by field name in lowercase, as strings. The format is the same as _Query contacts_.
If the contact does not exist or the user cannot view it, the response is HTTP 204 with no body.
Path variables
| Variable | Description |
|---|---|
idcontact |
ID of the contact |
Example responses
200 - Success Response
{
"iddatabase": 1,
"idcontact": 1001,
"status": "subscribed",
"fields": {
"causa_sospensione": "0",
"lingua": "",
"data_iscrizione": "03/07/2026 21:20",
"notrack": "false",
"timezone": "",
"dominio": "example.com",
"data_ultima_azione": "",
"cell": "",
"data_sospensione": "",
"iddeliverycluster": "0",
"login": "contact@example.com",
"idlettore": "1001",
"iddatabase": "1",
"causa_eliminazione": "0",
"data_ultima_esportazione": "",
"idcontact": "1001",
"fax": "",
"provenienza": "3",
"email": "contact@example.com",
"nome_utente": "contact@example.com",
"primarykey": "contact@example.com",
"riceve_fax": "0",
"_fieldsets_with_record": "[]",
"riceve_sms": "0",
"suspend_til_date": "",
"idfriend": "0",
"check": "4467230",
"riceve_email": "1",
"data_conf_isc": "",
"formato_spedizione": "1",
"data_ultima_modifica": "30/09/2026 14:50",
"idaddressbook": "1",
"flag_stato": "0",
"data_eliminazione": ""
}
}GET | Query contacts
/v19/contacts/query?query=select * from contacts where iddatabase=7 limit 2Return a list of contacts matching the specified query.
Writing queries
See the Query documentation for more details on how to write queries.
Query parameters
| Parameter | Description |
|---|---|
query |
Query used to fetch contacts |
Example responses
200 - Success Response
[
{
"iddatabase": 7,
"idcontact": 500106,
"status": "unsubscribed",
"fields": {
"ls_score_dm_3": "0",
"ls_scoring_1": "cold",
"ls_score_dm_1": "0",
"ls_scoring_3": "cold",
"idlettore": "500106",
"iddatabase": "7",
"causa_eliminazione": "1",
"data_ultima_esportazione": "",
"idcontact": "500106",
"fax": "",
"shop_accepts_marketing": "false",
"nome_utente": "5062206324890",
"primarykey": "5062206324890",
"ls_score_bh": "0",
"riceve_sms": "0",
"suspend_til_date": "",
"idfriend": "0",
"check": "4215818",
"riceve_email": "1",
"formato_spedizione": "2",
"data_ultima_modifica": "25/02/2025 12:58",
"rfm_output_f_1": "0",
"rfm_output_f_3": "0",
"flag_stato": "99",
"data_eliminazione": "22/09/2022 11:51",
"rfm_output_r_1": "0",
"rfm_output_r_3": "0",
"causa_sospensione": "0",
"lingua": "",
"cognome": "Clementi",
"data_iscrizione": "26/03/2021 10:37",
"notrack": "false",
"timezone": "",
"dominio": "informatica.it",
"data_ultima_azione": "",
"cell": "",
"data_sospensione": "",
"iddeliverycluster": "0",
"login": "5062206324890",
"rfm_output_c_1": "Prospect",
"shopify_imported": "true",
"rfm_output_c_3": "Prospect",
"provenienza": "2",
"email": "diana.example+test@informatica.it",
"ls_score_dm": "-5",
"riceve_fax": "0",
"_fieldsets_with_record": "[]",
"dyn_address1_composite": "via marconi",
"data_conf_isc": "",
"ls_score_bh_3": "0",
"ls_score_bh_1": "0",
"idaddressbook": "7",
"rfm_output_m_1": "0",
"rfm_output_m_3": "0",
"ls_scoring_updated_at": "30/10/2023 12:58"
}
},
{
"iddatabase": 7,
"idcontact": 500303,
"status": "unsubscribed",
"fields": {
"ls_score_dm_3": "0",
"ls_scoring_1": "cold",
"ls_score_dm_1": "0",
"ls_scoring_3": "cold",
"idlettore": "500303",
"iddatabase": "7",
"causa_eliminazione": "1",
"data_ultima_esportazione": "",
"idcontact": "500303",
"fax": "",
"shop_accepts_marketing": "false",
"nome_utente": "5143771775130",
"primarykey": "5143771775130",
"ls_score_bh": "0",
"riceve_sms": "0",
"suspend_til_date": "",
"idfriend": "0",
"check": "9014573",
"riceve_email": "1",
"formato_spedizione": "2",
"data_ultima_modifica": "22/09/2022 11:50",
"rfm_output_f_1": "0",
"rfm_output_f_3": "0",
"flag_stato": "99",
"data_eliminazione": "22/09/2022 11:51",
"rfm_output_r_1": "0",
"rfm_output_r_3": "0",
"causa_sospensione": "0",
"lingua": "",
"cognome": "clem6",
"data_iscrizione": "27/07/2022 00:02",
"notrack": "false",
"timezone": "",
"dominio": "test.informatica.it",
"data_ultima_azione": "",
"cell": "",
"data_sospensione": "",
"iddeliverycluster": "0",
"login": "5143771775130",
"rfm_output_c_1": "Prospect",
"shopify_imported": "true",
"rfm_output_c_3": "Prospect",
"provenienza": "2",
"email": "diana.example+6@test.informatica.it",
"ls_score_dm": "-5",
"riceve_fax": "0",
"_fieldsets_with_record": "[]",
"data_conf_isc": "",
"ls_score_bh_3": "0",
"ls_score_bh_1": "0",
"idaddressbook": "7",
"rfm_output_m_1": "0",
"rfm_output_m_3": "0",
"ls_scoring_updated_at": "30/10/2023 12:58"
}
},
{
"iddatabase": 7,
"idcontact": 500304,
"status": "unsubscribed",
"fields": {
"ls_score_dm_3": "0",
"ls_scoring_1": "cold",
"ls_score_dm_1": "0",
"ls_scoring_3": "cold",
"idlettore": "500304",
"iddatabase": "7",
"causa_eliminazione": "1",
"data_ultima_esportazione": "",
"idcontact": "500304",
"fax": "",
"shop_accepts_marketing": "false",
"nome_utente": "5143784521882",
"primarykey": "5143784521882",
"ls_score_bh": "0",
"riceve_sms": "0",
"suspend_til_date": "",
"idfriend": "0",
"check": "16705419",
"riceve_email": "1",
"formato_spedizione": "2",
"data_ultima_modifica": "22/09/2022 11:50",
"rfm_output_f_1": "0",
"rfm_output_f_3": "0",
"flag_stato": "99",
"data_eliminazione": "22/09/2022 11:51",
"rfm_output_r_1": "0",
"rfm_output_r_3": "0",
"causa_sospensione": "0",
"lingua": "",
"cognome": "clem7",
"data_iscrizione": "27/07/2022 00:02",
"notrack": "false",
"timezone": "",
"dominio": "test.informatica.it",
"data_ultima_azione": "",
"cell": "",
"data_sospensione": "",
"iddeliverycluster": "0",
"login": "5143784521882",
"rfm_output_c_1": "Prospect",
"shopify_imported": "true",
"rfm_output_c_3": "Prospect",
"provenienza": "2",
"email": "diana.example@test.informatica.it",
"ls_score_dm": "-5",
"riceve_fax": "0",
"_fieldsets_with_record": "[]",
"data_conf_isc": "",
"ls_score_bh_3": "0",
"ls_score_bh_1": "0",
"idaddressbook": "7",
"rfm_output_m_1": "0",
"rfm_output_m_3": "0",
"ls_scoring_updated_at": "30/10/2023 12:58"
}
},
{
"iddatabase": 7,
"idcontact": 500305,
"status": "unsubscribed",
"fields": {
"ls_score_dm_3": "0",
"ls_scoring_1": "cold",
"ls_score_dm_1": "0",
"ls_scoring_3": "cold",
"idlettore": "500305",
"iddatabase": "7",
"causa_eliminazione": "1",
"data_ultima_esportazione": "",
"idcontact": "500305",
"fax": "",
"shop_accepts_marketing": "false",
"nome_utente": "5143840293018",
"primarykey": "5143840293018",
"ls_score_bh": "0",
"riceve_sms": "0",
"suspend_til_date": "",
"idfriend": "0",
"check": "300681",
"riceve_email": "1",
"formato_spedizione": "2",
"data_ultima_modifica": "22/09/2022 11:50",
"rfm_output_f_1": "0",
"rfm_output_f_3": "0",
"flag_stato": "99",
"data_eliminazione": "22/09/2022 11:51",
"rfm_output_r_1": "0",
"rfm_output_r_3": "0",
"causa_sospensione": "0",
"lingua": "",
"cognome": "clem8",
"data_iscrizione": "27/07/2022 00:02",
"notrack": "false",
"timezone": "",
"dominio": "test.informatica.it",
"data_ultima_azione": "",
"cell": "",
"data_sospensione": "",
"iddeliverycluster": "0",
"login": "5143840293018",
"rfm_output_c_1": "Prospect",
"shopify_imported": "true",
"rfm_output_c_3": "Prospect",
"provenienza": "2",
"email": "diana.example+8@test.informatica.it",
"ls_score_dm": "-5",
"riceve_fax": "0",
"_fieldsets_with_record": "[]",
"data_conf_isc": "",
"ls_score_bh_3": "0",
"ls_score_bh_1": "0",
"idaddressbook": "7",
"rfm_output_m_1": "0",
"rfm_output_m_3": "0",
"ls_scoring_updated_at": "30/10/2023 12:58"
}
}
]POST | Count contacts
/v19/contacts/countReturns the number of contacts matching an optional MQL filter, broken down by subscription status.
The scope is never taken from the filter: it is resolved from the permissions of the calling user. Unknown properties in the body are refused rather than ignored, so a misspelled iddatabase cannot silently widen the count to the whole account.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
iddatabase |
Integer | null |
ID of the database whose contacts must be counted. Requires the view contacts permission on that database. When omitted, the contacts of every database the user can view are counted. Mutually exclusive with idaudience. |
idaudience |
Integer | null |
ID of the parent audience the contacts must belong to. The count honours the filter of that audience and of the ones it inherits from its ancestors, so it matches the size of an audience created underneath it. Mutually exclusive with iddatabase. |
filter |
String | null |
MQL boolean expression restricting the contacts to count, i.e. only the content of a WHERE clause on the CONTACTS table, e.g. sex = 'F' AND age > 18. It must not be a full statement and it does not need an iddatabase condition. |
Response
A JSON object with the four subscription statuses, always present:
| Field | Type | Description |
|---|---|---|
subscribed |
Integer | Number of subscribed contacts matching the filter. |
unconfirmed |
Integer | Number of unconfirmed contacts matching the filter. |
suspended |
Integer | Number of suspended contacts matching the filter. |
unsubscribed |
Integer | Number of unsubscribed contacts matching the filter. |
The counts are the ones shown in the interface, so contacts under quality control are not reported under any status and the four values do not necessarily add up to every contact in scope.
Errors
| Status | When |
|---|---|
| 400 | Missing body, iddatabase or idaudience not positive, both given, invalid filter, unknown property in the body, or parent audience that does not exist or cannot be viewed. |
| 403 | The user cannot view the contacts of the requested database, or the filter uses a table the user is not allowed to query. |
Writing filters
See the Query documentation for more details on how to write expressions on contacts.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"iddatabase": 1,
"filter": "email IS NOT NULL"
}Example responses
200 - Success Response
{
"subscribed": 187236,
"unconfirmed": 0,
"suspended": 0,
"unsubscribed": 46
}POST | Merge contact by id
/v19/contacts/contact/:idcontactCreates or updates a contact by providing the idcontact.
Options
You can map these options in the json body of the request, under "options" object.
| Option | Type | Default | Description |
|---|---|---|---|
| iddatabase | Integer | Database ID for the new contact | |
| sendemail | Boolean | false | Request to send an email to the contact |
| sendemailonactions | String (comma-separated) | insert, restore | Actions for which to send email, depending on the merge result: insert, update, nothing, reactivate, restore, subscription_confirm, update, delete, suspend
|
| idtemplate | Integer | null | ID of the template of the transactional message to use for the email |
| newsletterkey | String | null | Logical key of the template of the transactional message to use for the email. If also idtemplate is present, idtemplate takes precedence |
| enterworkflow | Boolean | false | Request the contact to enter an automated flow |
| enterworkflowonactions | String (comma-separated) | insert, restore | Actions triggering entrance to automated flow |
| key | String | null | Entry point ID for automated flow. If idworkflow not specified, all flows with the entry point are triggered |
| idworkflow | Integer | 0 | Specific workflow ID to enter. If 0, all matching flows are triggered |
| wf. | Primitive types | Session context variable, e.g., "wf.source": "website"
|
|
| denyupdatecontact | Boolean | false | Prevents contact update |
| forceallowrestorecontactonupdate | Boolean | false | Allows reactivation even with denyupdatecontact = true
|
| denysubscribenewcontact | Boolean | false | Prevents subscription of new contacts |
| denysubscribeunsubscribedcontact | Boolean | false | Denies reactivation of unsubscribed contacts |
| messageRetention | String | "minimal" | Retention policy: "minimal", "full", or "reserved"
|
| lookuprelations | Boolean | false | If true, uses logical keys for relational fields |
| addToSimpleGroup | Integer | Adds contact to the specified static audience | |
| removeFromSimpleGroup | Integer | Removes contact from the specified static audience | |
| returnwebtrackingid | Boolean | false | Returns Web Tracking session ID |
| storeEvent | String | This option requests to register an event. Only valid value: "contactUnsubscribed"; requires messageRef
|
|
| messageRef | String | Message reference for storeEvent
|
Values
You can map these values in the JSON body of the request, under the values object.
The values field contains the data to be associated with the contact. Keys must match the field IDs (e.g., email, name, status, etc.).
For the status field, you can specify one of the following values: subscribed, unsubscribed, unconfirmed or suspended.
⚠️ For decimal numbers, always use a JSON string, and format the decimal separator according to the international settings of the user performing the operation. Valid examples: "1234.56" or "1234,56".
For multivalue fields, use a string containing a comma-separated list of values, like this:
"MULTIVALUESFIELD": "\"value1\",\"value2\"".
Response
The API response contains the following fields:
| Key | Type | Description |
|---|---|---|
ok |
Boolean |
true if the operation was successful |
pk |
String | Primary key of the contact |
idcontact |
Integer | Unique ID of the contact |
action |
String | Executed action: one of insert, update, delete, nothing, reactivate, restore, subscription_confirm, suspend
|
errors |
Array | List of possible errors; each includes a type and the related field |
sendemail |
Object | Result of the email sending (if requested) |
sendemail.emailsent |
Boolean |
true if the email was sent |
sendemail.emailaddress |
String | Email address of the recipient |
sendemail.idsimplemessage |
String | ID of the transactional message |
enterworkflow |
Object | Result of the automated flow entry request |
enterworkflow.workflowentered |
Boolean |
true if at least one automated flow session was triggered |
enterworkflow.idworkflowsessions |
Array of Integer | List of session IDs for the triggered flows |
Path variables
| Variable | Description |
|---|---|
idcontact |
ID of the contact |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"values": {
"email": "contact@example.com",
"name": "John Doe"
},
"options": {
"updateIfExists": true
}
}Example responses
200 - Success Response
{
"ok": true,
"pk": "contact@example.com",
"idcontact": 1001,
"action": "update",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}POST | Merge contact by primary key
/v19/contacts/mergeUpdate or insert a contact by matching the database primary key value (e.g., email or username).
For json body specification refer to Merge contact options and values.
The response has the same fields as _Merge contact by id_.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"values": {
"email": "contact@example.com",
"name": "John Doe"
},
"options": {
"iddatabase": 1,
"updateIfExists": true
}
}Example responses
200 - Success Response
{
"ok": true,
"pk": "contact@example.com",
"idcontact": 1001,
"action": "insert",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}POST | Merge contact by secondary key
/v19/contacts/mergebysecondarykeyCreates or updates contacts using a secondary key. If multiple contacts match the secondary key, the API returns an error (configurable via the secondarykeymultimatchstrategy option).
Requires the Profile Studio Advanced addon.
For the json body specification refer to Merge contact by primary key options and values.
The response is a list of results, with the same fields as _Merge contact by id_.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"iddatabase": 1,
"secondarykeymultimatchstrategy": "error"
},
"values": {
"cell": "+390000000000"
}
}Example responses
200 - No contact found, required field missing
[
{
"ok": false,
"pk": null,
"idcontact": 0,
"action": "nothing",
"errors": [
{
"type": "EMPTY_REQUIRED_FIELD",
"field": "email",
"hint": null
}
],
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}
]POST | Subscribe contact
/v19/contacts/subscribeSubscribe a contact or change the contact status to subscribed if the contact already exists.
For json body specification refer to Merge contact options and values.
The response has the same fields as _Merge contact by id_; action tells what was done, e.g. restore for a contact that was unsubscribed.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"values": {
"email": "contact@example.com",
"name": "John Doe"
},
"options": {
"iddatabase": 1
}
}Example responses
200 - Success Response
{
"ok": true,
"pk": "contact@example.com",
"idcontact": 1001,
"action": "restore",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}POST | Unsubscribe contact
/v19/contacts/unsubscribeUnsubscribe a contact.
For json body specification refer to Merge contact options and values.
The response has the same fields as _Merge contact by id_, with action set to delete.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"values": {
"email": "contact@example.com"
},
"options": {
"iddatabase": 1
}
}Example responses
200 - Success Response
{
"ok": true,
"pk": "contact@example.com",
"idcontact": 1001,
"action": "delete",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}DELETE | Delete contact
/v19/contacts/delete/:idcontact?dropformsdata=truePermanently deletes a single contact and all associated data.
Path variables
| Variable | Description |
|---|---|
idcontact |
ID of the contact |
Query parameters
| Parameter | Description |
|---|---|
dropformsdata |
(boolean, optional) If not specified, defaults to true. When true, also deletes the contact’s form submissions. |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Example responses
204 - Success response
400 - Delete contact (contact not found)
{
"error": "contact not found or missing permissions",
"debugMessage": "contact not found or missing permissions"
}POST | Batch merge contacts
/v19/contacts/batchmergeMerge multiple contacts in a batch.
For json body specification refer to Merge contact options and values.
The response is a list with one result per contact, in the same order as the request, with the same fields as _Merge contact by id_. The call returns HTTP 200 also when some contacts fail: check ok and errors of each result.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"iddatabase": 1,
"contacts": [
{
"values": [
{
"field": "email",
"value": "contact1@example.com"
},
{
"field": "name",
"value": "John Doe"
}
]
},
{
"values": [
{
"field": "email",
"value": "contact2@example.com"
},
{
"field": "name",
"value": "Jane Doe"
}
]
}
],
"options": {
"updateIfExists": true
}
}Example responses
200 - Success Response
[
{
"ok": true,
"pk": "contact@example.com",
"idcontact": 1001,
"action": "update",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
},
{
"ok": true,
"pk": "contact2@example.com",
"idcontact": 1002,
"action": "insert",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}
]200 - Add to static group
[
{
"ok": true,
"pk": "testemail482404@test.example.com",
"idcontact": 482470,
"action": "update",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
},
{
"ok": true,
"pk": "testemail482405@test.example.com",
"idcontact": 482471,
"action": "update",
"errors": null,
"sendemail": null,
"enterworkflow": null,
"idwebtracking": null
}
]POST | Batch delete contacts
/v19/contacts/batchdeleteDeletes multiple contacts in batch. A contact can be identified either by its unique ID or by the pair _primary key + database ID_. Contacts are deduplicated before processing. The optional query parameter dropFormsData (boolean, defaults to true) works as described above, also deletes the contact’s form submissions.
If allowPartialDelete is set to true, contacts that cannot be deleted are skipped, while the others are removed. The request completes with a 200 response and includes a summary report.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"contactids": [102,103],
"contactpks": [
{
"contactpk": "testemail34@test.example.com",
"iddatabase": 1
},
{
"contactpk": "testemail35@test.example.com",
"iddatabase": 2
}
]
}Example responses
200 - Batch delete contacts
{
"results": [
{
"idcontact": null,
"contactpk": "testemail35@test.example.com",
"iddatabase": 2,
"successful": false,
"error": "contact not found by primary key and database id lookup"
},
{
"idcontact": 100,
"contactpk": "testemail34@test.example.com",
"iddatabase": 1,
"successful": true,
"error": null
},
{
"idcontact": 102,
"contactpk": "testemail36@test.example.com",
"iddatabase": 1,
"successful": true,
"error": null
},
{
"idcontact": 103,
"contactpk": "testemail37@test.example.com",
"iddatabase": 1,
"successful": true,
"error": null
}
]
}Databases
GET | List databases
/v19/databases/listGet the list of databases the current user can access.
Example responses
200 - Success Response
[
{
"id": 1,
"name": "My Database",
"description": "",
"primaryKeyField": "EMAIL",
"secondaryKeys": []
}
]GET | Get database schema
/v19/databases/database/:iddatabase/schemaGet the schema (fields and constraints) of a database.
Returns the contact-field schema of the database identified by iddatabase. Use iddatabase=0 to read all the databases schema, including shared fields. When 'iddatabase' is greater than 0, the response also includes the global shared fields if the caller is authorized to read them. Use the onlyglobal query parameter to retrieve only the global fields.
Every field has distributionAvailable, which tells whether the field can be used in _Contacts distribution_ (see the _Insights_ section). For the enum fields, values lists the possible values: for the system ones, such as the source and the unsubscribe and suspension reasons, value is the internal code and label its label in the language of the user.
Path variables
| Variable | Description |
|---|---|
iddatabase |
The id of the database. Use 0 for the global database. |
Example responses
200 - Success Response
{
"iddatabase": 1,
"databaseName": "My Database",
"primaryKeyField": "EMAIL",
"primaryKeyFieldCaseSensitive": false,
"loginField": "EMAIL",
"requiredFields": [
"EMAIL",
"PROVENIENZA",
"FORMATO_SPEDIZIONE",
"RICEVE_EMAIL",
"RICEVE_SMS"
],
"fieldSets": [],
"fields": {
"EMAIL": {
"name": "EMAIL",
"label": "Email",
"fieldType": "STRING",
"fieldSubType": "EMAIL",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": false,
"category": {
"id": 1,
"label": "Profilo",
"systemCategory": true,
"order": -2147483648
},
"section": {
"id": 1,
"label": "Recapiti",
"order": 2
}
},
"NAME": {
"name": "NAME",
"label": "Nome",
"fieldType": "STRING",
"fieldSubType": "GENERAL",
"global": true,
"iddatabase": 0,
"distributionAvailable": false,
"category": {
"id": 1,
"label": "Profilo",
"systemCategory": true,
"order": -2147483648
},
"section": {
"id": 2,
"label": "Anagrafica",
"order": 5
}
},
"RICEVE_EMAIL": {
"name": "RICEVE_EMAIL",
"label": "Riceve email",
"fieldType": "BOOLEAN",
"fieldSubType": "GENERAL",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": true,
"category": {
"id": 0,
"label": "Info",
"systemCategory": true,
"order": 2147483647
},
"section": {
"id": 6,
"label": "Preferenze",
"order": 19
}
},
"DATA_ISCRIZIONE": {
"name": "DATA_ISCRIZIONE",
"label": "Data iscrizione",
"fieldType": "DATE",
"fieldSubType": "DATEANDTIME",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": false,
"category": {
"id": 0,
"label": "Info",
"systemCategory": true,
"order": 2147483647
},
"section": {
"id": 3,
"label": "Iscrizione",
"order": 10
}
},
"LINGUA": {
"name": "LINGUA",
"label": "Lingua",
"fieldType": "ENUM",
"fieldSubType": "SINGLE_VALUE",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": true,
"category": {
"id": 1,
"label": "Profilo",
"systemCategory": true,
"order": -2147483648
},
"section": {
"id": 2,
"label": "Anagrafica",
"order": 5
},
"values": [
{
"value": "ITA",
"label": "ITA"
}
]
},
"status": {
"name": "status",
"label": "Stato del contatto",
"fieldType": "ENUM",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": true,
"category": {
"id": 0,
"label": "Info",
"systemCategory": true,
"order": 2147483647
},
"values": [
{
"value": "subscribed",
"label": "Subscribed"
},
{
"value": "unconfirmed",
"label": "Unconfirmed"
},
{
"value": "suspended",
"label": "Suspended"
},
{
"value": "unsubscribed",
"label": "Unsubscribed"
}
]
},
"PROVENIENZA": {
"name": "PROVENIENZA",
"label": "Provenienza",
"fieldType": "ENUM",
"fieldSubType": "SINGLE_VALUE",
"global": true,
"system": true,
"iddatabase": 0,
"distributionAvailable": true,
"category": {
"id": 0,
"label": "Info",
"systemCategory": true,
"order": 2147483647
},
"section": {
"id": 3,
"label": "Iscrizione",
"order": 10
},
"values": [
{
"value": "4",
"label": "Sconosciuta"
},
{
"value": "3",
"label": "Importato da file"
},
{
"value": "2",
"label": "Aggiunto dall'account"
},
{
"value": "1",
"label": "Iscritto dal Web"
}
]
}
}
}Audiences
GET | Find audience by id
/v19/audiences/audience/:idaudienceFind an audience by ID
Path variables
| Variable | Description |
|---|---|
idaudience |
ID of the audience |
Example responses
200 - Success Response
{
"iddatabase": 0,
"name": "Contatti sospesi",
"idgroup": 1,
"idparent": 78,
"idlist": 0,
"idplanneddelivery": 0,
"ondemand": false,
"creationdate": 1436524697587,
"lastmodificationdate": 1599040054627,
"expiredate": null,
"creationuserid": 2,
"modificationuserid": 2,
"staticgroup": false,
"contactgroupstatus": null
}GET | Query audiences
/v19/audiences/query?query=SELECT * FROM groups WHERE idgroup=18Return a list of audiences matching the specified query.
Writing queries
See the Query documentation for more details on how to write queries.
Note: the groups table refers to audiences.
Query parameters
| Parameter | Description |
|---|---|
query |
MQL query to fetch the audiences |
Example responses
200 - Query audiences
[
{
"iddatabase": 0,
"name": "Iscritti alla newsletter - Non clienti",
"idgroup": 11,
"idparent": 9,
"idlist": 0,
"idplanneddelivery": 0,
"ondemand": false,
"creationdate": 1537856218520,
"lastmodificationdate": 1537856218507,
"expiredate": null,
"creationuserid": 2,
"modificationuserid": 2,
"staticgroup": false,
"contactgroupstatus": null
}
]POST | Create static audience
/v19/audiences/audience/createCreates a new static audience in a specific database. You can optionally set an expiration date for the audience.
Request body
{
"name": "Audience 1",
"iddatabase": 1,
"expireDate": "1769442767000"
}Example responses
200 - Create static audience
{
"idaudience": 130
}DELETE | Delete static audience
/v19/audiences/audience/:idaudienceDeletes an existing audience. Before deletion, the system checks if the audience is currently in use within the platform (e.g., in Journeys, Workflow limits, or as a target for other audiences). If it is in use, the deletion will fail with a list of references where the audience is used.
Path variables
| Variable | Description |
|---|---|
idaudience |
ID of the audience to delete. |
POST | Create dynamic audience from query
/v19/audiences/audience/createfromqueryCreates a dynamic audience defined by an MQL query.
Request body (JSON):
-
iddatabase(required): ID of the database the audience belongs to. Must reference an existing database.
-
idparent(required): ID of the parent audience group. Use0to create the audience at the root; if greater than0it must be an existing group belonging to the sameiddatabase.
-
name(required): name of the audience.
-
query(required): the MQL query that dynamically defines the audience membership.
-
createAsEditableAudience(optional): whether the audience is created as editable.
The response is a JSON object:
-
idaudience: ID of the newly created audience.
Returns HTTP 400 when the body is missing, when name or query are blank, when iddatabase or idparent are missing, when iddatabase is invalid or not found, or when the parent audience is not found or belongs to a different database.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"iddatabase": 1,
"idparent": 0,
"name": "Dynamic audience from query",
"query": "SELECT * FROM CONTACTS WHERE email IS NOT NULL",
"createAsEditableAudience": false
}Example responses
200 - Success Response
{
"idaudience": 310
}Web Tracking
GET | Get web tracking for contact
/v19/webtracking/contact/:idcontactGet the web tracking ID of a contact by ID.
Response
| Field | Type | Description |
|---|---|---|
idcontact |
Integer | ID of the contact. |
idwebtracking |
String | Web tracking ID of the contact, the one used by the web tracking script to recognise the visitor. |
idaddressbook |
Integer | ID of the database of the contact. |
primaryKey |
String | Primary key of the contact. |
Path variables
| Variable | Description |
|---|---|
idcontact |
ID of the contact |
Example responses
200 - Success Response
{
"idcontact": 1001,
"idwebtracking": "543g2120bg38ba953ac5e6ccabd216a485a021bca4a07ab422",
"idaddressbook": 1,
"primaryKey": "contact@example.com"
}GET | Query web tracking contacts
/v19/webtracking/contacts?query=select * from contacts where iddatabase=7Get the web tracking ID of the contacts selected by an MQL query on the CONTACTS table.
Response
A list with one object per contact:
| Field | Type | Description |
|---|---|---|
idcontact |
Integer | ID of the contact. |
idwebtracking |
String | Web tracking ID of the contact, the one used by the web tracking script to recognise the visitor. |
idaddressbook |
Integer | ID of the database of the contact. |
primaryKey |
String | Primary key of the contact. |
Writing queries
See the Query documentation for more details.
Query parameters
| Parameter | Description |
|---|---|
query |
MQL query to fetch the contacts |
Example responses
200 - Success Response
[
{
"idcontact": 1001,
"idwebtracking": "543g2120bg38ba953ac5e6ccabd216a485a021bca4a07ab422",
"idaddressbook": 1,
"primaryKey": "contact@example.com"
},
{
"idcontact": 1002,
"idwebtracking": "224ba70a4acb120a584a612dbacc6e5ca359ab83gb0212g345",
"idaddressbook": 1,
"primaryKey": "contact2@example.com"
}
]Insights
GET | Communication summary
/v19/insights/newsletter/:idnewsletter?channel=whatsappbusinessGet a summary of communication statistics with optional parameters. If the communication is archived, requests for a detailed contacts report (i.e., including \query\ or \idaudience\ parameters) will return a 400 Bad Request error.
The NaN value in rates, indicates that the rate cannot be computed because the denominator is zero.
Path variables
| Variable | Description |
|---|---|
idnewsletter |
ID of the communication |
Query parameters
| Parameter | Description |
|---|---|
channel |
Channel to filter by: email, sms, fax, or a custom channel name (default: first available channel for the newsletter) |
Example responses
200 - Communication summary
{
"idnewsletter": 762,
"channel": "email",
"firstSentAt": 1709274646985,
"lastSentAt": 1709275053263,
"deliveryRate": 98.16,
"bounceRate": 1.84,
"openRate": 9.79,
"clickToOpenRate": 13.04,
"clickRate": 1.28,
"conversionRate": 0,
"clickPerClicked": 152.33,
"conversionToClickRate": 0.36,
"reachedRate": 98.16,
"openersRate": 9.79,
"clickersToOpenersRate": 13.04,
"clickersRate": 1.28,
"convertersRate": 0,
"messagesSent": 22262,
"messagesReceived": 21852,
"messagesOpened": 2140,
"messagesUnreliableOpened": 3418,
"messagesClicked": 279,
"messagesConverted": 1,
"messagesWithUnsubscribeClicks": 24,
"messagesWithSpamReports": 0,
"messagesForwarded": 0,
"messagesHardBounced": 14,
"messagesSoftBounced": 396,
"recipients": 22262,
"reached": 21852,
"openers": 2140,
"unreliableOpeners": 3418,
"clickers": 279,
"converters": 1,
"unsubscribers": 24,
"spamReporters": 0,
"forwarders": 0,
"totalOpens": 3368,
"totalUnreliableOpens": 10290,
"totalClicks": 425,
"totalConversions": 1,
"totalUnsubscribes": 24,
"totalSpamReports": 0,
"totalForwards": 0,
"contents": [
{
"idcontent": 7001,
"name": "Product 2",
"clickers": 50,
"totalClicks": 64,
"messagesClicked": 50,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/ae1020_c-2218.html"
},
{
"idcontent": 6995,
"name": "Product 1",
"clickers": 103,
"totalClicks": 132,
"messagesClicked": 103,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/sr1001_c-2214.html"
},
{
"idcontent": 7000,
"name": "Pinterest",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.pinterest.com/example"
},
{
"idcontent": 6999,
"name": "Instagram",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.instagram.com/example"
},
{
"idcontent": 7002,
"name": "Product 2",
"clickers": 18,
"totalClicks": 23,
"messagesClicked": 18,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/sr1001_c-2117.html"
},
{
"idcontent": 6997,
"name": "https://www.example.com/nuova-collezione/",
"clickers": 105,
"totalClicks": 119,
"messagesClicked": 105,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/nuova-collezione/"
},
{
"idcontent": 6996,
"name": "Product 3",
"clickers": 73,
"totalClicks": 83,
"messagesClicked": 73,
"converters": 1,
"totalConversions": 1,
"messagesConverted": 1,
"url": "https://www.example.com/ae1020_c-2215.html"
}
],
"conversionGoalStats": []
}200 - Filtered by contacts's query
{
"idnewsletter": 53,
"channel": "email",
"firstSentAt": 1606217684913,
"lastSentAt": 1606234943583,
"deliveryRate": 100,
"bounceRate": 0,
"openRate": 0,
"clickToOpenRate": "NaN",
"clickRate": 0,
"conversionRate": 0,
"clickPerClicked": "NaN",
"conversionToClickRate": "NaN",
"reachedRate": 100,
"openersRate": 0,
"clickersToOpenersRate": "NaN",
"clickersRate": 0,
"convertersRate": 0,
"messagesSent": 3,
"messagesReceived": 3,
"messagesOpened": 0,
"messagesUnreliableOpened": 0,
"messagesClicked": 0,
"messagesConverted": 0,
"messagesWithUnsubscribeClicks": 0,
"messagesWithSpamReports": 0,
"messagesForwarded": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 0,
"recipients": 1,
"reached": 1,
"openers": 0,
"unreliableOpeners": 0,
"clickers": 0,
"converters": 0,
"unsubscribers": 0,
"spamReporters": 0,
"forwarders": 0,
"totalOpens": 0,
"totalUnreliableOpens": 0,
"totalClicks": 0,
"totalConversions": 0,
"totalUnsubscribes": 0,
"totalSpamReports": 0,
"totalForwards": 0,
"contents": [],
"conversionGoalStats": []
}200 - With conversion goals
{
"idnewsletter": 511,
"channel": "email",
"firstSentAt": 1725875118426,
"lastSentAt": 1725875118891,
"deliveryRate": 100,
"bounceRate": 0,
"openRate": 100,
"clickToOpenRate": 100,
"clickRate": 100,
"conversionRate": 100,
"clickPerClicked": 250,
"conversionToClickRate": 100,
"reachedRate": 100,
"openersRate": 100,
"clickersToOpenersRate": 100,
"clickersRate": 100,
"convertersRate": 100,
"messagesSent": 4,
"messagesReceived": 4,
"messagesOpened": 4,
"messagesUnreliableOpened": 0,
"messagesClicked": 4,
"messagesConverted": 4,
"messagesWithUnsubscribeClicks": 0,
"messagesWithSpamReports": 0,
"messagesForwarded": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 0,
"recipients": 4,
"reached": 4,
"openers": 4,
"unreliableOpeners": 0,
"clickers": 4,
"converters": 4,
"unsubscribers": 0,
"spamReporters": 0,
"forwarders": 0,
"totalOpens": 18,
"totalUnreliableOpens": 0,
"totalClicks": 10,
"totalConversions": 4,
"totalUnsubscribes": 0,
"totalSpamReports": 0,
"totalForwards": 0,
"contents": [
{
"idcontent": 1305,
"name": "Example.com",
"clickers": 1,
"totalClicks": 1,
"messagesClicked": 1,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com"
},
{
"idcontent": 1306,
"name": "Contact:CAMPO",
"clickers": 1,
"totalClicks": 2,
"messagesClicked": 1,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://[contact:CAMPO]"
}
],
"conversionGoalStats": [
{
"idgoal": 4,
"conversions": 4,
"conversionRate": 100,
"lastConversion": 1725877397000,
"totalValue": 468.99,
"averageValue": 117.2475,
"goalName": "Magento",
"currency": "€"
}
]
}GET | Communication summaries
/v19/insights/newsletters?queryNewsletter=SELECT * from NEWSLETTERS where template=0 AND sentdate > '{d 2025-07-01}'&channel=emailGet a list of communication summaries with optional parameters. If a communication is archived and contact-level details are requested (i.e., including query or idaudience parameters), that communication is automatically excluded from the result. If those parameters are not specified, aggregated statistics remain available even for archived communications.
Query parameters
| Parameter | Description |
|---|---|
queryNewsletter |
SQL-like query to filter newsletters (e.g. "SELECT * FROM NEWSLETTERS WHERE sent=true and sentDate >= today(-7)") |
channel |
Channel to filter by (email, sms, fax, or a custom channel name) |
Example responses
200 - Get Newsletter summary
[
{
"idnewsletter": 370,
"channel": "email",
"firstSentAt": 1752763608300,
"lastSentAt": 1752763608300,
"deliveryRate": 100.0,
"bounceRate": 0.0,
"openRate": 100.0,
"clickToOpenRate": 100.0,
"clickRate": 100.0,
"conversionRate": 0.0,
"clickPerClicked": 300.0,
"conversionToClickRate": 0.0,
"reachedRate": 100.0,
"openersRate": 100.0,
"clickersToOpenersRate": 100.0,
"clickersRate": 100.0,
"convertersRate": 0.0,
"messagesSent": 1,
"messagesReceived": 1,
"messagesOpened": 1,
"messagesUnreliableOpened": 0,
"messagesClicked": 1,
"messagesConverted": 0,
"messagesWithUnsubscribeClicks": 0,
"messagesWithSpamReports": 0,
"messagesForwarded": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 0,
"recipients": 1,
"reached": 1,
"openers": 1,
"unreliableOpeners": 0,
"clickers": 1,
"converters": 0,
"unsubscribers": 0,
"spamReporters": 0,
"forwarders": 0,
"totalOpens": 3,
"totalUnreliableOpens": 0,
"totalClicks": 3,
"totalConversions": 0,
"totalUnsubscribes": 0,
"totalSpamReports": 0,
"totalForwards": 0,
"contents": [
{
"idcontent": 1305,
"name": "Example.com",
"clickers": 1,
"totalClicks": 1,
"messagesClicked": 1,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0
},
{
"idcontent": 1306,
"name": "Contact:CAMPO",
"clickers": 1,
"totalClicks": 2,
"messagesClicked": 1,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0
}
],
"conversionGoalStats": []
}
]GET | Transactional summary
/v19/insights/transactional/:idnewsletter?conversiongoals=true&channels=emailRetrieves detailed insights and performance statistics for a specific transactional message. This endpoint provides delivery rates, engagement metrics (opens, clicks), and conversion data. It supports filtering by date range, specific contact criteria using a query, and specific communication channels.
The NaN value in rates, indicates that the rate cannot be computed because the denominator is zero.
The response is a JSON object containing:
-
idnewsletter: The unique identifier of the transactional message (template).
-
channels: A set of active communication channels for this transactional message (e.g., email, sms).
-
deliveryRate: The percentage of messages successfully delivered compared to the total sent.
-
bounceRate: The percentage of messages that bounced (hard or soft).
-
openRate: The percentage of delivered messages that were opened.
-
clickToOpenRate: The percentage of unique openers who also clicked at least one link.
-
clickRate: The percentage of delivered messages that resulted in at least one click.
-
conversionRate: The percentage of delivered messages that resulted in a conversion.
-
clickPerClicked: The average number of clicks per unique clicker.
-
conversionToClickRate: The percentage of unique clickers who also converted.
-
messagesSent: Total number of messages sent.
-
messagesReceived: Total number of messages successfully delivered.
-
messagesOpened: Number of unique messages opened.
-
messagesUnreliableOpened: Number of messages with "unreliable" opens (e.g., detected via machine opens).
-
messagesClicked: Number of unique messages that had at least one click.
-
messagesConverted: Number of unique messages that resulted in a conversion.
-
messagesWithUnsubscribeClicks: Number of unique messages that led to an unsubscribe click.
-
messagesWithSpamReports: Number of unique messages that were reported as spam.
-
messagesHardBounced: Total number of hard bounces.
-
messagesSoftBounced: Total number of soft bounces.
-
totalOpens: Total number of open events recorded.
-
totalUnreliableOpens: Total number of unreliable open events recorded.
-
totalClicks: Total number of click events recorded across all links.
-
totalConversions: Total number of conversion events recorded.
-
totalUnsubscribes: Total number of unsubscriptions.
-
totalSpamReports: Total number of spam complaints.
-
contents: A list of objects representing performance for each individual link in the message, each containing:
- idcontent: Unique identifier of the content/link.
- name: Name or label of the link.
- url: The actual URL of the link.
- clickers: Number of unique contacts who clicked this link.
- totalClicks: Total number of clicks for this link.
- messagesClicked: Number of unique message instances where this link was clicked.
- converters: Number of unique contacts who converted after clicking this link.
- totalConversions: Total number of conversions attributed to this link.
- messagesConverted: Number of unique message instances where a conversion was attributed to this link.
-
conversionGoalStats: A list of objects representing statistics for each conversion goal (included only if conversiongoals=true), each containing:
- idgoal: Unique identifier of the conversion goal.
- goalName: The name of the goal.
- conversions: Number of conversions for this goal.
- conversionRate: The conversion rate for this specific goal.
- lastConversion: The timestamp of the last recorded conversion for this goal.
- totalValue: The total monetary or numerical value of all conversions for this goal.
- averageValue: The average value per conversion.
- currency: The currency associated with the goal values.
Path variables
| Variable | Description |
|---|---|
idnewsletter |
ID of the transactional message for which insights are requested. |
Query parameters
| Parameter | Description |
|---|---|
conversiongoals |
Optional. If set to true, the response will include detailed statistics for conversion goals associated with the transactional message. |
channels |
Optional. A comma-separated list of channels to filter the statistics (e.g., email,sms). |
Example responses
200 - Transactional summary
{
"idnewsletter": 512,
"channels": [
"email"
],
"deliveryRate": 99.82,
"bounceRate": 0.18,
"openRate": 21.45,
"clickToOpenRate": 18.52,
"clickRate": 3.97,
"conversionRate": 1.22,
"clickPerClicked": 138.4,
"conversionToClickRate": 30.73,
"messagesSent": 6250,
"messagesReceived": 6239,
"messagesOpened": 1338,
"messagesUnreliableOpened": 1520,
"messagesClicked": 248,
"messagesConverted": 76,
"messagesWithUnsubscribeClicks": 2,
"messagesWithSpamReports": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 11,
"totalOpens": 2345,
"totalUnreliableOpens": 4810,
"totalClicks": 343,
"totalConversions": 94,
"totalUnsubscribes": 2,
"totalSpamReports": 0,
"contents": [
{
"idcontent": 2101,
"name": "https://www.example.com/",
"clickers": 22,
"totalClicks": 30,
"messagesClicked": 22,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
},
{
"idcontent": 2102,
"name": "tiktok",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.tiktok.com/@example"
},
{
"idcontent": 2103,
"name": "https://shop.example.com/",
"clickers": 5,
"totalClicks": 5,
"messagesClicked": 5,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://shop.example.com/"
},
{
"idcontent": 3604,
"name": "Example Brand Made in Italy",
"clickers": 158,
"totalClicks": 235,
"messagesClicked": 164,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 3605,
"name": "Product Item Fashion Black",
"clickers": 61,
"totalClicks": 71,
"messagesClicked": 61,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
}
],
"conversionGoalStats": [
{
"idgoal": 7,
"conversions": 88,
"conversionRate": 1.408,
"lastConversion": 1769105250000,
"totalValue": 9240.5,
"averageValue": 105,
"goalName": "Purchase (S)",
"currency": "€"
}
]
}GET | Transactional summaries
/v19/insights/transactionals?queryTransactional=SELECT * from NEWSLETTERS where idworkflow = 3&channel=emailRetrieves a list of performance summaries for a batch of transactional messages (or workflow messages or message on site messages). This endpoint allows for bulk retrieval of transactional statistics, enabling performance comparison across multiple templates. It requires a query to select which transactional messages to include and supports filtering the statistics themselves by date range, specific contact criteria, and communication channels.
The response is a JSON array of transactional summary objects. (see /insight/transactional/:idnewsletter endpoint for details)
Query parameters
| Parameter | Description |
|---|---|
queryTransactional |
SQL-like query to filter transactionals |
channel |
Channel to filter by (email, sms, fax, or a custom channel name) |
Example responses
200 - Transactional summaries
[
{
"idnewsletter": 412,
"channels": [
"email"
],
"deliveryRate": 99.72,
"bounceRate": 0.28,
"openRate": 25.10,
"clickToOpenRate": 30.85,
"clickRate": 7.74,
"conversionRate": 7.22,
"clickPerClicked": 142.15,
"conversionToClickRate": 93.30,
"messagesSent": 17200,
"messagesReceived": 17152,
"messagesOpened": 4305,
"messagesUnreliableOpened": 3820,
"messagesClicked": 1332,
"messagesConverted": 1243,
"messagesWithUnsubscribeClicks": 21,
"messagesWithSpamReports": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 48,
"totalOpens": 8950,
"totalUnreliableOpens": 14100,
"totalClicks": 1894,
"totalConversions": 2380,
"totalUnsubscribes": 21,
"totalSpamReports": 0,
"contents": [
{
"idcontent": 3101,
"name": "Pantaloni Sport Fashion Pro Gray",
"clickers": 220,
"totalClicks": 355,
"messagesClicked": 225,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
},
{
"idcontent": 3102,
"name": "https://www.example.com/",
"clickers": 30,
"totalClicks": 45,
"messagesClicked": 32,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
},
{
"idcontent": 3103,
"name": "Proceed to checkout",
"clickers": 915,
"totalClicks": 1510,
"messagesClicked": 965,
"converters": 915,
"totalConversions": 1510,
"messagesConverted": 965,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 3104,
"name": "https://shop.example.com/",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://shop.example.com/"
},
{
"idcontent": 3105,
"name": "Privacy Policy",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/privacy-policy"
}
],
"conversionGoalStats": []
},
{
"idnewsletter": 528,
"channels": [
"email"
],
"deliveryRate": 99.48,
"bounceRate": 0.52,
"openRate": 18.25,
"clickToOpenRate": 15.40,
"clickRate": 2.81,
"conversionRate": 2.15,
"clickPerClicked": 158.20,
"conversionToClickRate": 76.50,
"messagesSent": 5100,
"messagesReceived": 5073,
"messagesOpened": 926,
"messagesUnreliableOpened": 1180,
"messagesClicked": 143,
"messagesConverted": 109,
"messagesWithUnsubscribeClicks": 5,
"messagesWithSpamReports": 1,
"messagesHardBounced": 0,
"messagesSoftBounced": 27,
"totalOpens": 1580,
"totalUnreliableOpens": 3650,
"totalClicks": 226,
"totalConversions": 182,
"totalUnsubscribes": 5,
"totalSpamReports": 1,
"contents": [
{
"idcontent": 4125,
"name": "https://www.example.com/",
"clickers": 5,
"totalClicks": 6,
"messagesClicked": 5,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
},
{
"idcontent": 4504,
"name": "Example Brand Made in Italy",
"clickers": 92,
"totalClicks": 145,
"messagesClicked": 95,
"converters": 92,
"totalConversions": 145,
"messagesConverted": 95,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 4505,
"name": "Abbigliamento Fitness Green",
"clickers": 53,
"totalClicks": 82,
"messagesClicked": 53,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
}
],
"conversionGoalStats": []
},
{
"idnewsletter": 464,
"channels": [
"email"
],
"deliveryRate": 99.58,
"bounceRate": 0.42,
"openRate": 22.85,
"clickToOpenRate": 21.90,
"clickRate": 5.01,
"conversionRate": 4.52,
"clickPerClicked": 148.10,
"conversionToClickRate": 90.20,
"messagesSent": 6300,
"messagesReceived": 6274,
"messagesOpened": 1434,
"messagesUnreliableOpened": 1350,
"messagesClicked": 314,
"messagesConverted": 285,
"messagesWithUnsubscribeClicks": 15,
"messagesWithSpamReports": 1,
"messagesHardBounced": 2,
"messagesSoftBounced": 24,
"totalOpens": 2780,
"totalUnreliableOpens": 4650,
"totalClicks": 465,
"totalConversions": 510,
"totalUnsubscribes": 15,
"totalSpamReports": 1,
"contents": [
{
"idcontent": 5449,
"name": "Special Offer Example",
"clickers": 225,
"totalClicks": 340,
"messagesClicked": 230,
"converters": 225,
"totalConversions": 340,
"messagesConverted": 230,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 5787,
"name": "https://www.example.com/",
"clickers": 12,
"totalClicks": 16,
"messagesClicked": 12,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
},
{
"idcontent": 5769,
"name": "Fashion Top Black Edition",
"clickers": 68,
"totalClicks": 109,
"messagesClicked": 68,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
}
],
"conversionGoalStats": []
},
{
"idnewsletter": 531,
"channels": [
"email"
],
"deliveryRate": 99.81,
"bounceRate": 0.19,
"openRate": 20.15,
"clickToOpenRate": 19.50,
"clickRate": 3.93,
"conversionRate": 1.18,
"clickPerClicked": 140.80,
"conversionToClickRate": 30.25,
"messagesSent": 6100,
"messagesReceived": 6088,
"messagesOpened": 1227,
"messagesUnreliableOpened": 1450,
"messagesClicked": 239,
"messagesConverted": 72,
"messagesWithUnsubscribeClicks": 2,
"messagesWithSpamReports": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 12,
"totalOpens": 2150,
"totalUnreliableOpens": 4780,
"totalClicks": 336,
"totalConversions": 88,
"totalUnsubscribes": 2,
"totalSpamReports": 0,
"contents": [
{
"idcontent": 6137,
"name": "https://www.example.com/",
"clickers": 20,
"totalClicks": 28,
"messagesClicked": 20,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
},
{
"idcontent": 6140,
"name": "tiktok",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.tiktok.com/@example"
},
{
"idcontent": 6141,
"name": "https://shop.example.com/",
"clickers": 4,
"totalClicks": 4,
"messagesClicked": 4,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://shop.example.com/"
},
{
"idcontent": 6506,
"name": "Example Style Italy",
"clickers": 145,
"totalClicks": 225,
"messagesClicked": 150,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 6507,
"name": "Bolero Top Jacket Black",
"clickers": 55,
"totalClicks": 82,
"messagesClicked": 55,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
}
],
"conversionGoalStats": []
},
{
"idnewsletter": 347,
"channels": [
"email"
],
"deliveryRate": 99.30,
"bounceRate": 0.70,
"openRate": 27.10,
"clickToOpenRate": 31.50,
"clickRate": 8.54,
"conversionRate": 7.85,
"clickPerClicked": 130.50,
"conversionToClickRate": 92.10,
"messagesSent": 19500,
"messagesReceived": 19363,
"messagesOpened": 5247,
"messagesUnreliableOpened": 4350,
"messagesClicked": 1654,
"messagesConverted": 1523,
"messagesWithUnsubscribeClicks": 38,
"messagesWithSpamReports": 0,
"messagesHardBounced": 65,
"messagesSoftBounced": 72,
"totalOpens": 10850,
"totalUnreliableOpens": 16200,
"totalClicks": 2158,
"totalConversions": 2850,
"totalUnsubscribes": 39,
"totalSpamReports": 0,
"contents": [
{
"idcontent": 7689,
"name": "instagram",
"clickers": 3,
"totalClicks": 4,
"messagesClicked": 3,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.instagram.com/examplecosmetics/"
},
{
"idcontent": 7690,
"name": "tiktok",
"clickers": 2,
"totalClicks": 3,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.tiktok.com/@example"
},
{
"idcontent": 7691,
"name": "https://shop.example.com/",
"clickers": 8,
"totalClicks": 10,
"messagesClicked": 8,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://shop.example.com/"
},
{
"idcontent": 7764,
"name": "Tuta Sportiva Pro Merlin",
"clickers": 225,
"totalClicks": 390,
"messagesClicked": 230,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
},
{
"idcontent": 7692,
"name": "Privacy Policy",
"clickers": 4,
"totalClicks": 5,
"messagesClicked": 4,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/privacy"
},
{
"idcontent": 7765,
"name": "Buy Now",
"clickers": 1012,
"totalClicks": 1650,
"messagesClicked": 1045,
"converters": 1012,
"totalConversions": 1650,
"messagesConverted": 1045,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 7687,
"name": "https://www.example.com/",
"clickers": 62,
"totalClicks": 78,
"messagesClicked": 62,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
}
],
"conversionGoalStats": []
},
{
"idnewsletter": 366,
"channels": [
"email"
],
"deliveryRate": 99.88,
"bounceRate": 0.12,
"openRate": 23.10,
"clickToOpenRate": 23.85,
"clickRate": 5.51,
"conversionRate": 4.90,
"clickPerClicked": 138.50,
"conversionToClickRate": 88.50,
"messagesSent": 7800,
"messagesReceived": 7791,
"messagesOpened": 1800,
"messagesUnreliableOpened": 1850,
"messagesClicked": 430,
"messagesConverted": 382,
"messagesWithUnsubscribeClicks": 4,
"messagesWithSpamReports": 0,
"messagesHardBounced": 0,
"messagesSoftBounced": 9,
"totalOpens": 3250,
"totalUnreliableOpens": 6400,
"totalClicks": 595,
"totalConversions": 680,
"totalUnsubscribes": 4,
"totalSpamReports": 0,
"contents": [
{
"idcontent": 8804,
"name": "Privacy Policy",
"clickers": 2,
"totalClicks": 2,
"messagesClicked": 2,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/legal/privacy"
},
{
"idcontent": 8770,
"name": "Pantaloni Sport Magenta",
"clickers": 82,
"totalClicks": 145,
"messagesClicked": 82,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "[temp:item.link]"
},
{
"idcontent": 8771,
"name": "Buy Now",
"clickers": 275,
"totalClicks": 420,
"messagesClicked": 288,
"converters": 275,
"totalConversions": 420,
"messagesConverted": 288,
"url": "[temp:checkout.checkouturl]"
},
{
"idcontent": 8799,
"name": "https://www.example.com/",
"clickers": 15,
"totalClicks": 22,
"messagesClicked": 15,
"converters": 0,
"totalConversions": 0,
"messagesConverted": 0,
"url": "https://www.example.com/"
}
],
"conversionGoalStats": []
}
]GET | Workflow summary
/v19/insights/workflow/:idworkflowRetrieves detailed insights and statistics for a specific workflow. This endpoint provides information such as total, active, and failed sessions, along with a breakdown of session exits by type and label. It supports filtering results by date range and by specific contact criteria using a query.
The response is a JSON array of WorkflowInsight objects. Each object contains:
-
idworkflow: The unique identifier of the workflow.
-
idjourney: The ID of the journey (campaign) associated with the workflow.
-
name: The name of the workflow.
-
status: The current status of the workflow (e.g., "active", "draft", "paused").
-
totalSessions: Total number of sessions started within the specified period and filters.
-
activeSessions: Number of sessions currently in progress.
-
errorSessions: Number of sessions that ended with an error status.
-
firstSessionDate: Timestamp of the first session found in the results. Test sessions are not considered.
-
lastSessionDate: Timestamp of the last session found in the results, including the sessions still in progress. Test sessions are not considered.
-
sessionExits: A list of objects representing how sessions ended, each containing:
- label: The label of the exit node in the workflow.
- exitType: The type of exit (positive, neutral, negative).
- count: The number of sessions that exited through this specific node.
Path variables
| Variable | Description |
|---|---|
idworkflow |
ID of the workflow for which insights are requested. |
Example responses
200 - Workflow summary
{
"idworkflow": 7,
"idjourney": 5,
"name": "Recover Missing Orders",
"status": "stopped",
"totalSessions": 10163,
"activeSessions": 0,
"errorSessions": 0,
"firstSessionDate": 1732921200000,
"lastSessionDate": 1734562800000,
"sessionExits": [
{
"label": "Recovered",
"exitType": "positive",
"count": 10002
},
{
"label": "Clicked to recover",
"exitType": "positive",
"count": 6
},
{
"label": "Exit without recovering",
"exitType": "negative",
"count": 155
}
]
}GET | Workflow summaries
/v19/insights/workflows?queryWorkflow=SELECT * FROM WORKFLOWS WHERE idcampaign = 123Retrieves detailed insights and statistics for a batch of workflows. This endpoint allows for bulk retrieval of workflow performance data, including session counts (total, active, error) and session exit breakdowns. It supports filtering both the set of workflows to analyze and the specific contact sessions to include in the statistics, within a defined date range.
The response is a JSON array of workflow insigiths objects. (see /insight/workflow/:idworkflow endpoint for details)
Query parameters
| Parameter | Description |
|---|---|
queryWorkflow |
An optional SQL-like query string to filter the list of workflows for which insights are requested. If omitted, it defaults to `SELECT * FROM WORKFLOWS`. The results are limited to a maximum of 100 workflows per request. |
Example responses
200 - Workflow summaries
[
{
"idworkflow": 11,
"idjourney": 7,
"name": "shopify",
"status": "active",
"totalSessions": 0,
"activeSessions": 0,
"errorSessions": 0,
"firstSessionDate": null,
"lastSessionDate": null,
"sessionExits": [
{
"label": "Default Exit",
"exitType": "neutral",
"count": 0
}
]
},
{
"idworkflow": 16,
"idjourney": 1,
"name": "dynamics",
"status": "active",
"totalSessions": 76,
"activeSessions": 2,
"errorSessions": 0,
"firstSessionDate": 1665439200000,
"lastSessionDate": 1689026400000,
"sessionExits": [
{
"label": "Success",
"exitType": "positive",
"count": 74
}
]
},
{
"idworkflow": 33,
"idjourney": 10,
"name": "Recover abandoned carts",
"status": "draft",
"totalSessions": 0,
"activeSessions": 0,
"errorSessions": 0,
"firstSessionDate": null,
"lastSessionDate": null,
"sessionExits": [
{
"label": "Purchase",
"exitType": "positive",
"count": 0
},
{
"label": "No purchase",
"exitType": "negative",
"count": 0
}
]
}
]GET | Audience insights
/v19/insights/audiences?queryAudience=SELECT * FROM GROUPS where idgroup=310Returns insights for a set of audiences.
Query parameters (all optional):
-
queryAudience: MQL query selecting which audiences to compute insights for. Defaults toSELECT \* FROM GROUPS.
-
queryContacts: MQL query filtering the contacts the insights are computed on. Defaults toSELECT \* FROM CONTACTS.
-
from: lower bound of the time window, as a unix timestamp in milliseconds.
-
to: upper bound of the time window, as a unix timestamp in milliseconds. If bothfromandtoare provided andtois beforefrom, HTTP 400 is returned.
The response is a JSON array, one object per audience, containing the audience business field summary (per-field value distribution), engagement and conversion metrics.
The engagement object counts the contacts of the audience per engagement level: neverOpeners, exOpeners, newContacts, openers, clickers and converters (contacts who reached a conversion goal). In the value distribution of the system fields (e.g. unsubscribe reason or source) the labels are translated in the language of the user.
Query parameters
| Parameter | Description |
|---|---|
queryAudience |
Optional MQL query selecting which audiences (groups) to compute insights for. Defaults to 'SELECT * FROM GROUPS' when omitted. |
Example responses
200 - Audience insights
[
{
"idaudience": 310,
"iddatabase": 1,
"name": "Dynamic audience from query",
"type": "dynamic",
"system": false,
"systemLabel": null,
"totalContacts": 131,
"businessFields": [
{
"name": "SPESAMENSILE",
"label": "spesa mensile",
"type": "float",
"symbol": "€",
"sum": 1000,
"average": 1000,
"distribution": null
},
{
"name": "MULTIVALORI",
"label": "Multivalori",
"type": "enum",
"symbol": null,
"sum": null,
"average": null,
"distribution": [
{
"label": "dolce",
"contacts": 23,
"percentage": 17.557251908396946,
"noValue": false
},
{
"label": "salato",
"contacts": 1,
"percentage": 0.7633587786259542,
"noValue": false
},
{
"label": null,
"contacts": 107,
"percentage": 81.6793893129771,
"noValue": true
}
]
},
{
"name": "MULTIVALORI2",
"label": "multivalori2",
"type": "enum",
"symbol": null,
"sum": null,
"average": null,
"distribution": [
{
"label": "v1",
"contacts": 23,
"percentage": 17.557251908396946,
"noValue": false
},
{
"label": null,
"contacts": 108,
"percentage": 82.44274809160305,
"noValue": true
}
]
},
{
"name": "SINOBUSINESS",
"label": "sinobusiness",
"type": "boolean",
"symbol": null,
"sum": null,
"average": null,
"distribution": [
{
"label": "true",
"contacts": 0,
"percentage": 0,
"noValue": false
}
]
},
{
"name": "RFM_CLUSTER",
"label": "RFM Cluster",
"type": "enum",
"symbol": null,
"sum": null,
"average": null,
"distribution": [
{
"label": "4",
"contacts": 1,
"percentage": 0.7633587786259542,
"noValue": false
},
{
"label": null,
"contacts": 130,
"percentage": 99.23664122137404,
"noValue": true
}
]
}
],
"engagement": {
"neverOpeners": 0,
"exOpeners": 0,
"newContacts": 0,
"openers": 0,
"clickers": 0,
"converters": 0
},
"conversions": [
{
"idgoal": 5,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "Acquisti Server Side",
"currency": "€"
},
{
"idgoal": 2,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "nuovo obbiettivo",
"currency": "$"
},
{
"idgoal": 1,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "conv1",
"currency": ""
},
{
"idgoal": 9,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "eshopdicucinelli",
"currency": "€"
},
{
"idgoal": 3,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "nuovo euro",
"currency": "€"
},
{
"idgoal": 4,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "acquisti",
"currency": "€"
},
{
"idgoal": 8,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "downloadpage",
"currency": ""
},
{
"idgoal": 6,
"conversions": 0,
"conversionRate": 0,
"lastConversion": null,
"totalValue": 0,
"averageValue": 0,
"goalName": "check eventi pk int",
"currency": "€"
},
{
"idgoal": 7,
"conversions": 1,
"conversionRate": 0.7633587786259542,
"lastConversion": 1724191200000,
"totalValue": 10.5,
"averageValue": 10.5,
"goalName": "check eventi pk string",
"currency": "€"
}
]
}
]POST | Contacts distribution
/v19/insights/contacts/distributionReturns how many contacts have each value of one or more fields, the same aggregation behind the multidimensional analysis report. Use it to see how the contacts of a database or of an audience are split, for example by status, source or language, without exporting them.
By default each field gets its own distribution. With crossDistribution set to true the fields are combined instead, and every cell counts the contacts having that combination of values. In both cases only the most populated values are returned, sorted by number of contacts, and truncated tells when some were left out.
The scope is never taken from the query: it is resolved from the permissions of the calling user. Unknown properties in the body are refused rather than ignored, so a misspelled iddatabase cannot silently widen the distribution to the whole account.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
fields |
Array of String |
Required. From 1 to 5 field names, as returned by _Get database schema_ (see the _Databases_ section). Only the fields with distributionAvailable set to true can be used: text and date fields cannot. The contact status is status. |
|
iddatabase |
Integer | null |
ID of the database whose contacts must be counted. Requires the view contacts permission on that database. When omitted, the contacts of every database the user can view are counted. |
idaudience |
Integer | null |
ID of the audience whose contacts must be counted. If iddatabase is given too, it must be the database of the audience. |
query |
String | SELECT * FROM CONTACTS |
MQL query on the CONTACTS table restricting the contacts to count, e.g. SELECT * FROM CONTACTS WHERE sex = 'F'. |
crossDistribution |
Boolean | false |
When true, returns a single distribution of the combinations of values of all the fields instead of one distribution per field. |
maxValues |
Integer | 100 |
Maximum number of values returned for each field, or of cells for the cross distribution. Values above 1000 are reduced to 1000. |
Response
Both responses have totalContacts, the number of contacts in scope, on which the percentages are computed.
With crossDistribution set to false, distributions has one object per requested field, in the same order:
| Field | Type | Description |
|---|---|---|
field |
String | Name of the field, as requested. |
label |
String | Label of the field, in the language of the user. |
fieldType |
String | Type of the field, e.g. enum, boolean, number. |
values |
Array | One object per value, the most populated first: value, contacts, percentage (rounded to two decimals) and noValue, which is true for the contacts with no value in the field (value is then null). |
truncated |
Boolean |
true when the field has more values than maxValues and the least populated ones were left out. |
With crossDistribution set to true:
| Field | Type | Description |
|---|---|---|
fields |
Array of String | Names of the fields, as requested. |
cells |
Array | One object per combination of values, the most populated first: values (one value per field, in the order of fields, null when the contact has no value), contacts and percentage. |
truncated |
Boolean |
true when there are more combinations than maxValues and the least populated ones were left out. |
The values are readable as they are: the contact status by its name (subscribed, unconfirmed, suspended, unsubscribed), the source and the unsubscribe and suspension reasons by their label in the language of the user, booleans as true or false.
Errors
| Status | When |
|---|---|
| 400 | Missing body, fields empty or with more than 5 fields, field that does not exist or cannot be used for the distribution, iddatabase, idaudience or maxValues not positive, database or audience that does not exist or cannot be viewed, iddatabase that is not the database of the audience, invalid query, unknown property in the body. |
| 403 | The user cannot view the contacts of the requested database, or the query uses a table the user is not allowed to query. |
Writing queries
See the Query documentation for more details on how to write queries on contacts.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"fields": [
"status",
"PROVENIENZA",
"RICEVE_EMAIL"
],
"iddatabase": 1,
"maxValues": 3
}Example responses
200 - Distribution per field
{
"totalContacts": 1131,
"distributions": [
{
"field": "status",
"label": "Stato del contatto",
"fieldType": "enum",
"values": [
{
"value": "unsubscribed",
"contacts": 1052,
"percentage": 93.02,
"noValue": false
},
{
"value": "subscribed",
"contacts": 79,
"percentage": 6.98,
"noValue": false
}
],
"truncated": false
},
{
"field": "PROVENIENZA",
"label": "Provenienza",
"fieldType": "enum",
"values": [
{
"value": "Sconosciuta",
"contacts": 726,
"percentage": 64.19,
"noValue": false
},
{
"value": "Aggiunto dall'account",
"contacts": 405,
"percentage": 35.81,
"noValue": false
}
],
"truncated": false
},
{
"field": "RICEVE_EMAIL",
"label": "Riceve email",
"fieldType": "boolean",
"values": [
{
"value": true,
"contacts": 1131,
"percentage": 100.0,
"noValue": false
}
],
"truncated": false
}
]
}200 - Cross distribution
{
"totalContacts": 1131,
"fields": [
"status",
"PROVENIENZA"
],
"cells": [
{
"values": [
"unsubscribed",
"Sconosciuta"
],
"contacts": 703,
"percentage": 62.16
},
{
"values": [
"unsubscribed",
"Aggiunto dall'account"
],
"contacts": 349,
"percentage": 30.86
},
{
"values": [
"subscribed",
"Aggiunto dall'account"
],
"contacts": 56,
"percentage": 4.95
}
],
"truncated": true
}400 - Field not available
{
"error": "field EMAIL cannot be used for the distribution",
"debugMessage": "field EMAIL cannot be used for the distribution"
}Workflows
GET | Get workflow info
/v19/workflows/:id/infoGet the configuration and status info of a workflow by its id (name, status, dates, screenshot, entry/exit filters and frequency limits).
Returns 404 if the workflow does not exist or has been deleted.
Path variables
| Variable | Description |
|---|---|
id |
The id of the workflow |
Example responses
200 - Success Response
{
"id": 1,
"idjourney": 3,
"status": "active",
"name": "Welcome series",
"description": "Onboarding workflow",
"notes": "",
"creationDate": "2024-01-15T10:30:00.000Z",
"lastModificationDate": "2024-02-01T09:00:00.000Z",
"publishDate": "2024-01-20T08:00:00.000Z",
"screenshotStatus": "ready",
"screenshotThumbnail": "https://your-frontend-domain/workflow/thumbnail?...",
"entryFilterEnabled": true,
"exitFilterEnabled": false,
"exitUnsubscribedContacts": false,
"limitMax": 1000,
"limitFrequency": 1,
"limitPeriod": 1,
"limitPeriodUnit": "day",
"limitType": "sliding",
"limitDenyConcurrent": false
}Scheduled Works
This section describes the available REST API functions for retrieving data related to scheduled operations (called "Scheduled tasks" in magnews platform).
GET | Find scheduled work by id
/v19/scheduledworks/:idoperationFind a scheduled work by ID.
If the scheduled work does not exist, the response is HTTP 204 with no body.
Response
| Field | Type | Description |
|---|---|---|
iddatabase |
Integer | ID of the database of the scheduled work. |
idscheduledwork |
Integer | ID of the scheduled work. |
name |
String | Name of the scheduled work. |
Path variables
| Variable | Description |
|---|---|
idoperation |
ID of the scheduled task |
Example responses
200 - Success Response
{
"iddatabase": 1,
"idscheduledwork": 1,
"name": "Daily import"
}GET | Trigger scheduled work
/v19/scheduledworks/:idoperation/trigger?delay=:delayTrigger a scheduled work by ID with optional delay. The response describes the triggered scheduled work.
Response
| Field | Type | Description |
|---|---|---|
iddatabase |
Integer | ID of the database of the scheduled work. |
idscheduledwork |
Integer | ID of the scheduled work. |
name |
String | Name of the scheduled work. |
Path variables
| Variable | Description |
|---|---|
idoperation |
ID of the scheduled task to trigger |
Query parameters
| Parameter | Description |
|---|---|
delay |
Optional delay in minutes |
Example responses
200 - Success Response
{
"iddatabase": 1,
"idscheduledwork": 1,
"name": "Daily import"
}Export
Using the Bulk Export API
If you need to export data from custom or system tables, use this API.
This endpoint executes a full query and returns the complete result set.
There is no pagination, but the result is streamed efficiently.
The response is encoded in CSV format with the following default settings:
- Encoding: UTF-8
-
Field separator:
;
- No field delimiter
-
Line separator: Windows (
\r\n)
You can customize these options via query parameters in the request body (see the examples requests for both POST and GET modes).
Writing queries
See the Query documentation for more details.
GET | Bulk download (get)
/v19/export/bulkdownload?query=SELECT * FROM CONTACTS LIMIT 100&lineSeparator=\n"ationMark="&encoding=UTF-8&fieldSeparator=,Download data using a MQL query (GET method).
See the Query documentation for more details on how to write queries.
Query parameters
| Parameter | Description |
|---|---|
query |
Query to fetch contacts |
lineSeparator |
Optional line separator |
quotationMark |
Optional quotation mark |
encoding |
Optional encoding |
fieldSeparator |
Optional field separator |
Example responses
200 - Success Response
idcontact,email,name,surname,company,phone,status
1,"contact@example.com","John","Doe","Example Corp","+1234567890","active"
2,"contact2@example.com","Jane","Doe","Example Inc","+1987654321","active"POST | Bulk download (post)
/v19/export/bulkdownloadDownload data using a MQL query (POST method)
See the Query documentation for more details on how to write queries.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"query": "SELECT * FROM CONTACTS LIMIT 100",
"options": {
"lineSeparator": "\n",
"quotationMark": "\"",
"encoding": "UTF-8",
"fieldSeparator": ","
}
}Example responses
200 - Success Response
idcontact,email,name,surname,company,phone,status
1,"contact@example.com","John","Doe","Example Corp","+1234567890","active"
2,"contact2@example.com","Jane","Doe","Example Inc","+1987654321","active"Entities
An entity is a custom data table defined as User Entity on magnews.
:entityName parameter, use the name of the user entity, not the name of the underlying data table.GET | Find entity
/v19/entities/:entityName/data?id=1Find a record of a user entity table.
The record is looked up with the query string parameters: the table primary key (e.g. ?id=1) or the fields of the user-defined primary key.
Response
primarykey, the table primary key of the record, and fields, the values of all the fields of the record, in the same format as _Merge entity_.
Errors
| Status | When |
|---|---|
| 204 | No record matches the query string (no body). |
| 400 | The entity does not exist or is not a user entity table. |
Path variables
| Variable | Description |
|---|---|
entityName |
products |
Query parameters
| Parameter | Description |
|---|---|
id |
1 |
Example responses
200 - Success Response
{
"primarykey": {
"id": 1
},
"fields": {
"imageid": 0,
"updatedby": -1,
"subscriptiontype": 2,
"description": "Keynote, workshop pratici e networking su journey, dati e creatività.",
"startdate": "28/11/2026 09:00",
"subscriptionenddate": "26/11/2026 09:00",
"title": "Retail Breakfast 2026",
"materiallink": "",
"createdby": 0,
"id": 1,
"participants": 50,
"locationaddress": "Corso Magenta 61, Milano",
"serializedsurveys": "[{\"kind\":\"INVITATION\",\"surveyId\":6,\"custom\":false},{\"kind\":\"NPS\",\"surveyId\":7,\"custom\":false}]",
"journeyid": 1,
"agenda": "09:00 Apertura e keynote<br>12:00 Workshop<br>16:00 Networking e chiusura",
"url": "",
"createdat": "19/09/2026 15:16",
"enddate": "28/11/2026 17:00",
"sendtounsubscribed": false,
"name": "[DEMO] Retail Breakfast · Bozza · in presenza · su invito",
"online": false,
"location": "Palazzo delle Stelline",
"serializedcommunications": "[{\"kind\":\"INVITATION\",\"enabled\":true,\"newsletterId\":10,\"custom\":false,\"hoursBefore\":24},{\"kind\":\"REMINDER\",\"enabled\":true,\"newsletterId\":11,\"custom\":false,\"hoursBefore\":12},{\"kind\":\"FOLLOW_UP\",\"enabled\":true,\"newsletterId\":12,\"custom\":false,\"hoursAfter\":0}]",
"status": 0,
"updatedat": null
}
}POST | Merge entity
/v19/entities/:entityName/dataInsert or update a record in an entity table.
The existing record is looked up with the fields in fields: the table primary key or the fields of the user-defined primary key. When a record is inserted and the table primary key is auto increment, its value is assigned by Magnews and the one in fields is ignored.
The response has primarykey and fields of the record, as in _Find entity_.
Post body options
| Option | Type | Default Value | Description |
|---|---|---|---|
operationtype |
String | upsert |
Type of operation to perform. Possible values are: update, insert or upsert. |
Post body fields format
| Column data type | Entity field type | Example | Description |
|---|---|---|---|
| Text / Long text | "my string value" |
Double quoted string | |
| Integer (1 byte) | Integer | 1 |
Integer number |
| Integer (1 byte) | Checkbox | true |
Boolean value: true or false
|
| Integer (4 or 8 bytes) | 10 |
Integer or long number | |
| Decimal number |
"10.5" or "10,5"
|
Quoted string formatted according to current user's international settings | |
| Date | "24/06/2017" |
Quoted string formatted according to date format and time zone settings | |
| Date and time | "24/06/2017 10:17" |
Quoted string formatted |
Path variables
| Variable | Description |
|---|---|
entityName |
Data table name |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"fields": {
"id": 1,
"updated_at": "25/05/2025 00:00"
}
}Example responses
200 - Success Upsert entity
{
"primarykey": {
"id": 1
},
"fields": {
"tax_amount": 0,
"item_discount_amount": 0,
"item_tax_amount": 0,
"discount_amount": 0,
"created_at": "14/05/2024 15:59",
"qty_ordered": 2,
"total_item_count": 0,
"tax_percent": 0,
"updated_at": "25/05/2025 00:00",
"price_incl_tax": 0,
"price": 74,
"product_id": 859,
"grand_total": 158,
"id": 1,
"idcontact": 500595,
"state": "complete",
"sku": "MP11-33-Brown",
"store_id": 1,
"coupon_code": null,
"item_id": 6,
"quote_id": 5,
"entity_id": 4,
"shipping_amount": 10,
"subtotal": 148,
"name": "Aether Gym Pant -33-Brown",
"customer_id": 2,
"order_currency_code": "USD",
"status": "complete"
}
}POST | Batch merge entity
/v19/entities/:entityName/batchdataInsert or update a batch of records of a user entity table in a single call.
Each record is processed on its own: the call returns HTTP 200 with one result per record, in the same order as the request, also when some records fail.
Request Body
| Field | Type | Default Value | Description |
|---|---|---|---|
options.operationtype |
String | upsert |
Type of operation, applied to every record: update, insert or upsert. |
options.fulldump |
Boolean | false |
When true, the table is emptied before the records are inserted. Only allowed with operationtype insert. |
entities |
Array | Records to merge. Each one has fields, the values of the record in the same format as _Merge entity_. The existing record is looked up with the table primary key or the fields of the user-defined primary key in fields. |
Response
A list with one object per record:
| Field | Type | Description |
|---|---|---|
ok |
Boolean |
true if the record was merged. |
primarykey |
Object | Table primary key of the merged record, e.g. {"id": 2}. When ok is false it does not identify the record: use the position in the list. |
action |
String | Operation type of the request (insert, update or upsert). |
error |
String | Reason of the failure, null when ok is true. |
Errors
| Status | When |
|---|---|
| 400 | The entity does not exist or is not a user entity table, invalid operationtype, fulldump with an operationtype other than insert. |
Path variables
| Variable | Description |
|---|---|
entityName |
Data table name |
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"options": {
"operationtype": "upsert",
"fulldump": false
},
"entities": [
{
"fields": {
"id": 1,
"myuserprimarykey": 1234,
"mystringfield": "hello",
"myint": 1,
"mynumber": "10.05",
"mybool": true,
"mydatetime": "24/06/2021 10:05",
"mydate": "24/06/2021"
}
},
{
"fields": {
"myuserprimarykey": 1235,
"mystringfield": "world"
}
}
]
}Example responses
200 - Success Response
[
{
"ok": true,
"primarykey": {
"id": 12
},
"action": "upsert",
"error": null
}
]200 - Insert of an existing record
[
{
"ok": false,
"primarykey": {
"id": "aep_events"
},
"action": "insert",
"error": "Cannot insert record: record with data {id=12, participants=30} already exists (duplicate key)"
}
]Account
GET | Get residual credit
/v19/account/residualcredit/:channelGet the available credit for a channel (email or sms)
Allowed values for channel: email, sms.
Result: an object with creditamount, the residual credit.
- If credit is 1000, it returns a value approximated to the nearest thousand, rounding down.
- If credit is 0 or negative, it returns 0.
- For accounts with a flat plan, it returns residual credit plus automatic credit.
- For accounts with a final balance plan, it always returns \-1.
Path variables
| Variable | Description |
|---|---|
channel |
Channel name (email or sms) |
Example responses
200 - Success Response
{
"creditamount": 15000
}GET | Get user information
/v19/account/userinfoGet relevant information about the user profile associated with the current token and its account.
Example responses
200 - Success Response
{
"idaccount": 42,
"accountName": "SunnyWear",
"accountLogin": "sunnywear",
"iduser": 17,
"userName": "janedoe",
"emailAddress": "jane.doe@example.com",
"firstName": "Jane",
"lastName": "Doe",
"companyName": "SunnyWear Inc.",
"locale": "ENG",
"dateFormat": "dd/MM/yyyy",
"timeFormat": "HH:mm",
"dateTimeFormat": "dd/MM/yyyy HH:mm",
"roleName": "Administrator"
}MQL
Magnews Query Language is a meta sql language used to query system and custom table of a magnews account.
See the Query documentation for more details on how to write queries.
POST | Execute MQL select
/v19/mql/executeExecute an MQL select query. For update/insert/delete queries, use Execute MQL update endpoint.
Writing queries
See the Query documentation for more details on how to write queries.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"query": "select idcontact, email, data_ultima_modifica from contacts where data_ultima_modifica > ? and email like ?",
"options": {
"max": "10"
},
"parameters": ["15/07/2024 09:45", "%@example.com%"]
}Example responses
200 - Success Response
{
"recordCount": 10,
"columnNames": [
"idcontact"
],
"records": [
{
"record": [
{
"key": "idcontact",
"value": "1"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "2"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "3"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "4"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "5"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "6"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "37"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "38"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "68"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "69"
}
]
}
]
}500 - Bad query error
{
"error": "Internal Server Error",
"debugMessage": "bad query select * from contacts limit, parser error is: Encountered unexpected token:<EOF>\n at line 1, column 28.\n\nWas expecting one of:\n\n \":\"\n \"?\"\n \"ALL\"\n \"NULL\"\n <S_LONG>\n."
}200 - Query static audience members
{
"recordCount": 8,
"columnNames": [
"idcontact"
],
"records": [
{
"record": [
{
"key": "idcontact",
"value": "33"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "34"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "35"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "482470"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "482471"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "542425"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "542437"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "542438"
}
]
}
]
}200 - Query audiences
{
"recordCount": 10,
"columnNames": [
"idgroup",
"name",
"creationdate",
"lastmodificationdate"
],
"records": [
{
"record": [
{
"key": "idgroup",
"value": "1"
},
{
"key": "name",
"value": "%%dbreaders,suspended%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "2"
},
{
"key": "name",
"value": "%%dbreaders,unsubscribed%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "3"
},
{
"key": "name",
"value": "%%dbreaders,waiting%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "4"
},
{
"key": "name",
"value": "%%dbreaders,all%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "5"
},
{
"key": "name",
"value": "%%dbreaders,suspended%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "6"
},
{
"key": "name",
"value": "%%dbreaders,unsubscribed%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "7"
},
{
"key": "name",
"value": "%%dbreaders,waiting%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "8"
},
{
"key": "name",
"value": "%%dbreaders,all%%"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "02/09/2020 11:47"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "9"
},
{
"key": "name",
"value": "Iscritti alla newsletter"
},
{
"key": "creationdate",
"value": "25/09/2018 08:16"
},
{
"key": "lastmodificationdate",
"value": "25/09/2018 08:16"
}
]
},
{
"record": [
{
"key": "idgroup",
"value": "10"
},
{
"key": "name",
"value": "Iscritti alla newsletter - Clienti"
},
{
"key": "creationdate",
"value": "25/09/2018 08:16"
},
{
"key": "lastmodificationdate",
"value": "25/09/2018 08:16"
}
]
}
]
}200 - Query workflows
{
"recordCount": 10,
"columnNames": [
"idworkflow",
"name",
"creationdate",
"idcampaign"
],
"records": [
{
"record": [
{
"key": "idworkflow",
"value": "1"
},
{
"key": "name",
"value": "magneto"
},
{
"key": "creationdate",
"value": "16/10/2015 08:25"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "5"
},
{
"key": "name",
"value": "dynamics"
},
{
"key": "creationdate",
"value": "17/05/2019 11:36"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "15"
},
{
"key": "name",
"value": "Magento Test Workflow"
},
{
"key": "creationdate",
"value": "26/07/2022 11:22"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "16"
},
{
"key": "name",
"value": "dynamics"
},
{
"key": "creationdate",
"value": "11/10/2022 09:50"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "19"
},
{
"key": "name",
"value": "Prova LinkedIn Stefic"
},
{
"key": "creationdate",
"value": "25/01/2023 09:16"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "20"
},
{
"key": "name",
"value": "Prova 2 LinkedIn Stefic"
},
{
"key": "creationdate",
"value": "25/01/2023 11:10"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "21"
},
{
"key": "name",
"value": "Shopify stefic"
},
{
"key": "creationdate",
"value": "17/03/2023 09:15"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "24"
},
{
"key": "name",
"value": "Prova stefic"
},
{
"key": "creationdate",
"value": "17/04/2023 14:48"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "25"
},
{
"key": "name",
"value": "prova aggiorna contatto"
},
{
"key": "creationdate",
"value": "17/04/2023 15:33"
},
{
"key": "idcampaign",
"value": "1"
}
]
},
{
"record": [
{
"key": "idworkflow",
"value": "29"
},
{
"key": "name",
"value": "New automated flow"
},
{
"key": "creationdate",
"value": "26/09/2023 14:41"
},
{
"key": "idcampaign",
"value": "1"
}
]
}
]
}200 - Query journeys
{
"recordCount": 2,
"columnNames": [
"idcampaign",
"name",
"status",
"creationdate",
"lastmodificationdate"
],
"records": [
{
"record": [
{
"key": "idcampaign",
"value": "1"
},
{
"key": "name",
"value": "My Campaign"
},
{
"key": "status",
"value": "active"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "10/07/2015 12:38"
}
]
},
{
"record": [
{
"key": "idcampaign",
"value": "4"
},
{
"key": "name",
"value": "Sito web | My Web Site"
},
{
"key": "status",
"value": "active"
},
{
"key": "creationdate",
"value": "10/07/2015 12:38"
},
{
"key": "lastmodificationdate",
"value": "10/07/2015 12:38"
}
]
}
]
}200 - Query workflow messages
{
"recordCount": 2,
"columnNames": [
"idnewsletter",
"name",
"template",
"subject",
"idworkflow"
],
"records": [
{
"record": [
{
"key": "idnewsletter",
"value": "24"
},
{
"key": "name",
"value": "Nuovo workflow #1 (email)"
},
{
"key": "template",
"value": "true"
},
{
"key": "subject",
"value": ""
},
{
"key": "idworkflow",
"value": "1"
}
]
},
{
"record": [
{
"key": "idnewsletter",
"value": "26"
},
{
"key": "name",
"value": "Nuovo workflow #2 (email)"
},
{
"key": "template",
"value": "true"
},
{
"key": "subject",
"value": ""
},
{
"key": "idworkflow",
"value": "1"
}
]
}
]
}200 - Query deliveries
{
"recordCount": 10,
"columnNames": [
"iddelivery",
"idnewsletter",
"startdate",
"emailchannelenabled",
"smschannelenabled",
"status",
"emailmessages",
"smsmessages",
"scheduletype",
"trial"
],
"records": [
{
"record": [
{
"key": "iddelivery",
"value": "2"
},
{
"key": "idnewsletter",
"value": "5"
},
{
"key": "startdate",
"value": "02/23/2017 13:13"
},
{
"key": "emailchannelenabled",
"value": "false"
},
{
"key": "smschannelenabled",
"value": "true"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "0"
},
{
"key": "smsmessages",
"value": "1"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "3"
},
{
"key": "idnewsletter",
"value": "6"
},
{
"key": "startdate",
"value": "02/23/2017 13:54"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "4"
},
{
"key": "idnewsletter",
"value": "7"
},
{
"key": "startdate",
"value": "01/11/2018 09:28"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "5"
},
{
"key": "idnewsletter",
"value": "8"
},
{
"key": "startdate",
"value": "02/06/2018 12:01"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "6"
},
{
"key": "idnewsletter",
"value": "19"
},
{
"key": "startdate",
"value": "05/17/2019 12:25"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "3"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "7"
},
{
"key": "idnewsletter",
"value": "25"
},
{
"key": "startdate",
"value": "06/20/2019 10:25"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "2"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "9"
},
{
"key": "idnewsletter",
"value": "34"
},
{
"key": "startdate",
"value": "06/26/2019 14:16"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "true"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "10"
},
{
"key": "idnewsletter",
"value": "34"
},
{
"key": "startdate",
"value": "06/26/2019 15:16"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "true"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "11"
},
{
"key": "idnewsletter",
"value": "34"
},
{
"key": "startdate",
"value": "06/26/2019 15:45"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "2"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
},
{
"record": [
{
"key": "iddelivery",
"value": "12"
},
{
"key": "idnewsletter",
"value": "77"
},
{
"key": "startdate",
"value": "11/26/2019 12:16"
},
{
"key": "emailchannelenabled",
"value": "true"
},
{
"key": "smschannelenabled",
"value": "false"
},
{
"key": "status",
"value": "finished"
},
{
"key": "emailmessages",
"value": "1"
},
{
"key": "smsmessages",
"value": "0"
},
{
"key": "scheduletype",
"value": "single"
},
{
"key": "trial",
"value": "false"
}
]
}
]
}200 - Execute MQL select (with query parameters)
{
"recordCount": 10,
"columnNames": [
"idcontact",
"email",
"data_ultima_modifica"
],
"records": [
{
"record": [
{
"key": "idcontact",
"value": "2"
},
{
"key": "email",
"value": "anagramma@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "4"
},
{
"key": "email",
"value": "roni_cost@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "5"
},
{
"key": "email",
"value": "subscriber1@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "17"
},
{
"key": "email",
"value": "someonel1@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "18"
},
{
"key": "email",
"value": "someonel2@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "19"
},
{
"key": "email",
"value": "someonel3@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "20"
},
{
"key": "email",
"value": "someonel4@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "21"
},
{
"key": "email",
"value": "someonel5@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "22"
},
{
"key": "email",
"value": "someonel6@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
},
{
"record": [
{
"key": "idcontact",
"value": "23"
},
{
"key": "email",
"value": "someonel7@example.com"
},
{
"key": "data_ultima_modifica",
"value": "11/18/2025 12:53"
}
]
}
]
}POST | Execute MQL update/insert/delete
/v19/mql/updateExecute an MQL update query (update/insert/delete). For select queries use Execute MQL query endpoint.
⚠️ Update, insert and delete operations can only be performed on custom entities, not on system entities such as contacts or newsletters.
Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body
{
"query": "update orders set order_shipped=? where id=?",
"parameters": ["true", 13]
}Example responses
200 - Success Response
{
"updatedCount": 1
}Webhooks
Webhooks allow external systems to receive events from magnews in near real-time.
An external application must expose an HTTPS URL capable of receiving POST requests: for each event generated, magnews will send a request to that endpoint with the event data.
POST | Create webhook
/v19/webhooks/createRegisters a new webhook to receive magnews events in near real-time.
A webhook can be registered only if the URI provided meets these requirements:
- HTTPS with a valid certificate (TLS with a non-expired, non-self-signed certificate issued by a trusted CA)
- URI compliant with RFC 2396
- The endpoint must return HTTP 200 quickly (timeout: connection 1s, read 5s). Any other status code is treated as an error.
- Successful initial verification: before creating the subscription, magnews sends a test request to verify the endpoint.
Request body
{
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/update,contacts/delete"
}Example responses
200 - Success response
{
"id": 1,
"status": "active",
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/delete,contacts/update",
"digitalCertificateId": 2,
"creationDate": "14/11/2025 13:00",
"creationUserId": 3,
"lastModDate": "14/11/2025 13:00",
"lastModUserId": 3,
"lastExecDate": "",
"backoffDate": ""
}400 - Test request failed
{
"error": "test request failed",
"debugMessage": "HTTP 400 test request failed"
}POST | Update webhook
/v19/webhooks/updateUpdate a webhook subscription (uri, status, topics)
Request body
{
"id": 3,
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/update,contacts/delete",
"status": "suspended"
}Example responses
200 - Success response
{
"id": 3,
"status": "suspended",
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/delete,contacts/update",
"digitalCertificateId": 24,
"creationDate": "11/14/2025 13:53",
"creationUserId": 4,
"lastModDate": "11/14/2025 14:09",
"lastModUserId": 4,
"lastExecDate": "11/14/2025 14:08",
"backoffDate": "11/14/2025 14:38"
}GET | Get webhook
/v19/webhooks/:idFind a Webhook Subscription given its ID
Path variables
| Variable | Description |
|---|---|
id |
ID of the webhook subscription |
Example responses
200 - Success response
{
"id": 3,
"status": "active",
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/delete,contacts/update",
"digitalCertificateId": 24,
"creationDate": "11/14/2025 13:53",
"creationUserId": 4,
"lastModDate": "11/14/2025 13:56",
"lastModUserId": 2,
"lastExecDate": "11/14/2025 13:56",
"backoffDate": "11/14/2025 13:58"
}GET | List webhooks
/v19/webhooks/listList all Webhook Subscriptions
Example responses
200 - Success response
[
{
"id": 3,
"status": "active",
"uri": "https://www.example.com/mywebhook_handler",
"topics": "contacts/delete,contacts/update",
"digitalCertificateId": 24,
"creationDate": "11/14/2025 13:53",
"creationUserId": 4,
"lastModDate": "11/14/2025 13:58",
"lastModUserId": 2,
"lastExecDate": "11/14/2025 13:58",
"backoffDate": "11/14/2025 14:08"
}
]DELETE | Delete webhook
/v19/webhooks/delete/:idDeletes a Webhook Subscription given its ID
Path variables
| Variable | Description |
|---|---|
id |
id of the webhook subscription |
Example responses
204 - Success response
System
GET | Get api version
/v19Returns the API version
Example responses
200 - Success Response
v19