Pakat Email Service API

This documentation is a work in progress.

In order to get your api-key, please click on Login and get your api-key in profile.If you have any issue please call support on +982128423221

Contacts

get
Get all the contacts

https://api.pakat.net/v3/contacts
Request
Response
Request
Headers
Content-Type
required
string
application/json
Accept
required
string
application/json
api-key
required
string
Your API Key
Query Parameters
limit
optional
string
Number of documents per page
offset
optional
string
Index of the first document of the page
modifiedSince
optional
string
Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
Response
200: OK
s
{
"contacts": [
{
"email": "hadi@google.com",
"id": 7,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-07-22T07:39:18.409+01:00",
"modifiedAt": "2019-07-22T07:42:34.627+01:00",
"listIds": [],
"attributes": {
"LASTNAME": "Hadi",
"FIRSTNAME": "Farnoud",
"SMS": "09203016490"
}
},
{
"email": "saeedjoshani@gmail.com",
"id": 6,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-07-22T06:49:48.549+01:00",
"modifiedAt": "2019-07-22T06:49:48.582+01:00",
"listIds": [
4
],
"attributes": {}
},
{
"email": "hadi@kamva.ir",
"id": 5,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-07-10T14:48:25.134+01:00",
"modifiedAt": "2019-07-10T14:48:25.134+01:00",
"listIds": [
2
],
"attributes": {}
},
{
"email": "dev-email@flywheel.local",
"id": 4,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-07-10T14:48:25.092+01:00",
"modifiedAt": "2019-07-10T14:48:25.092+01:00",
"listIds": [
2
],
"attributes": {}
},
{
"email": "hadi.farnoud@gmail.com",
"id": 2,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-07-07T11:48:19.000+01:00",
"modifiedAt": "2019-07-07T11:48:19.658+01:00",
"listIds": [
2
],
"attributes": {}
},
{
"email": "test@kamva.ir",
"id": 1,
"emailBlacklisted": false,
"smsBlacklisted": false,
"createdAt": "2019-06-15T11:13:41.443+01:00",
"modifiedAt": "2019-07-29T09:31:08.495+01:00",
"listIds": [
2
],
"attributes": {}
}
],
"count": 6
}

post
Create a contact

https://api.pakat.net/v3/contacts
Example request: { "email":"test@pakat.net", "updateEnabled": true, "emailBlacklisted":false, "listIds": [ 14 ], "attributes": { "FIRSTNAME":"تست", "LASTNAME":"پاکت", "FIRST_PURCHASE":"12/10/2018" } }
Request
Response
Request
Headers
api-key
required
string
Content-Type
required
string
application/json
Accept
required
string
application/json
Body Parameters
smtpBlacklistSender
optional
boolean
transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )
updateEnabled
optional
boolean
Facilitate to update the existing contact in the same request (updateEnabled = true)
email
required
string
Email address of the user. Mandatory if "sms" field is not passed in "attributes" parameter
attributes
optional
array
Pass the set of attributes and their values. These attributes must be present in your Pakat account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}
emailBlacklisted
optional
boolean
Set this field to blacklist the contact for emails (emailBlacklisted = true)
smsBlacklisted
optional
boolean
Set this field to blacklist the contact for SMS (smsBlacklisted = true)
listIds
required
array
Array of integers. Ids of the lists to add the contact to
Response
200: OK

put
Update a contact

https://api.pakat.net/v3/contacts/{email}
Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Hadi', 'LNAME':'Mofidi'}
Request
Response
Request
Path Parameters
email
required
string
Email (urlencoded) of the contact
Body Parameters
listIds
optional
array
Ids of the lists to add the contact to
unlinkListIds
optional
array
Ids of the lists to remove the contact from
smtpBlacklistSender
optional
array
transactional email forbidden sender for contact. Use only for email Contact
smsBlacklisted
optional
boolean
Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
emailBlacklisted
optional
boolean
Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
Response
200: OK
Contact updated

Transactional

get
Get the list of blocked or unsubscribed transactional contacts

https://api.pakat.net/v3/smtp/blockedContacts
Request
Response
Request
Path Parameters
optional
string
Query Parameters
limit
optional
string
Number of documents returned per page
offset
optional
string
Index of the first document on the page
senders
optional
string
Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
endDate
optional
string
Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts
startDate
optional
string
Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts
Response
200: OK
List of blocked or unsubscribed transactional contacts Response schema type: object count integer Count of blocked or unsubscribed contact contacts object contacts[].email string Email address of the blocked or unsubscribed contact contacts[].senderEmail string Sender email address of the blocked or unsubscribed contact contacts[].reason object Reason for blocking / unsubscribing contacts[].reason.code string Reason code for blocking / unsubscribing (This code is safe for comparison) contacts[].reason.message string Reason for blocking / unsubscribing (This string is not safe for comparison)
{
"contacts":[
0:{
"email":"abc@xyz.com"
"senderEmail":"ez312@gmal.com"
"reason":{
"message":"Admin blocked"
"code":"adminBlocked"
}
"blockedAt":"2017-05-01T12:30:00Z"
}
]
"count":1
}

get

https://api.pakat.net/v3/smtp/blockedContacts
Request
Response
Request
Path Parameters
optional
string
Response
200: OK
[Object]

get
Get your transactional email activity aggregated per day

https://api.pakat.net/v3/smtp/statistics/reports
Request
Response
Request
Path Parameters
optional
string
Query Parameters
limit
optional
string
Number of documents returned per page
offset
optional
string
Index of the first document on the page
startDate
optional
string
Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD)
endDate
optional
string
Mandatory if endDate is used. Ending date of the report (YYYY-MM-DD)
days
optional
string
Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
tag
optional
string
Tag of the emails
Response
200: OK
{
"reports":[
0:{
"date":"2017-04-30"
"requests":10756
"delivered":10103
"hardBounces":21
"softBounces":137
"clicks":1026
"uniqueClicks":720
"opens":5091
"uniqueOpens":2318
"spamReports":0
"blocked":519
"invalid":1
"unsubscribed":0
}
1:{
"date":"2017-05-01"
"requests":18812
"delivered":17499
"hardBounces":34
"softBounces":254
"clicks":1514
"uniqueClicks":1090
"opens":10089
"uniqueOpens":4393
"spamReports":0
"blocked":920
"invalid":2
"unsubscribed":3
}
]
}

get
Get your transactional email activity aggregated over a period of time

https://api.pakat.net/v3/smtp/statistics/aggregatedReport
Request
Response
Request
Path Parameters
optional
string
Query Parameters
startDate
optional
string
Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
endDate
optional
string
Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
days
optional
string
Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
tag
optional
string
Tag of the emails
Response
200: OK
{
"range":"2016-09-08|2017-04-28"
"requests":19887
"delivered":18996
"hardBounces":234
"softBounces":1533
"clicks":9987
"uniqueClicks":8766
"opens":17654
"uniqueOpens":13688
"spamReports":1
"blocked":2
"invalid":0
"unsubscribed":2
}

get
Get all your transactional email activity (unaggregated events)

https://api.pakat.net/v3/smtp/statistics/events
Request
Response
Request
Path Parameters
optional
string
Query Parameters
limit
optional
string
Number limitation for the result returned
offset
optional
string
Beginning point in the list to retrieve from
startDate
optional
string
Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
endDate
optional
string
Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
days
optional
string
Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
email
optional
string
Filter the report for a specific email addresses
event
optional
string
Filter the report for a specific event type
tags
optional
string
Filter the report for tags (serialized and urlencoded array)
messageId
optional
string
Filter on a specific message id
templateId
optional
string
Filter on a specific template id
Response
200: OK
{
"events":[
0:{
"email":"john.smith@example.com"
"date":"2017-03-12T12:30:00Z"
"messageId":"<201798300811.5787683@example.domain.com>"
"event":"deferred"
"reason":"Error connection timeout"
"tag":"OrderConfirmation"
"from":"john@example.com"
}
1:{
"email":"john.smith@example.com"
"date":"2017-03-13T16:30:00Z"
"messageId":"<201798300811.5787683@example.domain.com>"
"event":"delivered"
"tag":"OrderConfirmation"
"from":"john@example.com"
}
]
}

get
Get the list of transactional email templates

https://api.pakat.net/v3/smtp/templates
Request
Response
Request
Query Parameters
templateStatus
optional
boolean
Filter on the status of the template. Active = true, inactive = false
limit
optional
string
Number of documents returned per page
offset
optional
string
Index of the first document in the page
Response
200: OK
{
"count":2
"templates":[
0:{
"id":5
"name":"ChristomasTimeTemplate"
"subject":"Merry Christmas"
"isActive":false
"testSent":false
"sender":{...}
"replyTo":"replyto@domain.com"
"toField":""
"tag":"Festival"
"htmlContent":"HTML CONTENT 1"
"createdAt":"2016-02-24T14:44:24Z"
"modifiedAt":"2016-02-24T15:37:11Z"
}
1:{
"id":12
"name":"SummerSales2017Template"
"subject":"Enjoy our summer Sales !"
"isActive":true
"testSent":false
"sender":{...}
"replyTo":"replyto@domain.com"
"toField":""
"tag":"Summer"
"htmlContent":"HTML CONTENT 2"
"createdAt":"2016-02-25T11:53:26Z"
"modifiedAt":"2016-02-25T11:53:26Z"
}
]
}

post
Create a transactional email template

https://api.pakat.net/v3/smtp/templates
Request
Response
Request
Path Parameters
optional
string
Body Parameters
tag
optional
string
Tag of the template
sender
required
object
Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example {"name":"xyz", "email":"example@abc.com"} , {"name":"xyz", "id":123}
templateName
required
string
Name of the template
htmlContent
optional
string
Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty
htmlUrl
optional
string
Url which contents the body of the email message. REQUIRED if htmlContent is empty
subject
required
string
Subject of the template
replyTo
optional
string
Email on which campaign recipients will be able to reply to
toField
optional
string
To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use for personalization
attachmentUrl
optional
string
Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
isActive
optional
boolean
Status of template. isActive = true means template is active and isActive = false means template is inactive
Response
200: OK

get
Returns the template informations

https://api.pakat.net/v3/smtp/templates/:templateId
Request
Response
Request
Path Parameters
templateId
required
integer
id of the template
Response
200: OK
{
"id":33
"name":"OrderConfirmation"
"subject":"Order Confirmation : Thanks for your Purchase !"
"isActive":true
"testSent":false
"sender":{
"name":"John"
"email":"john.smith@example.com"
"id":26
}
"replyTo":"replyto@domain.com"
"toField":""
"tag":""
"htmlContent":"HTML CONTENT 4"
"createdAt":"2016-02-25T11:53:26Z"
"modifiedAt":"2016-02-25T11:53:26Z"
}

put
Updates a transactional email templates

https://api.pakat.net/v3/smtp/templates/:templateId
Request
Response
Request
Path Parameters
templateId
required
integer
id of the template
Body Parameters
tag
optional
string
Tag of the template
sender
optional
object
Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example {"name":"xyz", "email":"example@abc.com", id="3" }
templateName
optional
string
Name of the template
htmlContent
optional
string
Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters)
htmlUrl
optional
string
Name of the template
subject
optional
string
subject of the email
replyTo
optional
string
Email on which campaign recipients will be able to reply to
toField
optional
string
To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use for personalization
attachmentUrl
optional
string
Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
isActive
optional
boolean
Status of the template. isActive = false means template is inactive, isActive = true means template is active
Response
204: No Content
transactional email template updated
400: Bad Request
bad request
404: Not Found
Template ID not found

delete
Delete an inactive transactional email template

https://api.pakat.net/v3/smtp/templates/:templateId
Request
Response
Request
Path Parameters
templateId
required
integer
Id of the template
Response
204: No Content
Inactive transactional email template has been deleted

post
Send a template to your test list

https://api.pakat.net/v3/smtp/templates/templateId/sendTest
Request
Response
Request
Path Parameters
templateId
optional
integer
Id of the template
Body Parameters
emailTo
optional
array
List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list.
Response
204: No Content
Test email has been sent successfully to all recipients

post
Send a transactional email

https://api.pakat.net/v3/smtp/email
Request
Response
Request
Body Parameters
sender
required
object
Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {'name':'Mary from MyShop', 'email':'no-reply@myshop.com'} name string Name of the sender from which the emails will be sent. Maximum allowed characters are 70. email* string Email of the sender from which the emails will be sent (required)
to
required
array
List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}]
bcc
optional
array
List of email addresses and names (optional) of the recipients in bcc
cc
optional
array
List of email addresses and names (optional) of the recipients in cc
htmlContent
optional
string
HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed )
textContent
optional
string
Plain Text body of the message ( Ignored if 'templateId' is passed )
subject
optional
string
Subject of the message. Mandatory if 'templateId' is not passed
replyTo
required
array
Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {'email':'ann6533@example.com', 'name':'Ann'}. email* string Email address in reply to (required) name string Name in reply to. Maximum allowed characters are 70
optional
string
attachment
optional
array
Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{"url":"https://attachment.domain.com/myAttachmentFromUrl.jpg", "name":"My attachment 1"}, {"content":"base64 exmaple content", "name":"My attachment 2"}]. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then only attachment url is accepted. If template is in Old template Language format, then 'attachment' is ignored )
headers
optional
object
Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_header"}.
templateId
optional
integer
Id of the template
params
optional
object
Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format.
tags
optional
array
Tag your emails to find them more easily
Response
201: Created
Response schema type: object messageId string: Message ID of the transactional email sent
transactional email sent

get
Get the list of transactional emails on the basis of allowed filters

https://api.pakat.net/v3/smtp/emails
This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
Request
Response
Request
Body Parameters
email
optional
string
Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent.
templateId
optional
number
Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email.
messageId
optional
string
Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent.
startDate
optional
string
Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
endDate
optional
string
Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
Response
200: OK

Email Campaigns

get
Return all your created email campaigns

https://api.pakat.net/v3/emailCampaigns
Request
Response
Request
Query Parameters
type
optional
string
Filter on the type of the campaigns
status
optional
string
Filter on the status of the campaign
startDate
optional
string
Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
endDate
optional
string
Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
limit
optional
integer
Number of documents per page
offset
optional
integer
Index of the first document in the page
Response
200: OK
Email campaigns informations Response schema type: object
[Object] campaigns
Integer campaigns[].id
ID of the campaign
String campaigns[].name
Name of the campaign
String campaigns[].subject
Subject of the campaign. Only available if abTesting flag of the campaign is false
String campaigns[].type
Type of campaign
String campaigns[].status
Status of the campaign
String campaigns[].scheduledAt
UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
Boolean campaigns[].abTesting
Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
String campaigns[].subjectA
Subject A of the ab-test campaign. Only available if abTesting flag of the campaign is true
String campaigns[].subjectB
Subject B of the ab-test campaign. Only available if abTesting flag of the campaign is true
Integer campaigns[].splitRule
The size of your ab-test groups. Only available if abTesting flag of the campaign is true
String campaigns[].winnerCriteria
Criteria for the winning version. Only available if abTesting flag of the campaign is true
Integer campaigns[].winnerDelay
The duration of the test in hours at the end of which the winning version will be sent. Only available if abTesting flag of the campaign is true
Boolean campaigns[].sendAtBestTime
It is true if you have chosen to send your campaign at best time, otherwise it is false
Boolean campaigns[].testSent
Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)
String campaigns[].header
Header of the campaign
String campaigns[].footer
Footer of the campaign
Object campaigns[].sender
String campaigns[].sender.name
Sender name of the campaign
String campaigns[].sender.email
Sender email of the campaign
String campaigns[].sender.id
Sender id of the campaign
String campaigns[].replyTo
Email defined as the "Reply to" of the campaign
String campaigns[].toField
Customisation of the "to" field of the campaign
String campaigns[].htmlContent
HTML content of the campaign
String campaigns[].shareLink
Link to share the campaign on social medias
String campaigns[].tag
Tag of the campaign
String campaigns[].createdAt
Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
String campaigns[].modifiedAt
UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
Boolean campaigns[].inlineImageActivation
Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.
Boolean campaigns[].mirrorActive
Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
Boolean campaigns[].recurring
FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
String campaigns[].sentDate
Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
Integer campaigns[].returnBounce
Total number of non-delivered campaigns for a particular campaign id.
Object campaigns[].recipients
[Integer] campaigns[].recipients.lists
[Integer] campaigns[].recipients.exclusionLists
Object campaigns[].statistics
Object campaigns[].statistics.globalStats
Overall statistics of the campaign
[Object] campaigns[].statistics.campaignStats
List-wise statistics of the campaign.
Integer campaigns[].statistics.mirrorClick
Number of clicks on mirror link
Integer campaigns[].statistics.remaining
Number of remaning emails to send
Object campaigns[].statistics.linksStats
Statistics about the number of clicks for the links
Object campaigns[].statistics.statsByDomain
Object campaigns[].statistics.statsByDevice
Object campaigns[].statistics.statsByBrowser
String campaigns[].shareLink
Link to share the campaign on social medias
Integer count
Number of Email campaigns retrieved

post
Create an email campaign

https://api.pakat.net/v3/emailCampaigns
Request
Response
Request
Body Parameters
tag
optional
string
Tag of the campaign
sender
required
object
Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: {"name":"xyz", "email":"example@abc.com"} {"name":"xyz", "id":123} name string Sender Name email string Sender email id integer Select the sender for the campaign on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email).
name
required
string
Name of the campaign
htmlContent
optional
string
Mandatory if htmlUrl and templateId are empty. Body of the message (HTML).
htmlUrl
optional
string
Mandatory if htmlContent and templateId are empty. Url to the message (HTML). For example: https://html.domain.com
templateId
optional
string
Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status active. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
scheduledAt
optional
string
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example: 2017-06-01T12:30:00+02:00
subject
required
string
Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true.
replyTo
optional
string
Email on which the campaign recipients will be able to reply to
toField
optional
string
To personalize the To Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter paramsused please use {{contact.FNAME}} {{contact.LNAME}} for personalization
recipients
optional
object
List ids to include/exclude from campaign exclusionListIds array of integers List ids to exclude from the campaign listIds array of integers Mandatory if scheduledAt is not empty. List Ids to send the campaign to
attachmentUrl
optional
string
Absolute url of the attachment (no local file). Extension allowed:
inlineImageActivation
optional
boolean
Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts
mirrorActive
optional
boolean
Use true to enable the mirror link
footer
optional
string
Footer of the email campaign
header
optional
string
Header of the email campaign
utmCampaign
optional
string
Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
params
optional
object
Pass the set of attributes to customize the type classic campaign. For example: {"FNAME":"Joe", "LNAME":"Doe"}. Only available if type is classic. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of subject, htmlContent/htmlUrl, sender.name & toField
sendAtBestTime
optional
boolean
Set this to true if you want to send your campaign at best time.
abTesting
optional
boolean
Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. subjectA, subjectB, splitRule, winnerCriteria & winnerDelay will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. Can be set to true only if sendAtBestTime is false. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
subjectA
optional
string
Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
subjectB
optional
string
Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
splitRule
optional
integer
Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
winnerCriteria
optional
string
Choose the metrics that will determinate the winning version. Mandatory if splitRule >= 1 and < 50. If splitRule = 50, winnerCriteria is ignored if passed
winnerDelay
optional
integer
Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if splitRule >= 1 and < 50. If splitRule = 50, winnerDelay is ignored if passed
ipWarmupEnable
optional
boolean
Available for dedicated ip clients. Set this to true if you wish to warm up your ip. set to false or true.
initialQuota
optional
integer
Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
increaseRate
optional
integer
Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
Response
200: OK
Email campaigns informations
Response schema type: object