Documentations
Outbox API Documentations
Send Message to Recipient
POST
https://outbox.rest/send/message
Service to be used to send messages to members.
Request Body
"Recipients":[
{ "Recipient": "+90555xxxx",
"Content": "Merhaba /*AD*/ ,
"Variables": { "AD": "Test" }
},]
Campaign number defined in our system
Sent on a spesific date Ex."2045-12-21 23:59:59"
NORMAL/FAST/TEST/SIMULATION
Authentication token for using API
{
"result": [
{
"Recipient": "+90555xxxxxxxx",
"TrackingID": "52ad371d92ce420b8f7efc567748684c"
},
{
"Recipient": "+90555xxxxxxxxx",
"TrackingID": "28bb7d67d5b6443288e0b5cfc0598b84"
}
],
"status": {
"Accepted": 2,
"Length": 2
}
}
{"message": "Invalid Auth Key"}
{"message": "Invalid Message Content"}
You may use tour own single and unique tracking id you generate for each message, and you may follow delivery results with your won tracking id
Allowed types
MMS: 3GP, PDF, CSV, DOC, XLS, TXT, MP3, MP4, ICS
IMAGE: JPG, JPEG, GIF, BMP, PNG
Variables for dynamic contents
FAST: Deliver fast, prioritize delivery
TEST: Treat message as a test message and update CDN and source files
SIMULATION : Send message as simulation
0: Obey activity filters defined in the system
1: Send normal, skip activity filters
In the same time zone, sending messages to the same person is blocked by the system. You can change it with Unique Key.
var responseData = {
"AuthKey": "**********************",
"MessageType": "SMS",
"Recipients": [
{
"Recipient": "+905326124837",
"Content": "Merhaba /*Ad*/",
"Variables": {
"Ad": "Aycan"
}
},
{
"Recipient": "+905398836180",
"Content": "Merhaba /*Ad*/",
"Variables": {
"Ad": "Abdullah"
}
}
],
"SendAlways": 2,
"Priority": "FAST",
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/send/message",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Get Status of Sent Message
POST
https://outbox.rest/get/status
Service to query the status of a sent message on a member basis.
Request Body
The person-based TrackingID number after sending a message
Authentication token for using API
{
"Code": 0,
"Recipient": "90555xxxx",
"Status": "Success"
}
{"message": "Invalid Auth Key"}
{"message": "Invalid Request Body"}
Determine language of the result.
var responseData = {
"AuthKey": "***********************",
"Language": "EN",
"TrackingID": "********************"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://outbox.rest/get/status",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Create Group
POST
https://outbox.rest/create/group
Service used to create groups/list .
Request Body
Authentication token for using API
The given name will be used as the group name
{
"GroupID": 12345,
"status":200
}
{
"status": 400,
"message": "GroupName not found or invalid"
}
{
"status": 403,
"message": "Invalid Auth Key"
}
{
"result": 500,
"message": "Invalid Request Body"
}
var responseData = {
"AuthKey": "***********************",
"GroupName": "test group-1"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/create/group",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Group Info
POST
https://outbox.rest/info/group
Service used to get information about the group/list.
Request Body
Authentication token for using API
{
"message": [
{
"GroupID": 10,
"GroupName": "Abdullah",
"noofactivecontacts": 0,
"noofcontacts": 3,
"noofcontactsblocked": 0,
"noofcontactsbounced": 0,
"noofcontactsclicking": 0,
"noofcontactscomplained": 1,
"noofcontactsspamblocked": 0,
"noofcontactsspamtraphits": 0,
"noofmyactivecontacts": 0,
"noofmycontactsclicking": 0
}
],
"status": "OK"
}
{
"status": 403,
"message": "Invalid Auth Key"
}
{
"status": 404,
"message": "GroupID must be contain in post data"
}
{
"status": 500,
"message": "Invalid Request Body"
var responseData = {
"AuthKey": "***********************",
"GroupID":"10"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/info/group",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Add Recipient to Group
POST
https://outbox.rest/add/group/recipient
Service used to add members to any group/list.
Request Body
Wait for Response (default = True)
example:
[
{
"EMail": "test@test.com",
"GSMTel1": "5555555555"
}
]
*Email is required.
The given ID will be used as the group ID
Authentication token for using API
{
"message": [
{
"ContactNo": 1234,
"GroupID": 1234,
"recipient": "test1@test.com"
},
{
"ContactNo": 1234,
"GroupID": 1234,
"recipient": "test2@test.com"
},
],
"status": "OK"
}
{
"status": "Error",
"message": "Invalid Token / Group ID not exist"
}
{
"status": "Error",
"message": "Error Message"
}
Used to specify permissions for adding contacts to a group. **Optional
var responseData = {
"AuthKey": "**********************",
"GroupID": 15,
"Recipients": [
{
"EMail": "aa@gmail.com",
"GSMTel1": "5011231231",
"FirstName": "adad",
"LastName": "adasdasd",
"DateOfBirth": "1900-01-01",
"City": "",
"Gender": "0",
"Permit": {
"Email": true,
"GSM": false,
"Push": false
}
}
]
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/add/group/recipient",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Remove Recipient From Group
POST
https://outbox.rest/recipient/update/status
Service used to remove the member from the group/list.
Request Body
BLOCK/UNBLOCK/SUBSCRIBE/UNSUBSCRIBE
CORRECT/INCORRECT
Authentication token for using API
{
"status": "Error",
"message": "EMail must be contain / Not found EMail data"
}
{
"status": "Error",
"message": "Error Message"
}
Block the recipient from within the group.
Unblock the recipient from within the group.
Subscribe the recipient from within the group.
Unsubscribe the recipient from within the group.
Correct the recipient from within the group.
Incorrect the recipient from within the group.
var responseData = {
"AuthKey": "******************",
"EMail":"test@krea.digital",
"Type":"SUBSCRIBE"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/recipient/update/status",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Send Message to Group
POST
https://outbox.rest/send/group/message
Service used to send message to group/list
Request Body
if not added default group to be selected
The id of the message from panel
Authentication token for using API
{
"result": {
"OK": "5"
}
}
{
"status": "Error",
"message": "GroupID/MessageID must be contain"
}
{
"status": "Error",
"message": "Error Message"
}
var responseData = {
"AuthKey": "**********************",
"GroupID": 10,
"MessageID":5
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/send/group/message",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Message Info
POST
https://outbox.rest/info/message
Service used to query the status of a sent message.
Request Body
if it is true, the result is a more detailed list. default contains global values.
End Date for result ("yyyy-mm-dd")
Start Date for result ("yyyy-mm-dd")
The id of the previously sent message
Authentication token for using API
{
"message": [
{
"id": 179,
"lastupdate": "2019-01-08T08:00:00200:00",
"messageid": 160,
"noofcontacts": 968,
"noofcontactsclicked": 53,
"noofcontactsdeleted": 0,
"noofcontactsdelivered": 8217,
"noofcontactsmarkedspam": 1,
"noofcontactsread": 329,
"noofcontactsreplied": 33,
"noofcontactsunsubscribed": 3,
"noofmessagesblocked": 910,
"noofmessagesbounced": 405,
"noofmessagesdelivered": 8235,
"noofmessagesnotdelivered": 337,
"noofmessagessent": 987,
"painitred": "",
"sendername": "Test sender name",
"subject": "Test Subject"
}
],
"status": "OK"
}
if Details is True
{
"message": [
{
"color": "3399FF",
"enddate": "2019-01-30",
"id": 429,
"imagepart": 3501,
"lastupdate": "2019-02-21T09:00:00300:00",
"messageid": 11864,
"messagelink": "",
"messagestatus": "ON",
"messagetype": "EMAIL",
"noofcontactsblocked": 0,
"noofcontactsbounced": 1,
"noofcontactsclicked": 16,
"noofcontactscomplained": 3,
"noofcontactsdelivered": 127,
"noofcontactsread": 71,
"noofcontactsreadondesktop": 44,
"noofcontactsreadonmobile": 9,
"noofcontactsreplied": 0,
"noofmessagesdelivered": 729,
"painitred": "ON",
"sendername": "KREA.Digital",
"startdate": "2019-01-01",
"subject": "✉️ E-posta hizmetimiz ile ilgilendiğinizi gördük",
"textpart": 38612,
"totalmessagesize": 42113
},
{
"color": "3399FF",
"enddate": "2019-01-30",
"id": 429,
"imagepart": 3501,
"lastupdate": "2018-11-19T15:10:00300:00",
"messageid": 11863,
"messagelink": "",
"messagestatus": "ON",
"messagetype": "EMAIL",
"noofcontactsblocked": 2,
"noofcontactsbounced": 2,
"noofcontactsclicked": 18,
"noofcontactscomplained": 4,
"noofcontactsdelivered": 307,
"noofcontactsread": 126,
"noofcontactsreadondesktop": 63,
"noofcontactsreadonmobile": 36,
"noofcontactsreplied": 2,
"noofmessagesdelivered": 1271,
"painitred": "ON",
"sendername": "KREA.Digital",
"startdate": "2019-01-01",
"subject": "Sizi Özledik ❤️",
"textpart": 35251,
"totalmessagesize": 38752
}
],
"status": "OK"
}
{
"status": "Error",
"message": "MessageID must be contain"
}
{
"status": "Error",
"message": "Error Message"
}
var responseData = {
"AuthKey": "**********************",
"MessageID":5
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/send/group/message",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Groups
GET
https://outbox.rest/groups
Service used to get detailed information about all groups/list.
Authentication token for using API
{
"message": [
{
"ActiveContacts": 12345,
"AddedOn": "2019-01-24T09:26:37200:00",
"Bounced": 12345,
"Complained": 123,
"ContactsClickingLinks": 1234,
"Description": "",
"GroupColor": "FFFFFF",
"GroupID": 10,
"GroupName": "Test Group",
"OptinLevel": 0,
"Source": "USER",
"TotalContacts": 12345,
"UpdatedOn": "2019-01-24T09:26:37200:00",
"ValidContacts": 12345,
"integerpercentageofactivecontactsforgroup": "28",
"integerpercentageofcomplainedcontacts": "0",
"integerpercentageofcontactsclickingcinksforgroup": "10",
"integerpercentageofvalidcontactsforgroup": "61",
"percentageofcomplainedcontacts": "0.00"
}
],
"status": "OK"
}
{
"status": "Error",
"message": "Invalid Token"
}
{
"status": "Error",
"message": "Token does not exist"
}
{
"status": "Error",
"message": "Error messages"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/groups",
"method": "GET",
"headers": {
"Content-Type": "application/json",
"AuthKey": "**********************",
},
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Group Recipients
POST
https://outbox.rest/group/recipients
Service used to query the group-based member.
Request Body
Date is user added date. Key format YYY-MM-DD
Default value 100, Maximum value 500
Authentication token for using API
{
"message": [
{
"AddedOn": "2019-02-07T13:37:09200:00",
"Blocked": 0,
"BrowserBlock": 0,
"BrowserComplain": 0,
"BrowserToken": "",
"ClientMailsNotRead": 0,
"Complained": 0,
"ContactNo": 64,
"EMailBlock": 0,
"EMailComplain": 0,
"GSMBlock": 0,
"GSMComplain": 0,
"GSMTel": "5555555255",
"Gender": "-1",
"GroupID": "11",
"HardBounce": 0,
"LastActivityWasOn": "2000-01-01T00:00:00200:00",
"LastCity": null,
"LastClientMailWasOn": "2000-01-01 00:00:00",
"LastCountry": null,
"LastMediaType": "",
"LastPurchaseOn": "2000-01-01 00:00:00",
"LastVisitToWebSite": "2000-01-01 00:00:00",
"MailsLastMonth": 0,
"MarkedAsSPAM": 0,
"Quit": 0,
"Risk": 70,
"SPAMTrapHit": 0,
"UUID": "test_2@test.com-5555555255--",
"Unsubscribed": 0,
"Valid": 1,
"XPID": "",
"XPIDBlock": 0,
"XPIDComplain": 0,
"recipient": "test_1@test.com"
},
{
"AddedOn": "2019-02-07T13:37:09200:00",
"Blocked": 0,
"BrowserBlock": 0,
"BrowserComplain": 0,
"BrowserToken": "",
"ClientMailsNotRead": 0,
"Complained": 0,
"ContactNo": 63,
"EMailBlock": 0,
"EMailComplain": 0,
"GSMBlock": 0,
"GSMComplain": 0,
"GSMTel": "5555555555",
"Gender": "-1",
"GroupID": "11",
"HardBounce": 0,
"LastActivityWasOn": "2000-01-01T00:00:00200:00",
"LastCity": null,
"LastClientMailWasOn": "2000-01-01 00:00:00",
"LastCountry": null,
"LastMediaType": "",
"LastPurchaseOn": "2000-01-01 00:00:00",
"LastVisitToWebSite": "2000-01-01 00:00:00",
"MailsLastMonth": 0,
"MarkedAsSPAM": 0,
"Quit": 0,
"Risk": 70,
"SPAMTrapHit": 0,
"UUID": "test_2@test.com-5555555555--",
"Unsubscribed": 0,
"Valid": 1,
"XPID": "",
"XPIDBlock": 0,
"XPIDComplain": 0,
"recipient": "test_2@test.com"
}
],
"status": "OK"
}
{
"status": "Error",
"message": "Invalid Token"
}
{
"status": "Error",
"message": "Token does not exist"
}
{
"status": "Error",
"message": "Error messages"
}
var responseData = {
"AuthKey": "**********************",
"GroupID":10
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/group/recipients",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Get Recipient
POST
https://outbox.rest/get/recipient
Service used for member-based inquiry.
Request Body
When creating a recipient, unique id is given to recipient
ContactNo after added recipient
Authentication token for using API
{
"message": [
{
"AddedOn": "2019-02-14T14:38:39200:00",
"Address": null,
"BrowserToken": "",
"CardNo": null,
"Children": null,
"City": null,
"Communication": null,
"Company": null,
"Consent": 1,
"ContactNo": 1205328279,
"Country": null,
"DateOfBirth": null,
"DateOfMarriage": null,
"Department": null,
"EMail": "test_1@test.com",
"EMail2": null,
"EMail3": null,
"EMailCheck": 0,
"Education": null,
"ExecuteOn": null,
"Experience": null,
"Fax": null,
"FieldMaps": null,
"Files": null,
"FirstName": null,
"Friends": "[ { \"name\": \"facebook\",\"url\":\"\",\"count\":\"\" } , { \"name\": \"linkedin\",\"url\":\"\",\"count\":\"\" } , { \"name\": \"twitter\",\"url\":\"\",\"count\":\"\" } , { \"name\": \"instagram\",\"url\":\"\",\"count\":\"\" } , { \"name\": \"pinterest\",\"url\":\"\",\"count\":\"\" } , { \"name\": \"google\",\"url\":\"\",\"count\":\"\" }]",
"GSMTel1": "5555555555",
"GSMTel2": null,
"Gender": null,
"GroupID": 4733,
"Hobbies": null,
"HomeTel": null,
"ID": 429,
"Industry": null,
"LS": 3,
"LastName": null,
"MaritalStatus": null,
"Message": null,
"Modified": 1,
"Occupation": null,
"OfficeTel": null,
"POBox": null,
"Photos": null,
"Profile": null,
"RA": 4,
"SecurityID": null,
"SpouseDateOfBirth": null,
"SpouseName": null,
"Status": "ON",
"Variables": null,
"XPID": "",
"blocked": "0",
"complained": "0",
"hardbounced": "0",
"uniqueID": "329",
"unsubscribed": "0",
"varAll1": null,
"varAll2": null,
"varAll3": null,
"varDate1": null,
"varDate2": null,
"varDate3": null,
"varText1": null,
"varText10": null,
"varText11": null,
"varText12": null,
"varText2": null,
"varText3": null,
"varText4": null,
"varText5": null,
"varText6": null,
"varText7": null,
"varText8": null,
"varText9": null
}
],
"status": "OK"
}
{
"message": "Invalid Token",
"status": "Error"
}
{
"message": "Token does not exist",
"status": "Error"
}
{
"message": "ContactID or uniqueID must be contain in post data",
"status": "Error"
}
uniqueID or ContactID ---> You have to send one of the two.
Special identification number sent from your system when adding a recipient
Spesific id sent after adding recipients
var responseData = {
"AuthKdey": "*********************",
"uniqueID":329,
"GroupID":10
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/get/recipient",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Get Recipients with Status
POST
https://outbox.rest/status/recipients
Service based on two dates between status of the member to query Ex. 01.01.2019-01.02.2019 between dates of leaving the membership
Request Body
Query Date Finish (yyyy-mm-dd)
Query Date Start (yyyy-mm-dd)
Page number (default '1' )
READERS/MYREADER/
CLICKERS/MYCLIKERS/
VALID/BOUNCED/COMPLAINED/
BLOCKS/BLOCKED/
INVALID/ALL
Authentication token for using API
{
"message": [
{
"AddedOn": "2019-02-14T11:49:32200:00",
"Blocked": 0,
"BrowserBlock": 0,
"BrowserComplain": 0,
"BrowserToken": "",
"ClientMailsNotRead": 0,
"Complained": 0,
"ContactNo": 120538276,
"EMailBlock": 0,
"EMailComplain": 1,
"GSMBlock": 0,
"GSMComplain": 0,
"GSMTel": "5555555555",
"Gender": "-1",
"GroupID": "4733",
"HardBounce": 0,
"LastActivityWasOn": "2000-01-01T00:00:00200:00",
"LastCity": null,
"LastClientMailWasOn": "2000-01-01 00:00:00",
"LastCountry": null,
"LastMediaType": "",
"LastPurchaseOn": "2000-01-01 00:00:00",
"LastVisitToWebSite": "2000-01-01 00:00:00",
"MailsLastMonth": 0,
"MarkedAsSPAM": 0,
"Quit": 1,
"Risk": 70,
"SPAMTrapHit": 0,
"UUID": "test_1@test.com@krea.digital-5555555555--",
"Unsubscribed": 1,
"Valid": 0,
"XPID": "",
"XPIDBlock": 0,
"XPIDComplain": 0,
"recipient": "test_1@test.com"
}
],
"status": "OK"
}
{
"message": "Invalid Token",
"status": "Error"
}
{
"message": "Token does not exist",
"status": "Error"
}
{
"message": "GroupID and Type must be contain in post data",
"status": "Error"
}
*The number of pages varies depending on the key sent with the Count key.
Include people who have seen the messages before
Show the recipients frequently seen in the group
Include people who have click the messages before
Show the recipients frequently click in the group
Show valid recipients in group.
Show extracted recipients.
Show complaining recipients.
Show blocked recipients in all groups.
Show blocked recipients in group.
Show invalid recipients in group.
var responseData = {
"AuthKey": "*************************",
"Type":"ALL",
"GroupID":10,
"Count":20,
"Page":2,
"StartDate":"2018-01-01",
"EndDate":"2018-12-30"
}
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/status/recipients",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});c
Send Message to Recipient (XML)
POST
https://outbox.rest/send/xml/message
Send Message API with XML
<result type="dict">
<message type="list">
<item type="dict">
<TrackingID type="str">d06ea38ca2714e16afafc6a2ceada88e</TrackingID>
<Recipient type="str">+9053xxxxxxxx</Recipient>
</item>
</message>
<status type="dict">
<Length type="int">1</Length>
<Accepted type="int">1</Accepted>
</status>
</result>
<result type="dict">
<message type="str">Invalid Auth Key</message>
</result>
<result type="dict">
<message type="str">Invalid Message Content</message>
</result>
<?xml version="1.0" encoding="UTF-8"?>
<data>
<AuthKey>***********************</AuthKey>
<MessageType>SMS</MessageType>
<Priority>NORMAL</Priority>
<MessageID>15</MessageID>
<Recipients>
<SenderName>Test</SenderName>
<Content>test</Content>
<Recipient>+9053xxxxxxxx</Recipient>
</Recipients>
<SendAlways>2</SendAlways>
</data>
Get Status of Sent Message (XML)
POST
https://outbox.rest/get/xml/status
Get Status API with XML
Path Parameters
<result type="dict">
<Recipient type="str">9053********</Recipient>
<Code type="int">0</Code>
<Status type="str">Success</Status>
</result>
<result type="dict">
<message type="str">Invalid Token</message>
<status type="int">403</status>
</result>
<result type="dict">
<message type="str">Token does not exist</message>
<status type="int">404</status>
</result>
<result type="dict">
<message type="str">An error occurred while getting status</message>
<status type="int">500</status>
</result>
<?xml version="1.0" encoding="UTF-8"?>
<data>
<AuthKey>****************************</AuthKey>
<Language>EN</Language>
<TrackingID>d3d54b027b674e2abd98fea967238908</TrackingID>
</data>
Update Status Message
GET
https://outbox.rest/update/status/message
Update status to message
Request Body
MessageID for update status
Authentication token for using API
{
"message": "Token does not exist",
"status": "Error"
}
{
"message": "MessageID or Type not found",
"status": "Error"
}
//
{
"message": "Status Type not Acceptable",
"status": "Error"
}
var responseData = {
"AuthKey": "*************************",
"Type":"ON",
"MessageID":12345
}
/*
ON = Start Message
STOP = Stop Message
PAUSE = Pause Message
*/
var settings = {
"async": true,
"crossDomain": true,
"url": "http://outbox.rest/update/status/message",
"method": "POST",
"headers": {
"Content-Type": "application/json",
},
"processData": false,
"data": JSON.stringify(responseData)
}
$.ajax(settings).done(function (response) {
console.log(response);
});