Automizy REST API Docs

Developers Page

Introduction

What is Automizy REST API?

Automizy REST API is a RESTful application programming interface made for Automizy, so it meets the constraints and requirements of REST.

Communicate through the API

Anything you can do by using the software's user interface can be done also by calling the right methods of the API, since the also the UI uses this API for communication.

Easy to integrate

By using Automizy REST API there are no limits of integrating Automizy into other systems.

Headers

There are different headers for authentication and the other functions, listed below.

Authentication headers

This kind of header is used at both credentials and password login.
Field Type Description
Content-Type String Request content type
Accept String Response content type
Header example
{
  "Content-Type": "application/json",
  "Accept": "application/json"
}
                

Other headers

This kind of header is used at all other functions.
Field Type Description
Authorization String Authorization token, from /oauth
Content-Type String Request content type
Accept String Response content type
Allowed values: "application/json" "text/csv"

"application/json" is easier to handle, but response is limited, you can get 1000 data rows maximally.
With "text/csv" you get a csv file as response, that can contain unlimited rows.
Header example
{
  "Authorization": "Bearer <ACCESS TOKEN>",
  "Content-Type": "application/json",
  "Accept": "application/json"
}
                

Authentication

Authentication is used to access the server.

Getting access token

In Automizy you can create multiple access tokens use can use to interact with our system.
Each token grants access to the company account it was created in.

Example of creating a new access token:

  • You log in to Automizy using 'your.email@email.com'.
  • If you have access to multiple company accounts, you select the account you want to create the token for, for example 'Your Company Inc.'
  • You click on your user name in the top right corner.
  • You click on 'Manage API keys' menu.
  • Your user setting page opens, and you navigate on 'Tokens' tab.
  • On the 'Tokens' tab, you can see the tokens you already generated.
    Click on 'New Token' to generate a new one.
  • A dialog with the new token shows up.
    Copy and save the generated token, because you won't be able to check it again after closing the dialog.

From you on, you can use this token to send requests to Automizy to manage account 'Your Company Inc.' on behalf of user 'your.email@email.com' using the Authorization: Bearer <ACCESS TOKEN> header as shown in the examples.

Segments

Segments are sorted, filtered lists of contacts.

Calculating a segment

When you create a new segment, or import new contacts, it's necessary to calculate the segments. That mean that the contacts will be ordered to the segments by the given conditions.
Please note that one contact can be ordered to more segments.
GET
https://api.automizy.com/segments/:id/calculate
Permission: Logged in user
Parameters
Field Type Description
waitForResponseoptional Boolean If it's false then the calculation will be running in async mode.
Default value: false
saveAfterFinishoptional Boolean If it's true then the calculation results will be saved.
Default value: false
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/segments/7/calculate?waitForResponse=true&saveAfterFinish=false' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/segments/7/calculate",
    data: {
        waitForResponse:true,
        saveAfterFinish:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
                
//Just calculate, no save
 $AA.segments().calculateById(7) //returns jqXHR

//Calculate and save
 $AA.segments().calculateAndSave(7) //returns jqXHR
                
Success 200
Field Type Description
numberOfContacts Number The number of contacts on the segment.
Response example
HTTP/1.1 200 OK
{
   numberOfContacts: "10000"
}
                

Creating a new segment

When you create a new segment, you have to set the conditions the segment will use to sort the contacts.
Conditions can be set by defining condition groups, as shown in the example.
POST
https://api.automizy.com/segments
Permission: Logged in user
Parameters
Field Type Description
name String The name of the new segment you want to create.
conditions Object[][] Elements of array are condition groups separated with OR conditions
  conditions[x] Object[] Elements of array are conditions separated with AND condition
    conditions[x][y] Object A condition object.
      conditions[x][y][type] String Condition type
  • SUBSCRIBE_DATE: The date when the contact subscribed. Must be used with the EQ, NE, GT, LT relation.
  • LAST_OPEN: The date when the contact last opened the given e-mail(might be incorrect because of caching servers). Must be used with the EQ, NE, GT, LT relation.
  • OPENS_COUNT: The number of times the user opened the e-mail(might be incorrect because of caching servers). Must be used with the EQ, NE, GT, LT relation.
  • OPEN: Checks if the user opened the e-mail or not. Must be used with the YE or NO relation.
  • CLICK: Checks if the user clicked the given link. Must be used with the YE or NO relation.
  • EMAIL: The contact e-mail address. Must be used with the EQ, NE, GT, LT relation.
  • CUSTOM_FIELD: The selected custom field. Must be used with the EQ, NE, GT, LT, IN, NI, ST, EN relation.
  • IMPORT_FILE: The selected import file. Must be used with the IN or NI relation.
  • FORM_SUBSCRIBE: The id of the form the contact subscribed on. Must be used with the IN or NI relation.
  • LEAD_SCORE: The contact lead score. Must be used with the EQ, NE, GT, LT relation.
  • CONTACT_TAG: Contact with a given tag. Must be used with the IN or NI relation.
  • OPEN_TAG: Contact opened a campaign with a given tag. Must be used with the YE or NO relation.
  • CLICK_TAG: Contact clicked a campaign with a given tag. Must be used with the YE or NO relation.
  • SEGMENT_CONTAINS: Contact's relation to another segment. Must be used with the IN or NI relation.
  • LINK_CLICK: The contact clicked a given link. Must be used with the YE or NO relation.
  • CAMPAIGN_SENT: The contact received a given campaign. Must be used with the YE or NO relation.
  • UNBOUNCE_FORM_SUBSCRIBE: The contact subscribed from an unbounce form. Must be used with the IN or NI relation.
      conditions[x][y][relation] String Condition relation
  • LT: less than the given value
  • GT: greater than the given value
  • EQ: equals the given value
  • NE: doesn't equal the given value
  • IN: contains the given value
  • NI: doesn't contain the given value
  • YE: boolean true
  • NO: boolean false
  • ST: starts with the given value
  • EN: ends with the given value
      conditions[x][y][value] String Value based on the condition type is one of the following:
  • SUBSCRIBE_DATE: a date object (shown in example)
  • LAST_OPEN: a date object (shown in example)
  • OPENS_COUNT: a number
  • OPEN: id of the e-mail to check
  • CLICK: id of the link to check
  • EMAIL: a string
  • CUSTOM_FIELD: based on the custom field type it could be either a string, a number or a date object
  • IMPORT_FILE: id of the import file to check
  • FORM_SUBSCRIBE: id of the subscribe form
  • LEAD_SCORE: a number
  • CONTACT_TAG: tag name (string)
  • OPEN_TAG: tag name (string)
  • CLICK_TAG: tag name (string)
  • SEGMENT_CONTAINS: segment id
  • LINK_CLICK: link id
  • CAMPAIGN_SENT: campaign id
  • UNBOUNCE_FORM_SUBSCRIBE: unbounce form id
      conditions[x][y][customField]optional Integer If the type is CUSTOM_FIELD, you have to give its ID too.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/segments' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name": "New Segment",
    "conditions": [
        [
           {
                "type":"EMAIL",
                "relation":"IN",
                "value":"@gmail."
           },
           {
                "type":"CUSTOM_FIELD",
                "relation":"EQ",
                "value":"payed",
                "customField":13
           }
        ],
        [
            {
                "type":"CONTACT_TAG",
                "relation":"IN",
                "value":"test_tag"
            },
            {
                "type":"LEAD_SCORE",
                "relation":"GT",
                "value":1000
            }
        ]
    ]
 }'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/segments",
    data:{
        name: "New Segment",
        conditions: [
            [
               {
                    type:"EMAIL",
                    relation:"IN",
                    value:"@gmail."
               },
               {
                    type:"CUSTOM_FIELD",
                    relation:"EQ",
                    value:"payed",
                    customField:13
               }
            ],
            [
                {
                    type:"CONTACT_TAG",
                    relation:"IN",
                    value:"test_tag"
                },
                {
                    type:"LEAD_SCORE",
                    relation:"GT",
                    value:1000
                }
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.segments().insert({
    name: "New Segment",
    conditions: [
        [
           {
                type:"EMAIL",
                relation:"IN",
                value:"@gmail."
           },
           {
                type:"CUSTOM_FIELD",
                relation:"EQ",
                value:"payed",
                customField:13
           }
        ],
        [
            {
                type:"CONTACT_TAG",
                relation:"IN",
                value:"test_tag"
            },
            {
                type:"LEAD_SCORE",
                relation:"GT",
                value:1000
            }
        ]
    ]
}) //returns jqXHR
                
Success 200
Field Type Description
id Number The generated id of the new segment.
name String The name of the new segment.
createDate Object The exact time when the segment was created, plus timezone settings.
  createDate[date] String The exact time when the segment was created.
  createDate[timezone] String The name of the set timezone.
  createDate[timezone_type] Number
subscriberCount Number The number of contacts in the segment.
conditions Object[][] The same as at request conditions.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id":182,
	"name":"New segment",
	"createDate":{
		"date":"2016-01-13 10:38:04",
		"timezone_type":3,
		"timezone":"Europe\/Budapest"
	},
	"subscriberCount":0,
	"conditions":[
        [
           {
                "type":"EMAIL",
                "relation":"IN",
                "value":"@gmail."
           },
           {
                "type":"CUSTOM_FIELD",
                "relation":"EQ",
                "value":"payed",
                "customField":13
           }
        ],
        [
            {
                "type":"SUBSCRIBE_DATE",
                "relation":"GT",
                "value":{
                    "date":"2016-01-13 10:37:02",
                    "timezone_type":3,
                    "timezone":"Europe\/Budapest"
                }
            },
            {
                "type":"LEAD_SCORE",
                "relation":"GT",
                "value":1000
            }
        ]
    ],
	"_links":{
		"self":{
			"href":"https:\/\/api.automizy.com\/segments\/182"
		},
		"calculate":{
			"href":"https:\/\/api.automizy.com\/segments\/182\/calculate"
		},
		"contacts":{
			"href":"https:\/\/api.automizy.com\/segments\/182\/contacts"
		}
	}
}
                

Getting all segments

GET
https://api.automizy.com/segments
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
# Getting page 2 with 5 elements per page ordered by id:
$ curl 'https://api.automizy.com/segments?limit=5&page=2&order=id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Getting only the id from the entity with only self link:
$ curl 'https://api.automizy.com/segments?fields=id&links=none' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Getting the collection first ordered descending by name:
$ curl 'https://api.automizy.com/segments?order=name:desc' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#THIS CASE IS SHOWN IN THE RESPONSE
#Filtering the collection where name contains the word 'test'
$ curl 'https://api.automizy.com/segments?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
//THIS CASE IS SHOWN IN THE RESPONSE
//Filtering the collection where name contains the word 'test'
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/segments",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
//THIS CASE IS SHOWN IN THE RESPONSE
//Filtering the collection where name contains the word 'test'
$AA.segments().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[segments] Object[] Array containing the segments.
    _embedded[segments][x] Object[] Object containing data of segment.
      _embedded[segments][x][id] Number Id the new segment.
      _embedded[segments][x][name] String The name of the new segment.
      _embedded[segments][x][createDate] Object The exact time when the segment was created, plus timezone settings.
        _embedded[segments][x][createDate][date] String The exact time when the segment was created.
        _embedded[segments][x][createDate][timezone] String The name of the set timezone.
        _embedded[segments][x][createDate][timezone_type] Number
      _embedded[segments][x][subscriberCount] Number The number of contacts in the segment.
      _embedded[segments][x][conditions] Object[][] The same as if you created a segment.
      _embedded[segments][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/segments?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        },
        "first": {
            "href": "https:\/\/api.automizy.com\/segments?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25"
        },
        "last": {
            "href": "https:\/\/api.automizy.com\/segments?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        }
    },
    "_embedded": {
        "segments": [{
            "id": 20,
            "name": "TestSegment",
            "createDate": {
                "date": "2015-11-12 10:47:35",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "subscriberCount": 10,
            "conditions": [
                [{
                    "type": "EMAIL",
                    "relation": "IN",
                    "value": "@gmail"
                }]
            ],
            "_links": {
                "self": {
                    "href": "https:\/\/api.automizy.com\/segments\/20"
                },
                "calculate": {
                    "href": "https:\/\/api.automizy.com\/segments\/20\/calculate"
                },
                "contacts": {
                    "href": "https:\/\/api.automizy.com\/segments\/20\/contacts"
                }
            }
        }]
    },
    "page_count": 1,
    "page_size": 9223372036854775807, //there was no limit set
    "total_items": 1,
    "page": 1
}
                

Getting a given segment

GET
https://api.automizy.com/segments/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/segments/7' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/segments/7",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.segments().getRecordById(7) //returns jqXHR
                
Success 200
Field Type Description
id Number The generated id of the segment.
name String The name of the segment.
createDate Object The exact time when the segment was created, plus timezone settings.
  createDate[date] String The exact time when the segment was created.
  createDate[timezone] String The name of the set timezone.
  createDate[timezone_type] Number
subscriberCount Number The number of contacts in the segment.
conditions Object[][] The same as if you created a segment.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 7,
    "name": "Segment7",
    "createDate": {
        "date": "2015-11-10 11:45:45",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "subscriberCount": 6,
    "conditions": [
        [{
            "type": "IMPORT_FILE",
            "relation": "IN",
            "value": "19"
        }]
    ],
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/segments\/7"
        },
        "calculate": {
            "href": "https:\/\/api.automizy.com\/segments\/7\/calculate"
        },
        "contacts": {
            "href": "https:\/\/api.automizy.com\/segments\/7\/contacts"
        }
    }
}
                

Removing a segment

DELETE
https://api.automizy.com/segments/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/segments/7' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/segments/7",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.segments().delete(7) //returns jqXHR
                

Updating a given segment

PATCH
https://api.automizy.com/segments/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The new name of the segment.
conditionsoptional Object[][] Elements of array are condition groups separated with OR conditions
  conditions[x] Object[] Elements of array are conditions separated with AND condition
    conditions[x][y] Object A condition object.
      conditions[x][y][type] String Condition type
  • SUBSCRIBE_DATE: the date when the contact subscribed
  • LAST_OPEN: the date when the contact last opened the given e-mail(might be incorrect because of caching servers)
  • OPENS_COUNT: The number of times the user opened the e-mail(might be incorrect because of caching servers)
  • OPEN: Checks if the user opened the e-mail or not(must be used with the YE OR NO relation)
  • CLICK: Checks if the user clicked the given link(must be used with the YE or NO relation)
  • EMAIL: the contact e-mail address
  • CUSTOM_FIELD: the selected custom field
  • IMPORT_FILE: the selected import file
  • FORM_SUBSCRIBE: the id of the form the contact subscribed on
  • LEAD_SCORE: the contact lead score
      conditions[x][y][relation] String Condition relation
  • LT: less than the given value
  • GT: greater than the given value
  • EQ: equals the given value
  • NE: doesn't equal the given value
  • IN: contains the given value
  • NI: doesn't contain the given value
  • YE: boolean true
  • NO: boolean false
  • ST: starts with the given value
  • EN: ends with the given value
      conditions[x][y][value] String Value based on the condition type is one of the following:
  • SUBSCRIBE_DATE: a date object (shown in example)
  • LAST_OPEN: a date object (shown in example)
  • OPENS_COUNT: a number
  • OPEN: id of the e-mail to check
  • CLICK: id of the link to check
  • EMAIL: a string
  • CUSTOM_FIELD: based on the custom field type it could be either a string, a number or a date object
  • IMPORT_FILE: id of the import file to check
  • FORM_SUBSCRIBE: id of the subscribe form
  • LEAD_SCORE: a number
      conditions[x][y][customField]optional Integer If the type is CUSTOM_FIELD, you have to give its ID too.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/segments/7' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name": "Updated",
    "conditions": [
            [
               {
                    "type":"EMAIL",
                    "relation":"IN",
                    "value":"@gmail."
               },
               {
                    "type":"CUSTOM_FIELD",
                    "relation":"EQ",
                    "value":"payed",
                    "customField":13
               }
            ],
            [
               {
                    "type":"LEAD_SCORE",
                    "relation":"GT",
                    "value":1000
               }
            ]
        ]
 }'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/segments/7",
    data:{
        name: "Updated",
        conditions: [
            [
               {
                    type:"EMAIL",
                    relation:"IN",
                    value:"@gmail."
               },
               {
                    type:"CUSTOM_FIELD",
                    relation:"EQ",
                    value:"payed",
                    customField:13
               }
            ],
            [
               {
                    type:"LEAD_SCORE",
                    relation:"GT",
                    value:1000
               }
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.segments().update({
    name: "Updated",
    conditions: [
        [
           {
                type:"EMAIL",
                relation:"IN",
                value:"@gmail."
           },
           {
                type:"CUSTOM_FIELD",
                relation:"EQ",
                value:"payed",
                customField:13
           }
        ],
        [
           {
                type:"LEAD_SCORE",
                relation:"GT",
                value:1000
           }
        ]
    ]
}, 7) //returns jqXHR
                
Success 200
Field Type Description
id Number The generated id of the segment.
name String The name of the segment.
createDate Object The exact time when the segment was created, plus timezone settings.
  createDate[date] String The exact time when the segment was created.
  createDate[timezone] String The name of the set timezone.
  createDate[timezone_type] Number
subscriberCount Number The number of contacts in the segment.
conditions Object[][] The same as if you created a segment.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 7,
    "name": "Updated",
    "createDate": {
        "date": "2016-01-13 10:38:04",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "subscriberCount": 0,
    "conditions": [
        [{
            "type": "EMAIL",
            "relation": "IN",
            "value": "@gmail."
        }, {
            "type": "CUSTOM_FIELD",
            "relation": "EQ",
            "value": "payed",
            "customField": 62
        }],
        [{
            "type": "LEAD_SCORE",
            "relation": "GT",
            "value": 1000
        }]
    ],
    "_links": {
        "self": {
            "href": "https:\/\/api-dev.automizy.com\/segments\/7"
        },
        "calculate": {
            "href": "https:\/\/api-dev.automizy.com\/segments\/7\/calculate"
        },
        "contacts": {
            "href": "https:\/\/api-dev.automizy.com\/segments\/7\/contacts"
        }
    }
}
                

Newsletters

Newsletters are the concrete email you send to the segments.

Creating a new newsletter

POST
https://api.automizy.com/newsletters
Permission: Logged in user
Parameters
Field Type Description
name String Size range: 1..200
subjectoptional String Size range: ..200
tagsoptional String[] Array containing the tags.
attachmentsoptional Integer[] Array containing attachment IDs.
editorCodeoptional String The code that the editor uses to create the newsletter.
htmlCode String The html code of the new newsletter.
maxWidth Number Default value: 650
Size range: 1..
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/newsletters' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
{
    "maxWidth":800,
        "tags":[
            "test",
            "bananas"
        ],
        "attachments":[10],
        "name": "My first test newsletter",
        "subject": "Free Bananas",
        "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/newsletters",
    data:{
        "maxWidth":800,
        "tags":[
            "test",
            "bananas"
        ],
        "attachments":[10],
        "name": "My first test newsletter",
        "subject": "Free Bananas",
        "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.newsletters().insert({
    "maxWidth":800,
        "tags":[
            "test",
            "bananas"
        ],
        "attachments":[10],
        "name": "My first test newsletter",
        "subject": "Free Bananas",
        "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
}); //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new newsletter
name String The name of the new newsletter
subject String The subject of the new newsletter
editorCode String The code that the editor uses to create the newsletter.
htmlCode String The html code of the new newsletter
hasBackup Boolean The new newsletter has backup.
maxWidth Number The maximal width of the new newsletter
tags String[] Array containing the tags.
attachments Object[] Array containing the attachments.
_links Object Links to the related REST APIs
createDate Object The object containing data about when the new newsletter was created.
  createDate[date] String The exact time when the new newsletter was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
updateDate Object Object containing data about when the newsletter was updated last time.
lastSendTime Object Object containing data about when the newsletter was sent last time.
Response example
HTTP/1.1 200 OK
{
    "id": 42,
    "name": "My first test newsletter",
    "subject": "Free Bananas",
    "createDate": {
        "date": "2016-01-13 13:59:29",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "updateDate": null,
    "editorCode": null,
    "htmlCode": "\u003Chtml\u003E\u003Chead\u003E\u003C\/head\u003E\u003Cbody\u003E\u003Cb\u003ETEST\u003C\/b\u003E\u003C\/body\u003E\u003C\/html\u003E",
    "hasBackup": false,
    "maxWidth": "800",
    "lastSendTime": null,
    "tags": ["test", "bananas"],
    "attachments": [{
        "id": 10,
        "name": "keres\u00e9s.txt",
        "_links": {
            "self": {
                "href": "https:\/\/api.automizy.com\/emails\/attachments\/10"
            }
        }
    }],
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/newsletters\/42"
        }
    }
}
                

Getting a given newsletter

GET
https://api.automizy.com/newsletters/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/newsletters/5' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/newsletters/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.newsletters().getRecordById(5) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the newsletter
name String The name of the newsletter
subject String The subject of the newsletter
editorCode String The code that the editor uses to create the newsletter.
htmlCode String The html code of the newsletter
hasBackup Boolean The newsletter has backup.
maxWidth Number The maximal width of the newsletter
tags String[] Array containing the tags.
attachments Object[] Array containing the attachments.
_links Object Links to the related REST APIs
createDate Object The object containing data about when the newsletter was created.
  createDate[date] String The exact time when the newsletter was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
updateDate Object Object containing data about when the newsletter was updated last time.
lastSendTime Object Object containing data about when the newsletter was sent last time.
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "name": "My first test newsletter",
    "subject": "Free Bananas",
    "createDate": {
        "date": "2016-01-13 13:59:29",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "updateDate": null,
    "editorCode": null,
    "htmlCode": "\u003Chtml\u003E\u003Chead\u003E\u003C\/head\u003E\u003Cbody\u003E\u003Cb\u003ETEST\u003C\/b\u003E\u003C\/body\u003E\u003C\/html\u003E",
    "hasBackup": false,
    "maxWidth": "800",
    "lastSendTime": null,
    "tags": ["test", "bananas"],
    "attachments": [{
        "id": 10,
        "name": "keres\u00e9s.txt",
        "_links": {
            "self": {
                "href": "https:\/\/api.automizy.com\/emails\/attachments\/10"
            }
        }
    }],
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/newsletters\/5"
        }
    }
}
                

Getting all newsletters

GET
https://api.automizy.com/newsletters
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/newsletters?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/newsletters",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.newsletters().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[newsletters] Object[] Array containing the newsletters.
    _embedded[newsletters][x] Object[] Object containing data of the newsletter.
      _embedded[newsletters][x][id] Number The id of the newsletter
      _embedded[newsletters][x][name] String The name of the newsletter
      _embedded[newsletters][x][subject] String The subject of the newsletter
      _embedded[newsletters][x][editorCode] String The code that the editor uses to create the newsletter.
      _embedded[newsletters][x][htmlCode] String The html code of the newsletter
      _embedded[newsletters][x][hasBackup] Boolean The newsletter has backup.
      _embedded[newsletters][x][maxWidth] Number The maximal width of the newsletter
      _embedded[newsletters][x][tags] String[] Array containing the tags.
      _embedded[newsletters][x][attachments] Object[] Array containing the attachments.
      _embedded[newsletters][x][_links] Object Links to the related REST APIs
      _embedded[newsletters][x][createDate] Object The object containing data about when the newsletter was created.
        _embedded[newsletters][x][createDate][date] String The exact time when the newsletter was created.
        _embedded[newsletters][x][createDate][timezone] String The timezone of the user.
        _embedded[newsletters][x][createDate][timezone_type] Number
      _embedded[newsletters][x][updateDate] Object Object containing data about when the newsletter was updated last time.
      _embedded[newsletters][x][lastSendTime] Object Object containing data about when the newsletter was sent last time.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/newsletters?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        },
        "first": {
            "href": "https:\/\/api.automizy.com\/newsletters?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25"
        },
        "last": {
            "href": "https:\/\/api.automizy.com\/newsletters?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        }
    },
    "_embedded": {
        "newsletters": [{
            "id": 39,
            "name": "My first test newsletter",
            "subject": "Free Bananas",
            "createDate": {
                "date": "2016-01-13 13:51:48",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "updateDate": {
                "date": "2016-01-13 13:51:48",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "editorCode": null,
            "htmlCode": "\u0026lt;html\u003E\u0026lt;head\u003E\u0026lt;\/head\u003E\u0026lt;body\u003E\u0026lt;b\u003ETEST\u0026lt;\/b\u003E\u0026lt;\/body\u003E\u0026lt;\/html\u003E",
            "hasBackup": false,
            "maxWidth": 800,
            "lastSendTime": null,
            "tags": ["bananas", "test"],
            "attachments": [],
            "_links": {
                "self": {
                    "href": "https:\/\/api.automizy.com\/newsletters\/39"
                }
            }
        }]
    },
    "page_count": 1,
    "page_size": 9223372036854775807,
    "total_items": 1,
    "page": 1
}
                

Removing a given newsletter

DELETE
https://api.automizy.com/newsletters/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/newsletters/5' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/newsletters/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.newsletters().delete(5) //returns jqXHR
                

Updating a given newsletter

PATCH
https://api.automizy.com/newsletters/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String Size range: 1..200
subjectoptional String Size range: ..200
tagsoptional String[] Array containing the tags.
attachmentsoptional Integer[] Array containing attachment IDs.
editorCodeoptional String The updated editor code.
htmlCodeoptional String The updated html code.
maxWidthoptional Number Default value: 650
Size range: 1..
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/newsletters/5' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "subject": "Free Apples",
        "tags:" null
 }'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/newsletters/5",
    data:{
        "subject": "Free Apples",
        "tags:" null
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.newsletters().update({
    "subject": "Free Apples",
    "tags:" null
}, 5) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the newsletter
name String The name of the newsletter
subject String The subject of the newsletter
editorCode String The code that the editor uses to create the newsletter.
htmlCode String The html code of the newsletter
hasBackup Boolean The newsletter has backup.
maxWidth Number The maximal width of the newsletter
tags String[] Array containing the tags.
attachments Object[] Array containing the attachments.
_links Object Links to the related REST APIs
createDate Object The object containing data about when the newsletter was created.
  createDate[date] String The exact time when the newsletter was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
updateDate Object Object containing data about when the newsletter was updated last time.
lastSendTime Object Object containing data about when the newsletter was sent last time.
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "name": "My first test newsletter",
    "subject": "Free Apples",
    "createDate": {
        "date": "2016-01-13 13:59:29",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "updateDate": {
        "date": "2016-01-13 14:20:21",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "editorCode": null,
    "htmlCode": "\u003Chtml\u003E\u003Chead\u003E\u003C\/head\u003E\u003Cbody\u003E\u003Cb\u003ETEST\u003C\/b\u003E\u003C\/body\u003E\u003C\/html\u003E",
    "hasBackup": false,
    "maxWidth": "800",
    "lastSendTime": null,
    "tags": [],
    "attachments": [{
        "id": 10,
        "name": "keres\u00e9s.txt",
        "_links": {
            "self": {
                "href": "https:\/\/api.automizy.com\/emails\/attachments\/10"
            }
        }
    }],
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/newsletters\/5"
        }
    }
}
                

Contacts

Contacts are the people, email addresses you order into segments and send your campaigns to. Each contact can be ordered to more segments.

Creating a new contact

POST
https://api.automizy.com/contacts
Permission: Logged in user
Parameters
Field Type Description
email String The email address of the contact.
confirmationStatus String Allowed values:
CONFIRMED, NOT_CONFIRMED
status String If the status of the contact is BANNED, then it cannot be edited. If you want to edit a BANNED contact, you have to delete it from the system, and add it as a new contact with ACTIVE status.
Default value: ACTIVE
Allowed values: ACTIVE, INACTIVE, BOUNCED, UNSUBSCRIBED, BANNED
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
Allowed formats for different types of custom fields:
  • STRING: Custom text.
  • INTEGER: Custom integer.
  • DATETIME: String in the following format: yyyy-MM-dd hh:mm:ss.
  • MULTIPLE_CHOICES: Array of the selected option IDs.
fixSegments Integer[] Id of the fix segments.
Contact will be on these segments regardless of the segment conditions.
tags String[] The tags you want to add to the contact.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/contacts' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
{
    "email":"testuser@example.com",
    "status":"ACTIVE",
    "customFields":{
        "birthday":"1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "fixSegments": [2]
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/contacts",
    data:{
        "email":"testuser@example.com",
        "status":"ACTIVE",
        "customFields":{
            "birthday":"1989-03-03 00:00:00",
            "hobbies":[56,58]
        },
        "fixSegments": [2]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.contacts().insert({
    "email":"testuser@example.com",
    "status":"ACTIVE",
    "customFields":{
        "birthday":"1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "fixSegments": [2]
});
                
Success 200
Field Type Description
id Number The id of the new contact.
email String The email address of the new contact.
status String The status of the new contact.
confirmedStatus String Shows that the contact is confirmed or not.
confirmDate Object Contains the date when the contact accepted the subscription plus timezone info.
  confirmDate[date] String The exact time when the confrimation happened.
  confirmDate[timezone] String The contact's timezone.
  confirmDate[timezone_type] Number
confirmIp String The IP address of the client.
requestDate Object Contains the date when the contact got the subscription requiest, plus timezone info.
requestIp String The IP address of the client.
unsubscribeDate Object Contains the date when the contact unsubscribed, plus timezone info.
leadScore Integer[] Object containing lead score data.
  leadScore[total] Integer
  leadScore[score] Array
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
fixSegments Object Id as key and name as value of the fix segments.
tags String[] The tags on the contact.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@example.com",
    "status": "ACTIVE",
    "confirmedStatus": "CONFIRMED",
    "confirmDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "confirmIp": null,
    "requestDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": {
        "total": 0,
        "scores": []
    },
    "fixSegments": {
        "2": "Test segment"
    },
    "tags":[],
    "customFields": {
        "name": null,
        "gender": null,
        "birthday": "1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/contacts\/5"
        }
    }
}
                

Getting all contacts

GET
https://api.automizy.com/contacts
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where email ends with "@example.com":
$ curl 'https://api.automizy.com/contacts?where%5B0%5D%5B0%5D%5B0%5D=email&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%@example.com' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/contacts",
    data:{
        where:[
            [
                ["email", "like", "%@example.com"]
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.contacts().where([
        [
            ["email", "like", "%@example.com"]
        ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[contacts] Object[] Array containing the contacts.
    _embedded[contacts][x] Object[] Object containing data of contact.
    _embedded[contacts][x][id] Number The id of the contact.
    _embedded[contacts][x][email] String The email address of the contact.
    _embedded[contacts][x][status] String The status of the contact.
    _embedded[contacts][x][confirmedStatus] String Shows that the contact is confirmed or not.
    _embedded[contacts][x][confirmDate] Object Contains the date when the contact accepted the subscription plus timezone info.
      _embedded[contacts][x][confirmDate][date] String The exact time when the confrimation happened.
      _embedded[contacts][x][confirmDate][timezone] String The contact's timezone.
      _embedded[contacts][x][confirmDate][timezone_type] Number
    _embedded[contacts][x][confirmIp] String The IP address of the client.
    _embedded[contacts][x][requestDate] Object Contains the date when the contact got the subscription requiest, plus timezone info.
    _embedded[contacts][x][requestIp] String The IP address of the client.
    _embedded[contacts][x][unsubscribeDate] Object Contains the date when the contact unsubscribed, plus timezone info.
    _embedded[contacts][x][leadScore] Integer[] Object containing lead score data.
      _embedded[contacts][x][leadScore][total] Integer
      _embedded[contacts][x][leadScore][score] Array
    _embedded[contacts][x][customFields] Object Object containing custom fields.
      _embedded[contacts][x][customFields][x] String/Array Object containing data of a custom field.
    _embedded[contacts][x][fixSegments] Object Id as key and name as value of the fix segments.
    _embedded[contacts][x]tags String[] The tags on the contact.
    _embedded[contacts][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/contacts?where%5B0%5D%5B0%5D%5B0%5D=email\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25@example.com\u0026page=1"
        },
        "first": {
            "href": "https:\/\/api.automizy.com\/contacts?where%5B0%5D%5B0%5D%5B0%5D=email\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25@example.com"
        },
        "last": {
            "href": "https:\/\/api.automizy.com\/contacts?where%5B0%5D%5B0%5D%5B0%5D=email\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25@example.com\u0026page=1"
        }
    },
    "_embedded": {
        "contacts": [{
            "id": 5,
            "email": "testuser@example.com",
            "status": "ACTIVE",
            "confirmedStatus": "CONFIRMED",
            "confirmDate": {
                "date": "2016-01-15 11:49:38",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "confirmIp": null,
            "requestDate": {
                "date": "2016-01-15 11:49:38",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "requestIp": null,
            "unsubscribeDate": null,
            "leadScore": {
                "total": 0,
                "scores": []
            },
            "fixSegments": {
                "2": "Test segment"
            },
            "tags":[],
            "customFields": {
                "name": null,
                "gender": null,
                "birthday": "1989-03-03 00:00:00",
                "hobbies":[56,58]
            },
            "_links": {
                "self": {
                    "href": "https:\/\/api.automizy.com\/contacts\/5"
                }
            }
        }]
    },
    "page_count": 1,
    "page_size": 1000,
    "total_items": 1,
    "page": 1
}
                

Getting a given contact

GET
https://api.automizy.com/contacts/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/contacts/5' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/contacts/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.contacts().getRecordById(5) //returns jqXHR
                
Success 200
Field Type Description
id String The 'id' parameter in the API url.
You can also use the email address of the user as id.
id Number The id of the contact.
email String The email address of the contact.
status String The status of the contact.
confirmedStatus String Shows that the contact is confirmed or not.
confirmDate Object Contains the date when the contact accepted the subscription plus timezone info.
  confirmDate[date] String The exact time when the confrimation happened.
  confirmDate[timezone] String The contact's timezone.
  confirmDate[timezone_type] Number
confirmIp String The IP address of the client.
requestDate Object Contains the date when the contact got the subscription requiest, plus timezone info.
requestIp String The IP address of the client.
unsubscribeDate Object Contains the date when the contact unsubscribed, plus timezone info.
leadScore Integer[] Object containing lead score data.
  leadScore[total] Integer
  leadScore[score] Array
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
fixSegments Object Id as key and name as value of the fix segments.
tags String[] The tags on the contact.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@example.com",
    "status": "ACTIVE",
    "confirmedStatus": "CONFIRMED",
    "confirmDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "confirmIp": null,
    "requestDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": {
        "total": 0,
        "scores": []
    },
    "fixSegments": {
        "2": "Test segment"
    },
    "tags":[],
    "customFields": {
        "name": null,
        "gender": null,
        "birthday": "1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/contacts\/5"
        }
    }
}
                

IMPORT - STEP 1 - Analyze import file

If you want to import contacts, you'd preferably use a CSV file. The system reads the file and analyzes the headers, gives the import and ID which can be used for a certain time. You have to make a POST request to the given url, using 'multipart/form-data' content type, and upload the CSV file to our server.
POST
https://api.automizy.com/contacts/analyze-import
Permission: Logged in user
curl
curl https://api.automizy.com/contacts/analyze-import -X POST -H 'Accept: application/json' -H 'Content-Type: multipart/form-data' -H 'Authorization: Bearer <ACCESS TOKEN>' -F 'import=@/tmp/file.csv'
                
Success 200
Field Type Description
headers String[] The heads of the file you use for the import.
importId String The generated id of the new import.
aliveUntil Object Contains data about the lifetime of the import.
  aliveUntil[date] String The exact time when the import expires.
  aliveUntil[timezone] String The timezone of the user.
  aliveUntil[timezone_type] Number
Response example
HTTP/1.1 200 OK
{
   "headers": ["email", "name", "birthday"],
   "importId": "3.232",
   "aliveUntil": {
       "date": "2015-03-31 17:15:34",
       "timezone": "Europe/Budapest",
       "timezone_type": 3
   },
}
                

IMPORT - STEP 2 - Begin import

After the analyzation is ready, and you've set the headers, you can start importing your contacts.
POST
https://api.automizy.com/contacts/run-import
Permission: Logged in user
Parameters
Field Type Description
importId String The import id given by /contacts/rpc/analyze-import
fields Array The array containing the fields from the import file assigned to fields in the software.
  fields[x] Object This object contains the field data.
    fields[x][type] String Type of the imported field.
Allowed values: email, status, isConfirmed, customField
    fields[x][operator] String Allowed values: override
    fields[x][id] Integer If the field is a custom field, then it's the custom field ID, else it has to be null.
override Boolean If a contact you want to import is already in the software, the older one will be overwritten if you set this parameter true.
create Boolean Always has to be true
waitForResponse Boolean false by default.
If set to true, response will be sent only when the import finishes.
addContactTags Array The array containing the tags to add to the imported contacts.
removeContactTags Array The array containing the tags to remove from the imported contacts.
curl
jQuery
$ curl 'https://api.automizy.com/contacts/run-import' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
{
    "importId": 3.235,
    "override": false,
    "fields": [
        {
            "type": "customField",
            "operator": "override",
            "id": 76
        }
        {
            "id": null,
            "type": "email",
            "operator": "override"
        },
        {
            "id": null,
            "type": "status",
            "operator": "override"
        },
        {
            "id": null,
            "type": "isConfirmed",
            "operator": "override"
        }
    ],
    "create": true,
    "addContactTags":["tag1", "tag2"]
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/contacts/run-import",
    data: {
        "importId": 3.235,
        "override": false,
        "fields": [
            {
                "type": "customField",
                "operator": "override",
                "id": 76
            }
            {
                "id": null,
                "type": "email",
                "operator": "override"
            },
            {
                "id": null,
                "type": "status",
                "operator": "override"
            },
            {
                "id": null,
                "type": "isConfirmed",
                "operator": "override"
            }
        ],
        "create": true,
        "addContactTags":["tag1", "tag2"]
    },
    headers: {
        Authorization: 'Bearer ' + window.accessToken
    },
    success: function(data) {
        console.log(data)
    }
});
                
Success 200
Field Type Description
importId String The generated id of the import.
analyzeId String The generated id of the analyzation.
Response example
HTTP/1.1 200 OK
{
    "importId": "235",
    "analyzeId: "3.235"
}
                

Removing a given contact

DELETE
https://api.automizy.com/contacts/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/contacts/5' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/contacts/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.contacts().delete(5) //returns jqXHR
                

Updating a given contact

PATCH
https://api.automizy.com/contacts/:id
Permission: Logged in user
Parameters
Field Type Description
id String The 'id' parameter in the API url.
You can also use the email address of the user as id.
email String The email address of the contact.
confirmationStatus String Allowed values:
CONFIRMED, NOT_CONFIRMED
status String If the status of the contact is BANNED, then it cannot be edited. If you want to edit a BANNED contact, you have to delete it from the system, and add it as a new contact with ACTIVE status.
Default value: ACTIVE
Allowed values: ACTIVE, INACTIVE, BOUNCED, UNSUBSCRIBED, BANNED
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
Allowed formats for different types of custom fields:
  • STRING: Custom text.
  • INTEGER: Custom integer.
  • DATETIME: String in the following format: yyyy-MM-dd hh:mm:ss.
  • MULTIPLE_CHOICES: Array of the selected option IDs.
fixSegments Integer[] Id of the fix segments.
Contact will be on these segments regardless of the segment conditions.
addTags String[] The tags you want to add to the contact.
removeTags String[] The tags you want to remove from the contact.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/contacts/5' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
                    -d '
{
    "email":"testuser@example.com",
    "status":"ACTIVE",
    "confirmationStatus": "CONFIRMED",
    "customFields":{
        "birthday":"1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "fixSegments": [2],
    "addTags": ["abc", "dfe"],
    "removeTags": ["wasd"]
}'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/contacts/5",
    data:{
        "email":"testuser@example.com",
        "status":"ACTIVE",
        "confirmationStatus": "CONFIRMED",
        "customFields":{
            "birthday":"1989-03-03 00:00:00",
            "hobbies":[56,58]
        },
        "fixSegments": [2],
        "addTags": ["abc", "dfe"],
        "removeTags": ["wasd"]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.contacts().update({
    "email":"testuser@example.com",
    "status":"ACTIVE",
    "confirmationStatus": "CONFIRMED",
    "customFields":{
        "birthday":"1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "fixSegments": [2]
    "addTags": ["abc", "dfe"],
    "removeTags": ["wasd"]
},5);
                
Success 200
Field Type Description
id Number The id of the new contact.
email String The email address of the new contact.
status String The status of the new contact.
confirmedStatus String Shows that the contact is confirmed or not.
confirmDate Object Contains the date when the contact accepted the subscription plus timezone info.
  confirmDate[date] String The exact time when the confrimation happened.
  confirmDate[timezone] String The contact's timezone.
  confirmDate[timezone_type] Number
confirmIp String The IP address of the client.
requestDate Object Contains the date when the contact got the subscription requiest, plus timezone info.
requestIp String The IP address of the client.
unsubscribeDate Object Contains the date when the contact unsubscribed, plus timezone info.
leadScore Integer[] Object containing lead score data.
  leadScore[total] Integer
  leadScore[score] Array
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
fixSegments Object Id as key and name as value of the fix segments.
tags String[] The tags on the contact.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@example.com",
    "status": "ACTIVE",
    "confirmedStatus": "CONFIRMED",
    "confirmDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "confirmIp": null,
    "requestDate": {
        "date": "2016-01-15 11:49:38",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": {
        "total": 0,
        "scores": []
    },
    "fixSegments": {
        "2": "Test segment"
    },
    "tags": [
        "abc",
        "dfe"
    ],
    "customFields": {
        "name": null,
        "gender": null,
        "birthday": "1989-03-03 00:00:00",
        "hobbies":[56,58]
    },
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/contacts\/5"
        }
    }
}
                

Custom fields

Custom fields can provide you with more information about your contact, like age, gender, etc.

Creating a new custom field

POST
https://api.automizy.com/custom-fields
Permission: Logged in user
Parameters
Field Type Description
name String The name of the new custom field.
type String Allowed values: STRING, INTEGER, DATETIME, MULTIPLE_CHOICES
defaultValueoptional String You can give a default value to each custom field. Use it for STRING, INTEGER or DATETIME custom fields only.
If you create a MULTIPLE_CHOICES type custom field, use the options to set the default values as shown in the example, in that case don't use this parameter.
choicesoptional Object[] The list of options, nly used by MULTIPLE_CHOICES custom fields.
  choices[x]optional Object OEach element of choices represents an option.
    choices[x][id] Integer The id of the option.
When creating a new custom field it must be null.
    choices[x][value] String The option name.
    choices[x][isDefault] Boolean true if you want this option be checked by default.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/custom-fields' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
	"name":"Multiple choices",
	"type":"MULTIPLE_CHOICES",
	"choices": [
		{
			"id": null,
			"value": "Option 1",
			"isDefault": true
		},
		{
			"id": null,
			"value": "Option 2",
			"isDefault": false
		},
		{
			"id": null,
			"value": "Option 3",
			"isDefault": true
		}
	]
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/custom-fields",
    data:{
        "name":"Multiple choices",
        "type":"MULTIPLE_CHOICES",
        "choices": [
            {
                "id": null,
                "value": "Option 1",
                "isDefault": true
            },
            {
                "id": null,
                "value": "Option 2",
                "isDefault": false
            },
            {
                "id": null,
                "value": "Option 3",
                "isDefault": true
            }
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.customFields().insert({
	"name":"Multiple choices",
	"type":"MULTIPLE_CHOICES",
	"choices": [
		{
			"id": null,
			"value": "Option 1",
			"isDefault": true
		},
		{
			"id": null,
			"value": "Option 2",
			"isDefault": false
		},
		{
			"id": null,
			"value": "Option 3",
			"isDefault": true
		}
	]
});
                
Success 200
Field Type Description
id Number The id of the new custom field.
name String The name of the new custom field.
data String/Object If type is STRING, INTEGER or DATETIME:
String, the default value of the new custom field.

If type is MULTIPLE_COICES:
Object, whose keys are option IDs, and values are option data, as shown below, in the example.
type String The type of the new custom field.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 83,
    "name": "multiple choices",
    "data": {
        "159": {
            "value": "Option 1",
            "isDefault": true
        },
        "160": {
            "value": "Option 2",
            "isDefault": false
        },
        "161": {
            "value": "Option 3",
            "isDefault": true
        }
    },
    "type": "MULTIPLE_CHOICES",
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/custom-fields\/83"
        }
    }
}
                

Getting all custom fields

GET
https://api.automizy.com/custom-fields
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/custom-fields?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/custom-fields",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.customFields().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[customFields] Object[] Array containing the custom fields.
    _embedded[customFields][x] Object[] Object containing data of custom fields.
    _embedded[customFields][x][id] Number The id of the custom field.
    _embedded[customFields][x][name] String The name of the new custom field.
    _embedded[customFields][x][data] String/Object If type is STRING, INTEGER or DATETIME:
String, the default value of the new custom field.

If type is MULTIPLE_COICES:
Object, whose keys are option IDs, and values are option data, as shown below, in the example.
    _embedded[customFields][x][type] String The type of the new custom field.
    _embedded[customFields][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/custom-fields?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        },
        "first": {
            "href": "https:\/\/api.automizy.com\/custom-fields?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25"
        },
        "last": {
            "href": "https:\/\/api.automizy.com\/custom-fields?where%5B0%5D%5B0%5D%5B0%5D=name\u0026where%5B0%5D%5B0%5D%5B1%5D=like\u0026where%5B0%5D%5B0%5D%5B2%5D=%25test%25\u0026page=1"
        }
    },
    "_embedded": {
        "customFields": [{
            "id": 84,
            "name": "multiple choices test",
            "data": {
                "162": {
                    "value": "Option 1",
                    "isDefault": true
                },
                "163": {
                    "value": "Option 2",
                    "isDefault": false
                },
                "164": {
                    "value": "Option 3",
                    "isDefault": true
                }
            },
            "maxSelectionCount": -1,
            "type": "MULTIPLE_CHOICES",
            "_links": {
                "self": {
                    "href": "https:\/\/api.automizy.com\/custom-fields\/84"
                }
            }
        }, {
            "id": 85,
            "name": "text test",
            "data": "test",
            "type": "STRING",
            "_links": {
                "self": {
                    "href": "https:\/\/api.automizy.com\/custom-fields\/85"
                }
            }
        }]
    },
    "page_count": 1,
    "page_size": 9223372036854775807,
    "total_items": 2,
    "page": 1
}
                

Getting a given custom field

GET
https://api.automizy.com/custom-fields/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/custom-fields/83' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/custom-fields/83",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.customFields().getRecordById(83) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new custom field.
name String The name of the new custom field.
data String/Object If type is STRING, INTEGER or DATETIME:
String, the default value of the new custom field.

If type is MULTIPLE_COICES:
Object, whose keys are option IDs, and values are option data, as shown below, in the example.
type String The type of the new custom field.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 83,
    "name": "multiple choices",
    "data": {
        "159": {
            "value": "Option 1",
            "isDefault": true
        },
        "160": {
            "value": "Option 2",
            "isDefault": false
        },
        "161": {
            "value": "Option 3",
            "isDefault": true
        }
    },
    "type": "MULTIPLE_CHOICES",
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/custom-fields\/83"
        }
    }
}
                

Removing a given custom field

DELETE
https://api.automizy.com/custom-fields/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/custom-fields/5' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/custom-fields/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.customFields().delete(5) //returns jqXHR
                

Updating a given custom field

Please note, that you can't change the type of the custom field.
PATCH
https://api.automizy.com/custom-fields/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The new name of the custom field.
defaultValueoptional String You can give a default value to each custom field. Use it for STRING, INTEGER or DATETIME custom fields only.
If you create a MULTIPLE_CHOICES type custom field, use the options to set the default values as shown in the example, in that case don't use this parameter.
choicesoptional Object[] The list of options, nly used by MULTIPLE_CHOICES custom fields.
  choices[x]optional Object OEach element of choices represents an option.
    choices[x][id] Integer The id of the option.
defaultValueoptional String You can give a default value to each custom field. Use it for STRING, INTEGER or DATETIME custom fields only.
If you create a MULTIPLE_CHOICES type custom field, use the options to set the default values as shown in the example, in that case don't use this parameter.
choicesoptional Object[] The list of options, nly used by MULTIPLE_CHOICES custom fields.
  choices[x]optional Object OEach element of choices represents an option.
    choices[x][id] Integer The id of the option.
If you want to add a new option leave it null.
    choices[x][value] String The option name.
    choices[x][isDefault] Boolean true if you want this option be checked by default.
    choices[x][value] String The option name.
    choices[x][isDefault] Boolean true if you want this option be checked by default.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/segments/83' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name":"Options",
    "choices": [
        {
            "id": 159,
            "value": "Option 1",
            "isDefault": true
        },
        {
            "id": 160,
            "value": "Option 2",
            "isDefault": false
        },
        {
            "id": 161,
            "value": "Option 3",
            "isDefault": false
        },
        {
            "id": null,
            "value": "Option 4",
            "isDefault": true
        }
    ]
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/custom-fields/83",
    data:{
    "name":"Options",
    "choices": [
        {
            "id": 159,
            "value": "Option 1",
            "isDefault": true
        },
        {
            "id": 160,
            "value": "Option 2",
            "isDefault": false
        },
        {
            "id": 161,
            "value": "Option 3",
            "isDefault": false
        },
        {
            "id": null,
            "value": "Option 4",
            "isDefault": true
        }
    ]
},
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.customFields().update({
    "name":"Options",
    "choices": [
        {
            "id": 159,
            "value": "Option 1",
            "isDefault": true
        },
        {
            "id": 160,
            "value": "Option 2",
            "isDefault": false
        },
        {
            "id": 161,
            "value": "Option 3",
            "isDefault": false
        },
        {
            "id": null,
            "value": "Option 4",
            "isDefault": true
        }
    ]
}, 83) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new custom field.
name String The name of the new custom field.
data String/Object If type is STRING, INTEGER or DATETIME:
String, the default value of the new custom field.

If type is MULTIPLE_COICES:
Object, whose keys are option IDs, and values are option data, as shown below, in the example.
type String The type of the new custom field.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 83,
    "name": "options",
    "data": {
        "159": {
            "value": "Option 1",
            "isDefault": true
        },
        "160": {
            "value": "Option 2",
            "isDefault": false
        },
        "161": {
            "value": "Option 3",
            "isDefault": false
        },
        "162": {
            "value": "Option 4",
            "isDefault": true
        }
    },
    "type": "MULTIPLE_CHOICES",
    "_links": {
        "self": {
            "href": "https:\/\/api.automizy.com\/custom-fields\/83"
        }
    }
}
                

Email campaigns

Email campaigns are newsletters assigned and sent to segments.

Getting a given email campaign

GET
https://api.automizy.com/campaigns/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/campaigns/7'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/campaigns/7",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.campaigns().getRecordById(7) //return jqXHR
                
Success 200
Field Type Description
id Number The id of the campaign.
name String The name of the campaign.
embedImages Boolean True, if you want to show embed images in the email.
sendFromName String The sender name your contact will see in the email.
sendFromEmail String The sender email address your contact will see in the email.
replyToEmail String If a contact send a reply, it will be sent to this address.
subject String The subject of the email.
htmlCode String The html code of the email.
sendTime Object The object containing data about when the campaign will be sent.
  sendTime[date] String The exact time when the campaign will be sent.
  sendTime[timezone] String The timezone of the user.
  sendTime[timezone_type] Number
finishedTime Object The object containing data about when the sending process finshed.
  finishedTime[date] String The exact time when the sending process finshed.
  finishedTime[timezone] String The timezone of the user.
  finishedTime[timezone_type] Number
segments Object[] The array of segments you want to send the email to.
clicks Number Show how much click were on the link in your email.
opens Number Shows how many times was the email opened.
unsubscribes Number Shows how many contacts unsubscribed from this email.
status String The status of the campaing.
Values: SCHEDULED, RUNNING, PAUSED, FINISHED, CANCELED, ERROR, SCHEDULED_PAUSED, CONTACT_LIMIT_REACHED, EMAIL_LIMIT_REACHED
notificationEmail String The email address you want the notifications to be sent to.
tags String[] Array containing the tags.
links Object[] Array containing the campaigns links.
(Unsubsribe link, webversion link etc).
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id": 1,
	"name": "My E-mail Campaign",
	"embedImages": false,
	"sendFromName": "Automizy Admin",
	"sendFromEmail": "admin@automizy.com",
	"replyToEmail": "admin@automizy.com",
	"subject": "My first campaign",
	"htmlCode": "\u003C!DOCTYPE\u003E\u003Chtml.../html\u003E",
	"sendTime":
	{
		"date": "2016-01-28 16:40:57",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"finishedTime":
	{
		"date": "2016-01-28 16:41:00",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"segments": [
	{
		"id": 184,
		"filterType": "COMBINED",
		"name": "Test - 10",
		"createDate":
		{
			"date": "2016-01-18 16:05:44",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"subscriberCount": 10,
		"contactCount": 10,
		"contactLimit": 0,
		"conditions": [
			[
			{
				"type": "IMPORT_FILE",
				"relation": "IN",
				"value": "256"
			}]
		],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184"
			},
			"calculate":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/calculate"
			},
			"contacts":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/contacts"
			}
		}
	}],
	"clicks": 4,
	"opens": 3,
    "unsubscribes":0,
	"status": "FINISHED",
	"notificationEmail": "",
	"job":
	{
		"id": 1649,
		"name": "My E-mail Campaign",
		"progressCurrent": 10,
		"progressMax": 10,
		"started":
		{
			"date": "2016-01-28 16:40:57",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"finished":
		{
			"date": "2016-01-28 16:41:00",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"status": "FINISHED",
		"visibleUntil":
		{
			"date": "2016-01-28 16:51:00",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"type": "CAMPAIGN_SEND",
		"referenceId": 163,
		"parent": null,
		"isStoppable": false,
		"isPausable": false,
		"children": [],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/jobs\/1649"
			}
		}
	},
	"links": [
	{
		"id": "1695",
		"url": "https:\/\/automizy.com",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1695"
			}
		}
	},
	{
		"id": "1697",
		"url": "[{webversion}]",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1697"
			}
		}
	}],
	"tags": [],
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/campaigns\/1"
		}
	}
}
                

Getting all email campaigns

GET
https://api.automizy.com/campaigns
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/campaigns?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/campaigns",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[campaigns] Object[] Array containing the campaigns.
    _embedded[campaigns][x] Object[] Object containing data of a campaign.
      _embedded[campaigns][x][id] Number The id of the campaign.
      _embedded[campaigns][x][name] String The name of the campaign.
      _embedded[campaigns][x][embedImages] Boolean True, if you want to show embed images in the email.
      _embedded[campaigns][x][sendFromName] String The sender name your contact will see in the email.
      _embedded[campaigns][x][sendFromEmail] String The sender email address your contact will see in the email.
      _embedded[campaigns][x][replyToEmail] String If a contact send a reply, it will be sent to this address.
      _embedded[campaigns][x][subject] String The subject of the email.
      _embedded[campaigns][x][htmlCode] String The html code of the email.
      _embedded[campaigns][x][sendTime] Object The object containing data about when the campaign will be sent.
        _embedded[campaigns][x][sendTime][date] String The exact time when the campaign will be sent.
        _embedded[campaigns][x][sendTime][timezone] String The timezone of the user.
        _embedded[campaigns][x][sendTime][timezone_type] Number
      _embedded[campaigns][x][finishedTime] Object The object containing data about when the sending process finshed.
        _embedded[campaigns][x][finishedTime][date] String The exact time when the sending process finshed.
        _embedded[campaigns][x][finishedTime][timezone] String The timezone of the user.
        _embedded[campaigns][x][finishedTime][timezone_type] Number
      _embedded[campaigns][x][segments] Object[] The array of segments you want to send the email to.
      _embedded[campaigns][x][clicks] Number Show how much click were on the link in your email.
      _embedded[campaigns][x][opens] Number Shows how many times was the email opened.
      _embedded[campaigns][x][unsubscribes] Number Shows how many contacts unsubscribed from this email.
      _embedded[campaigns][x][status] String The status of the campaing.
      _embedded[campaigns][x][notificationEmail] String The email address you want the notifications to be sent to.
      _embedded[campaigns][x][tags] String[] Array containing the tags.
      _embedded[campaigns][x][links] Object[] Array containing the campaigns links.
(Unsubsribe link, webversion link etc).
      _embedded[campaigns][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
                    {
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/campaigns?where[0][0][0]=name\u0026where[0][0][1]=like\u0026where[0][0][2]=%test%"
		}
	},
	"_embedded":
	{
		"campaigns": [{
            "id": 2,
            "name": "My Test Campaign",
            "embedImages": false,
            "sendFromName": "Automizy Admin",
            "sendFromEmail": "admin@automizy.com",
            "replyToEmail": "admin@automizy.com",
            "subject": "My first campaign",
            "htmlCode": "\u003C!DOCTYPE\u003E\u003Chtml.../html\u003E",
            "sendTime":
            {
                "date": "2016-01-28 16:40:57",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "finishedTime":
            {
                "date": "2016-01-28 16:41:00",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "segments": [
            {
                "id": 184,
                "filterType": "COMBINED",
                "name": "Test - 10",
                "createDate":
                {
                    "date": "2016-01-18 16:05:44",
                    "timezone_type": 3,
                    "timezone": "Europe\/Budapest"
                },
                "subscriberCount": 10,
                "contactCount": 10,
                "contactLimit": 0,
                "conditions": [
                    [
                    {
                        "type": "IMPORT_FILE",
                        "relation": "IN",
                        "value": "256"
                    }]
                ],
                "_links":
                {
                    "self":
                    {
                        "href": "https:\/\/api.automizy.com\/segments\/184"
                    },
                    "calculate":
                    {
                        "href": "https:\/\/api.automizy.com\/segments\/184\/calculate"
                    },
                    "contacts":
                    {
                        "href": "https:\/\/api.automizy.com\/segments\/184\/contacts"
                    }
                }
            }],
            "clicks": 4,
            "opens": 3,
            "unsubscribes" :0,
            "status": "FINISHED",
            "notificationEmail": "",
            "job":
            {
                "id": 1649,
                "name": "My Test Campaign",
                "progressCurrent": 10,
                "progressMax": 10,
                "started":
                {
                    "date": "2016-01-28 16:40:57",
                    "timezone_type": 3,
                    "timezone": "Europe\/Budapest"
                },
                "finished":
                {
                    "date": "2016-01-28 16:41:00",
                    "timezone_type": 3,
                    "timezone": "Europe\/Budapest"
                },
                "status": "FINISHED",
                "visibleUntil":
                {
                    "date": "2016-01-28 16:51:00",
                    "timezone_type": 3,
                    "timezone": "Europe\/Budapest"
                },
                "type": "CAMPAIGN_SEND",
                "referenceId": 163,
                "parent": null,
                "isStoppable": false,
                "isPausable": false,
                "children": [],
                "_links":
                {
                    "self":
                    {
                        "href": "https:\/\/api.automizy.com\/jobs\/1649"
                    }
                }
            },
            "links": [
            {
                "id": "1695",
                "url": "https:\/\/automizy.com",
                "_links":
                {
                    "self":
                    {
                        "href": "https:\/\/api.automizy.com\/campaigns\/1695"
                    }
                }
            },
            {
                "id": "1697",
                "url": "[{webversion}]",
                "_links":
                {
                    "self":
                    {
                        "href": "https:\/\/api.automizy.com\/campaigns\/1697"
                    }
                }
            }],
            "tags": [],
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/1"
                }
            }
        }]
	},
	"page_count": 0,
	"page_size": 9223372036854775807,
	"total_items": 0,
	"page": 0
}

                

Scheduling a new email campaign

POST
https://api.automizy.com/campaigns
Permission: Logged in user
Parameters
Field Type Description
newsletter Number The selected newsletter's id.
sendFromName String This name will be displayed for the sender in every e-mail.
sendFromEmail String This e-mail address will be displayed for the sender in every e-mail
replyToEmail String The email address you want the contacts to send their replies.
notificationEmailoptional String The email address where notifications (sending started, sending ended) will be sent to.
sendTime String The campaign will start at this time format: yyyy-mm-dd hh:MM:ss
segments Number[] The campaign will be send to these segments
embedImages Boolean Specify if the images should be embedded or linked in the e-mail
name String The name of the campaign.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/campaigns'' \
-X POST' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "newsletter": 3,
    "sendFromName": "Automizy",
    "sendFromEmail": "noreply@automizy.com",
    "sendTime": "2015-07-07 10:00:00",
    "replyToEmail": "noreply@automizy.com",
    "notificationEmail": "notifications@automizy.com",
    "segments": [1,2],
    "embedImages": true,
    "name":"My E-mail Campaign"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/campaigns",
    data:{
        newsletter: 3,
        sendFromName: 'Automizy',
        sendFromEmail: 'noreply@automizy.com',
        sendTime: '2015-07-07 10:00:00',
        replyToEmail: 'noreply@automizy.com',
        notificationEmail: "notifications@automizy.com",
        segments: [1,2],
        embedImages: true,
        name:"My E-mail Campaign"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.campaigns().insert({
    newsletter: 3,
    sendFromName: 'Automizy',
    sendFromEmail: 'noreply@automizy.com',
    sendTime: '2015-07-07 10:00:00',
    replyToEmail: 'noreply@automizy.com',
    notificationEmail: "notifications@automizy.com",
    segments: [1,2],
    embedImages: true,
    name:"My E-mail Campaign"
});
                
Success 200
Field Type Description
id Number The id of the campaign.
name String The name of the campaign.
embedImages Boolean True, if you want to show embed images in the email.
sendFromName String The sender name your contact will see in the email.
sendFromEmail String The sender email address your contact will see in the email.
replyToEmail String If a contact send a reply, it will be sent to this address.
subject String The subject of the email.
htmlCode String The html code of the email.
sendTime Object The object containing data about when the campaign will be sent.
  sendTime[date] String The exact time when the campaign will be sent.
  sendTime[timezone] String The timezone of the user.
  sendTime[timezone_type] Number
finishedTime Object The object containing data about when the sending process finshed.
  finishedTime[date] String The exact time when the sending process finshed.
  finishedTime[timezone] String The timezone of the user.
  finishedTime[timezone_type] Number
segments Object[] The array of segments you want to send the email to.
clicks Number Show how much click were on the link in your email.
opens Number Shows how many times was the email opened.
unsubscribes Number Shows how many contacts unsubscribed from the email.
status String The status of the campaing.
notificationEmail String The email address you want the notifications to be sent to.
tags String[] Array containing the tags.
links Object[] Array containing the campaigns links.
(Unsubsribe link, webversion link etc).
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id": 1,
	"name": "My E-mail Campaign",
	"embedImages": true,
	"sendFromName": "Automizy Admin",
	"sendFromEmail": "admin@automizy.com",
	"replyToEmail": "admin@automizy.com",
	"subject": "My first campaign",
	"htmlCode": "\u003C!DOCTYPE\u003E\u003Chtml.../html\u003E",
	"sendTime":
	{
		"date": "2016-01-28 16:40:57",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"finishedTime": null,
	"segments": [
	{
		"id": 1,
		"filterType": "COMBINED",
		"name": "Test - 10",
		"createDate":
		{
			"date": "2016-01-18 16:05:44",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"subscriberCount": 10,
		"contactCount": 10,
		"contactLimit": 0,
		"conditions": [
			[
			{
				"type": "IMPORT_FILE",
				"relation": "IN",
				"value": "256"
			}]
		],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184"
			},
			"calculate":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/calculate"
			},
			"contacts":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/contacts"
			}
		}
	},
    {
        "id": 2,
        "filterType": "COMBINED",
        "name": "Test - 11",
        .
        .
        .
    }],
	"clicks": 0,
	"opens": 0,
    "unsubscribes": 0,
	"status": "SCHEDULED",
	"notificationEmail": "notifications@automizy.com",
	"job":
	{
		"id": 1649,
		"name": "My E-mail Campaign",
		"progressCurrent": 10,
		"progressMax": 10,
		"started":
		{
			"date": "2016-01-28 16:40:57",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"finished": null,
		"status": "SCHEDULED",
		"visibleUntil": null,
		"type": "CAMPAIGN_SEND",
		"referenceId": 163,
		"parent": null,
		"isStoppable": true,
		"isPausable": true,
		"children": [],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/jobs\/1649"
			}
		}
	},
	"links": [
	{
		"id": "1695",
		"url": "https:\/\/automizy.com",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1695"
			}
		}
	},
	{
		"id": "1697",
		"url": "[{webversion}]",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1697"
			}
		}
	}],
	"tags": [],
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/campaigns\/1"
		}
	}
}
                

Updating a given email campaign

Please note that only SCHEDULED campaigns can be updated.
PATCH
https://api.automizy.com/campaigns/:id
Permission: Logged in user
Parameters
Field Type Description
newsletteroptional Number The selected newsletter's id.
sendFromNameoptional String This name will be displayed for the sender in every e-mail.
sendFromEmailoptional String This e-mail address will be displayed for the sender in every e-mail
notificationEmailoptional String The email address where notifications (sending started, sending ended) will be sent to.
sendTimeoptional String The campaign will start at this time format: yyyy-mm-dd hh:MM:ss
replyToEmailoptional String The recipients will reply to this e-mail address
segmentsoptional Number[] The campaign will be send to these segments
embedImagesoptional Boolean Specify if the images should be embedded or linked in the e-mail
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/campaigns/3'' \
-X PATCH' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "newsletter": 3,
    "sendFromName": "Automizy",
    "sendFromEmail": "noreply@automizy.com",
    "sendTime": "2016-01-30 00:00:00",
    "replyToEmail": "noreply@automizy.com",
    "notificationEmail": "admin@automizy.com",
    "segments": [1],
    "embedImages": true
 }'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/campaigns/3",
    data:{
        newsletter: 3,
        sendFromName: 'Automizy',
        sendFromEmail: 'noreply@automizy.com',
        sendTime: "2016-01-30 00:00:00",
        replyToEmail: 'noreply@automizy.com',
        notificationEmail: "admin@automizy.com",
        segments: [1],
        embedImages: true
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.campaigns().update({
    newsletter: 3,
    sendFromName: 'Automizy',
    sendFromEmail: 'noreply@automizy.com',
    sendTime: "2016-01-30 00:00:00",
    replyToEmail: 'noreply@automizy.com',
    notificationEmail: "admin@automizy.com",
    segments: [1],
    embedImages: true
},3);
                
Success 200
Field Type Description
id Number The id of the campaign.
name String The name of the campaign.
embedImages Boolean True, if you want to show embed images in the email.
sendFromName String The sender name your contact will see in the email.
sendFromEmail String The sender email address your contact will see in the email.
replyToEmail String If a contact send a reply, it will be sent to this address.
subject String The subject of the email.
htmlCode String The html code of the email.
sendTime Object The object containing data about when the campaign will be sent.
  sendTime[date] String The exact time when the campaign will be sent.
  sendTime[timezone] String The timezone of the user.
  sendTime[timezone_type] Number
finishedTime Object The object containing data about when the sending process finshed.
  finishedTime[date] String The exact time when the sending process finshed.
  finishedTime[timezone] String The timezone of the user.
  finishedTime[timezone_type] Number
segments Object[] The array of segments you want to send the email to.
clicks Number Show how much click were on the link in your email.
opens Number Shows how many times was the email opened.
unsubscribes Number Shows how many contacts unsubscribed from the email.
status String The status of the campaing.
notificationEmail String The email address you want the notifications to be sent to.
tags String[] Array containing the tags.
links Object[] Array containing the campaigns links.
(Unsubsribe link, webversion link etc).
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id": 1,
	"name": "My E-mail Campaign",
	"embedImages": true,
	"sendFromName": "Automizy Admin",
	"sendFromEmail": "admin@automizy.com",
	"replyToEmail": "admin@automizy.com",
	"subject": "My first campaign",
	"htmlCode": "\u003C!DOCTYPE\u003E\u003Chtml.../html\u003E",
	"sendTime":
	{
		"date": "2016-01-30 00:00:00",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"finishedTime": null,
	"segments": [
	{
		"id": 1,
		"filterType": "COMBINED",
		"name": "Test - 10",
		"createDate":
		{
			"date": "2016-01-18 16:05:44",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"subscriberCount": 10,
		"contactCount": 10,
		"contactLimit": 0,
		"conditions": [
			[
			{
				"type": "IMPORT_FILE",
				"relation": "IN",
				"value": "256"
			}]
		],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184"
			},
			"calculate":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/calculate"
			},
			"contacts":
			{
				"href": "https:\/\/api.automizy.com\/segments\/184\/contacts"
			}
		}
	}],
	"clicks": 0,
	"opens": 0,
    "unsubscribes": 0,
	"status": "SCHEDULED",
	"notificationEmail": "admin@automizy.com",
	"job":
	{
		"id": 1649,
		"name": "My E-mail Campaign",
		"progressCurrent": 10,
		"progressMax": 10,
		"started":
		{
			"date": "2016-01-28 16:40:57",
			"timezone_type": 3,
			"timezone": "Europe\/Budapest"
		},
		"finished": null,
		"status": "SCHEDULED",
		"visibleUntil": null,
		"type": "CAMPAIGN_SEND",
		"referenceId": 163,
		"parent": null,
		"isStoppable": true,
		"isPausable": true,
		"children": [],
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/jobs\/1649"
			}
		}
	},
	"links": [
	{
		"id": "1695",
		"url": "https:\/\/automizy.com",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1695"
			}
		}
	},
	{
		"id": "1697",
		"url": "[{webversion}]",
		"_links":
		{
			"self":
			{
				"href": "https:\/\/api.automizy.com\/campaigns\/1697"
			}
		}
	}],
	"tags": [],
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/campaigns\/1"
		}
	}
}
                

Getting the links of a campaign

GET
https://api.automizy.com/campaigns/:id/links
Permission: Logged in user
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/campaigns/7/links'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/campaigns/7/links",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.campaigns().getLinksById(7);
                
Success 200
Field Type Description
link1_Id Number The key is the id of the first link.
link2_Id Number The key is the id of the second link.
Response example
HTTP/1.1 200 OK
{
    484: "http://automizy.com",
    485: "[{unsubscribelink}]",
    486: "[{webversion}]"
}
                

Getting the list of recipients of the given campaign.

GET
https://api.automizy.com/campaigns/:id/recipients
Permission: Logged in user
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/campaigns/7/recipients'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/campaigns/7/recipients",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
//No Automizy JS Api function for this yet
                
Success 200
Field Type Description
_embedded Object Contains the results and additional data
  _embedded[items] Array The array of recipients.
    _embedded[items][x] Object The object containing data about the recipient.
      _embedded[items][x][contact] Object The object containing data about the recipient.
        _embedded[items][x][contact][id] Number The id of the contact.
        _embedded[items][x][contact][email] String The email address of the contact.
      _embedded[items][x][finished] Boolean True if the email is already sent to the contact.
      _embedded[items][x][finishedAt] Object The object containing data about when the email was sent to the contact.
      _embedded[items][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "items": [
      {
        "contact": {
          "id": 440063,
          "email": "john.doe@automizy.com"
        },
        "finished": true,
        "finishedAt": {
          "date": "2015-10-21 13:33:30",
          "timezone_type": 3,
          "timezone": "Europe\/Budapest"
        },
        "_links": {"self": {"href": "https:\/\/api.automizy.com\/campaigns\/76\/recipients"}}
      }
    ]
}
                

Getting open statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/opens
Permission: Logged in user
Parameters
Field Type Description
formatoptional String The format you want to get the result in.
Allowed values: "total", "timeline", "aggregate", "table"
If there is no format parameter given, or the format is "table" the response will be a list of recipients who opened the campaign.
CSV format for recipient list is also available, if Accept: text/csv is added to the request header.
fieldsoptional String Only used if no format parameter given.
The fields you'd like to get in the response, separated by coma.
Ex.: "email,date,device,browser,os,country,region,ip,id"
limitoptional Number Only used if no format parameter given.
Number of results per page
Size range: 0..
pageoptional Number Only used if no format parameter given.
The offset of the result
Default value: 1
Size range: 1..
orderoptional String Only used if no format parameter given.
Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
fromoptional String Only used if format parameter is given.
The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String Only used if format parameter is given.
The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
groupByoptional String Only used if format parameter is "aggregate"
Allowed values: "device", "os", "browser", "domain"
curl
jQuery
Automizy Js Api
#Getting the open stats of the 7th campaign in total format, from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/opens?format=total&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Gettining the recipients who opened the 7th campaign with additional fields
$ curl 'https://api.automizy.com/campaigns/1287/opens?links=&fields=email%2Cdate%2Cdevice%2Cbrowser%2Cos%2Ccountry%2Cregion%2Cip%2Cid&limit=10&page=1&order_dir=asc'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'


                
//Getting the open stats of the 7th campaign in total format, from 01/10/2015 to the current time:
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/opens',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"total",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//Gettining the recipients who opened the 7th campaign with additional fields
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/opens',
    type: 'GET',
    dataType: 'json',
    data: {
        fields:"email,date,device,browser,os,country,region,ip,id",
        page:1,
        order:"email:asc"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//What is the window.accessToken? You can see it in the Authentication section.
                
/*Getting the open stats of the 7th campaign, from 01/10/2015 to the current time:*/

//Total format:
$AA.campaigns().getOpenStatById(7,"2015.10.01 00:00:00",false);

//Timeline format:
$AA.campaigns().getOpenTimeLineById(7,"2015.10.01 00:00:00",false);

//Aggregate format:
$AA.campaigns().getOpenDevicePieById(7,"2015.10.01 00:00:00",false); //groupBy: "device"
$AA.campaigns().getOpenOsPieById(7,"2015.10.01 00:00:00",false); //groupBy: "os"
$AA.campaigns().getOpenBrowserPieById(7,"2015.10.01 00:00:00",false); //groupBy: "browser"
$AA.campaigns().getOpenDomainListById(7,"2015.10.01 00:00:00",false); //groupBy: "domain"

                
Success 200
Recipients
Total format
Timeline format
Aggregate format
Field Type Description
total Number The number of total opens.
unique Number The number of unique opens.
Field Type Description
Array Object[] Anonymous array, each element represents a timeframe.
  Array[x] Object A single timeframe.
    Array[x][date] Object Contains time statistics.
    Array[x][value] Object The object containing open data.
     Array[x][value][all] Number Object containing all opens.
      Array[x][value][all][total] Number The number of total opens.
      Array[x][value][all][unique] Number The number of unique opens.
Field Type Description
Object{} Object Keys are types.
Values are the number of opens of the current type.
Please check the examples!
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data.
  _embedded[items] Object[] Contains the recipients object.
    _embedded[items][x] Object Contains the required fields of a recipient.
      _embedded[items][x][email] String The email address of the recipient.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response examples
Recipients
Total format
Timeline format
Aggregate format

//Recipients who opened the campaign
{
    "_embedded":{
    "items": [
        {
            "id": "2571",
            "email": "john.doe@email.com",
            "date":
            {
                "date": "2016-06-20 12:01:48",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "device": "GOOGLE IMAGE PROXY",
            "os": "GOOGLE IMAGE PROXY",
            "browser": "GOOGLE IMAGE PROXY",
            "ip": "xxx.xxx.xxx.xxx",
            "country": "UNITED STATES",
            "region": "CALIFORNIA",
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/7\/opens"
                }
            }
        }
    ],
    "page_count": 2,
    "page_size": 10,
    "total_items": 1,
    "page": 1
}
                
HTTP/1.1 200 OK
//Total format example:
{
    total: 2,
    unique: 1
}
                
//Timeline format example:
{
    [
        //First timeframe
        {
            date:{
                    date: "15-05-06 02:08:44",
                    timezone_type:3,
                    timezone:"Europe\/Budapest"
            },
            value:{
                all:{
                    total: 1,
                    unique: 1
                }
            }
        },
        //Following timeframes
        {
            date:{
                    date: "15-05-06 03:10:15",
                    timezone_type:3,
                    timezone:"Europe\/Budapest"
            },
            value:{
                all:{
                    total: 3,
                    unique: 2
                }
            }
        },
        {},
        .
        .
        .
    ]
}
                

//Aggregate format example, groupBy: "browser"
{
    "Firefox": 2,
    "Chrome": 5,
    "Chrome Mobile": 3
}
                

Getting click statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/clicks
Permission: Logged in user
Parameters
Field Type Description
formatoptional String The format you want to get the result in.
Allowed values: "total", "timeline", "aggregate"
If there is no format parameter given, the response will be a list of recipients who clicked a link in the campaign.
CSV format for recipient list is also available, if Accept: text/csv is added to the request header.
fieldsoptional String Only used if no format parameter given.
The fields you'd like to get in the response, separated by coma.
Ex.: "email,date,device,browser,os,country,region,ip,id"
limitoptional Number Only used if no format parameter given.
Number of results per page
Size range: 0..
pageoptional Number Only used if no format parameter given.
The offset of the result
Default value: 1
Size range: 1..
orderoptional String Only used if no format parameter given.
Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
fromoptional String Only used if format parameter is given.
The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String Only used if format parameter is given.
The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
groupByoptional String Only used if format parameter is "aggregate"
Allowed values: "device", "os", "browser", "domain"
curl
jQuery
Automizy Js Api
#Getting the click stats of the 7th campaign in total format, from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/clicks?format=total&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'


#Gettining the recipients who clicked the 7th campaign with additional fields
$ curl 'https://api.automizy.com/campaigns/7/clicks?links=&fields=email%2Cdate%2Clink%2Cdevice%2Cbrowser%2Cos%2Ccountry%2Cregion%2Cip%2Cid&limit=10&page=1&order_dir=asc'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
//Getting the click stats of the 7th campaign in total format, from 01/10/2015 to the current time:
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/clicks',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"total",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});


//Gettining the recipients who clicked the 7th campaign with additional fields
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/clicks',
    type: 'GET',
    dataType: 'json',
    data: {
        fields:"email,date,device,browser,os,country,region,ip,id",
        page:1,
        order:"email:asc"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});
//What is the window.accessToken? You can see it in the Authentication section.
                
/*Getting the click stats of the 7th campaign, from 01/10/2015 to the current time:*/

//Total format:
$AA.campaigns().getClickStatById(7,"2015.10.01 00:00:00",false);

//Timeline format:
$AA.campaigns().getClickTimeLineById(7,"2015.10.01 00:00:00",false);

//Aggregate format:
$AA.campaigns().getClickDevicePieById(7,"2015.10.01 00:00:00",false); //groupBy: "device"
$AA.campaigns().getClickOsPieById(7,"2015.10.01 00:00:00",false); //groupBy: "os"
$AA.campaigns().getClickBrowserPieById(7,"2015.10.01 00:00:00",false); //groupBy: "browser"
$AA.campaigns().getClickDomainListById(7,"2015.10.01 00:00:00",false); //groupBy: "domain"
                
Success 200
Recipients
Total format
Timeline format
Aggregate format
Field Type Description
total Number The number of total clicks.
unique Number The number of unique clicks.
Field Type Description
Array Object[] Anonymous array, each element represents a timeframe.
  Array[x] Object A single timeframe.
    Array[x][date] Object Contains time statistics.
    Array[x][value] Object The object containing click data.
     Array[x][value][all] Number Object containing all clicks.
      Array[x][value][all][total] Number The number of total clicks.
      Array[x][value][all][unique] Number The number of unique clicks.
Field Type Description
Object{} Object Keys are types.
Values are the number of clicks of the current type.
Please check the examples!
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data.
  _embedded[items] Object[] Contains the recipients object.
    _embedded[items][x] Object Contains the required fields of a recipient.
      _embedded[items][x][email] String The email address of the recipient.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response examples
Recipients
Total format
Timeline format
Aggregate format

//Recipients who clicked the campaign
{
    "_embedded":{
    "items": [
        {
            "id": "2571",
            "email": "john.doe@email.com",
            "link":{
				"id": "2641",
				"url": "[{unsubscribelink}]"
			},
            "date":
            {
                "date": "2016-06-20 12:01:48",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "device": "GOOGLE IMAGE PROXY",
            "os": "GOOGLE IMAGE PROXY",
            "browser": "GOOGLE IMAGE PROXY",
            "ip": "xxx.xxx.xxx.xxx",
            "country": "UNITED STATES",
            "region": "CALIFORNIA",
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/7\/clicks"
                }
            }
        }
    ],
    "page_count": 2,
    "page_size": 10,
    "total_items": 1,
    "page": 1
}
                
HTTP/1.1 200 OK
//Total format example:
{
    total: 2,
    unique: 1
}
                
//Timeline format example:
{
    [
        //First timeframe
        {
            date :{
                    date: "15-05-06 02:08:44",
                    timezone_type:3,
                    timezone:"Europe\/Budapest"
            },
            value:{
                all: {
                    total: 1,
                    unique: 1
                }
            }
        },
        //Following timeframes
        {
            date :{
                    date: "15-05-06 03:10:15",
                    timezone_type:3,
                    timezone:"Europe\/Budapest"
            },
            value:{
                all: {
                    total: 3,
                    unique: 2
                }
            }
        },
        {},
        .
        .
        .
    ]
}
                

//Aggregate format example, groupBy: "browser"
{
    "Firefox": 2,
    "Chrome": 5,
    "Chrome Mobile": 3
}
                

Getting share statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/shares
Permission: Logged in user
Parameters
Field Type Description
formatoptional String The format you want to get the result in.
Allowed values: "total", "timeline", "aggregate"
If there is no format parameter given, the response will be a list of recipients who shared the campaign.
CSV format for recipient list is also available, if Accept: text/csv is added to the request header.
fieldsoptional String Only used if no format parameter given.
The fields you'd like to get in the response, separated by coma.
Ex.: "email,date,device,browser,os,country,region,ip,id"
limitoptional Number Only used if no format parameter given.
Number of results per page
Size range: 0..
pageoptional Number Only used if no format parameter given.
The offset of the result
Default value: 1
Size range: 1..
orderoptional String Only used if no format parameter given.
Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
fromoptional String Only used if format parameter is given.
The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String Only used if format parameter is given.
The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting the share stats of the 7th campaign from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/shares?format=total&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Gettining the recipients who shared the 7th campaign with additional fields
$ curl 'https://api.automizy.com/campaigns/1287/shares?links=&fields=email%2Cdate%2CshareType%2Cdevice%2Cbrowser%2Cos%2Ccountry%2Cregion%2Cip%2Cid&limit=10&page=1&order_dir=asc'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/shares',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"total",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//Gettining the recipients who shared the 7th campaign with additional fields
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/shares',
    type: 'GET',
    dataType: 'json',
    data: {
        fields:"email,date,shareType,device,browser,os,country,region,ip,id",
        page:1,
        order:"email:asc"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getShareStatById(7,"2015.10.01 00:00:00",false);
                
Success 200
Recipients
Total format
Field Type Description
total Number The number of total shares.
unique Number The number of unique shares.
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data.
  _embedded[items] Object[] Contains the recipients object.
    _embedded[items][x] Object Contains the required fields of a recipient.
      _embedded[items][x][email] String The email address of the recipient.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response examples
Recipients
Total format
HTTP/1.1 200 OK
//Total format example:
{
    total: 2,
    unique: 1
}
                

//Recipients who opened the campaign
{
    "_embedded":{
    "items": [
        {
            "id": "2571",
            "email": "john.doe@email.com",
            "date":
            {
                "date": "2016-06-20 12:01:48",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "shareType":"facebook",
            "device": "GOOGLE IMAGE PROXY",
            "os": "GOOGLE IMAGE PROXY",
            "browser": "GOOGLE IMAGE PROXY",
            "ip": "xxx.xxx.xxx.xxx",
            "country": "UNITED STATES",
            "region": "CALIFORNIA",
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/7\/shares"
                }
            }
        }
    ],
    "page_count": 2,
    "page_size": 10,
    "total_items": 18,
    "page": 1
}
                

Getting unsubscribe statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/unsubscribes
Permission: Logged in user
Parameters
Field Type Description
formatoptional String The format you want to get the result in.
Allowed values: "total", "timeline", "aggregate"
If there is no format parameter given, the response will be a list of recipients who unsubscribed.
CSV format for recipient list is also available, if Accept: text/csv is added to the request header.
fieldsoptional String Only used if no format parameter given.
The fields you'd like to get in the response, separated by coma.
Ex.: "email,date,device,browser,os,country,region,ip,id"
limitoptional Number Only used if no format parameter given.
Number of results per page
Size range: 0..
pageoptional Number Only used if no format parameter given.
The offset of the result
Default value: 1
Size range: 1..
orderoptional String Only used if no format parameter given.
Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
fromoptional String Only used if format parameter is given.
The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String Only used if format parameter is given.
The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting the unsubscribe stats of the 7th campaign from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/unsubscribes?format=total&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Gettining the recipients who unsubscribed from the 7th campaign with additional fields
$ curl 'https://api.automizy.com/campaigns/7/unsubscribes?links=&fields=email%2Cdate%2Cdevice%2Cbrowser%2Cos%2Ccountry%2Cregion%2Cip%2Cid&limit=10&page=1&order_dir=asc'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/unsubscribes',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"total",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//Gettining the recipients who shared the 7th campaign with additional fields
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/shares',
    type: 'GET',
    dataType: 'json',
    data: {
        fields:"email,date,device,browser,os,country,region,ip,id",
        page:1,
        order:"email:asc"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getUnsubscribeStatById(7,"2015.10.01 00:00:00",false);
                
Success 200
Recipients
Total format
Field Type Description
total Number The number of total opens.
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data.
  _embedded[items] Object[] Contains the recipients object.
    _embedded[items][x] Object Contains the required fields of a recipient.
      _embedded[items][x][email] String The email address of the recipient.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response examples
Recipients
Total format
HTTP/1.1 200 OK
//Total format example:
{
    total: 2
}
                

//Recipients who opened the campaign
{
    "_embedded":{
    "items": [
        {
            "id": "2571",
            "email": "john.doe@email.com",
            "date": {
                "date": "2016-06-20 12:01:52",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "device": "PC\/LAPTOP",
            "os": "WINDOWS",
            "browser": "CHROME",
            "ip": "xxx.xxx.xxx.xxx",
            "country": "HUNGARY",
            "region": "BUDAPEST"
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/7\/unsubscribes"
                }
            }
        }
    ],
    "page_count": 2,
    "page_size": 10,
    "total_items": 18,
    "page": 1
}
                

Getting bounce statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/bounces
Permission: Logged in user
Parameters
Field Type Description
formatoptional String The format you want to get the result in.
Allowed values: "total", "timeline", "aggregate"
If there is no format parameter given, the response will be a list of recipients who bounced.
CSV format for recipient list is also available, if Accept: text/csv is added to the request header.
fieldsoptional String Only used if no format parameter given.
The fields you'd like to get in the response, separated by coma.
Ex.: "email,date,device,browser,os,country,region,ip,id"
limitoptional Number Only used if no format parameter given.
Number of results per page
Size range: 0..
pageoptional Number Only used if no format parameter given.
The offset of the result
Default value: 1
Size range: 1..
orderoptional String Only used if no format parameter given.
Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
fromoptional String Only used if format parameter is given.
The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String Only used if format parameter is given.
The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting the bounce stats of the 7th campaign from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/bounces?format=total&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'

#Gettining the bounced recipients of the 7th campaign with additional fields
$ curl 'https://api.automizy.com/campaigns/7/bounces?links=&fields=email%2Cdate%2Ctype%2Ccode%2Cid&limit=10&page=1&order_dir=asc'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/bounces',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"total",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//Gettining the bounced recipients of the 7th campaign with additional fields
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/bounces',
    type: 'GET',
    dataType: 'json',
    data: {
        fields:"email,date,type,code,id",
        page:1,
        order:"email:asc"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});

//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getBounceStatById(7,"2015.10.01 00:00:00",false);
                
Success 200
Recipients
Total format
Field Type Description
soft Number The number of soft bounces.
hard Number The number of hard bounces.
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data.
  _embedded[items] Object[] Contains the recipients object.
    _embedded[items][x] Object Contains the required fields of a recipient.
      _embedded[items][x][email] String The email address of the recipient.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response examples
Recipients
Total format
HTTP/1.1 200 OK
{
    hard: 2,
    soft: 1
}
                

//Recipients who bounced
{
    "_embedded":{
    "items": [
        {
            "id": "94",
            "email": "john.doe@email.com",
            "type": "SOFT",
            "date": {
                "date": "2016-06-20 12:02:46",
                "timezone_type": 3,
                "timezone": "Europe\/Budapest"
            },
            "code": "5.4.4",
            "_links":
            {
                "self":
                {
                    "href": "https:\/\/api.automizy.com\/campaigns\/7\/bounces"
                }
            }
        }
    ],
    "page_count": 2,
    "page_size": 10,
    "total_items": 18,
    "page": 1
}
                

Getting geo-statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/geo-locations
Permission: Logged in user
Parameters
Field Type Description
format String The format you want to get the result in.
Allowed values: "raw"
fromoptional String The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting the geo stats of the 7th campaign from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/geo-locations?format=raw&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/geo-locations',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"raw",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getGeoStatById(7,"2015.10.01 00:00:00",false);
                
Success 200
Field Type Description
Array Object[] Array containing the geo stats, separated by regions.
  Array[x] Object Object containing data about opens in a given region.
    Array[x][count] Number The number of opens in the given region.
    Array[x][country] String The country where the email was opened from.
    Array[x][region] String The region where the email was opened from.
Response example
HTTP/1.1 200 OK
[
    {
        count: "1",
        country: "HUNGARY",
        region: "BUDAPEST"
    },
    {
        count: "3",
        country: "USA",
        region: "FLORIDA"
    }
]
                

Getting heat map statistics of the given campaign.

GET
https://api.automizy.com/campaigns/:id/heat-map
Permission: Logged in user
Parameters
Field Type Description
format String The format you want to get the result in.
Allowed values: "raw"
fromoptional String The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting the geo stats of the 7th campaign from 01/10/2015 to the current time:
$ curl 'https://api.automizy.com/campaigns/7/heat-map?format=raw&from=2015.10.01+00%3A00%3A00&to=false'' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/7/heat-map',
    type: 'GET',
    dataType: 'json',
    data: {
        format:"raw",
        from:"2015.10.01 00:00:00",
        to:false
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getHeatMapById(7,"2015.10.01 00:00:00",false);
                
Success 200
Field Type Description
Array Object[] Array containing the heat map stats, separated by links.
  Array[x] Object Object containing data about clicks on a given link.
    Array[x][count] Number The number of clicks on the given link.
    Array[x][distinctCount] Number The number of unique clicks on the given link.
    Array[x][url] String The link.
Response example
HTTP/1.1 200 OK
[
    {
    "url": "http:\/\/automizy.com",
    "count": "0",
    "distinctCount": "0"
    },
    {
    "url": "[{confirmlink}]",
    "count": "0",
    "distinctCount": "0"
    },
    {
    "url": "[{webversion}]",
    "count": "2",
    "distinctCount": "2"
    }
]
                

Getting combined statistics of the given campaign.

Use this request to get multiple types of statistics in different formats.
POST
https://api.automizy.com/campaigns/:id/combined
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The name of the object containing data.
The keys of the response object will be the same you specified in the request as names.
type String The type of data you want to get.
Allowed values: "open", "click", "share", "unsubscribe", "bounce", "heat-map", "geo-location"
format String The format you want to get the result in.
Not all statistic types support all formats, to get familiar with statistic types and their accepted formats, check their documentation described in the previous articles.

Allowed values: "total", "timeline", "aggregate", "raw"
fromoptional String The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, startpoint will be the date when the campaign was sent.
tooptional String The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format). If false, endpoint will be the current date and time.
curl
jQuery
Automizy Js Api
#Getting combined statistics of the first campaign
$ curl 'https://api.automizy.com/campaigns/1/combined'' \
-X POST' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "open": {
        "type":"open",
        "format":"total",
        "from": "2015.11.01",
        "to": "2015.11.10"
    },
    "deviceOpenPie": {
        "type":"open",
        "format":"aggregate",
        "groupBy": "device",
        "from": "2015.11.01",
        "to": "2015.11.10"
    },
    "geoChart": {
        "type:"geo-location",
        "format":"raw",
        "from": "2015.11.01",
        "to": "2015.11.10"
    }
}'
                
$.ajax({
    url: 'https://api.automizy.com/campaigns/1/combined',
    type: 'POST',
    dataType: 'json',
    data: {
        "open": {
            "type":"open",
            "format":"total",
            "from": "2015.11.01",
            "to": "2015.11.10"
        },
        "deviceOpenPie": {
            "type":"open",
            "format":"aggregate",
            "groupBy": "device",
            "from": "2015.11.01",
            "to": "2015.11.10"
        },
        "geoChart": {
            "type":"geo-location",
            "format":"raw",
            "from": "2015.11.01",
            "to": "2015.11.10"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken}
});
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.campaigns().getCombinedById(1, {
    open: {
        type:'open',
        format:'total',
        from: "2015.11.01",
        to: "2015.11.10"
    },
   deviceOpenPie: {
        type:"open",
        format:"aggregate",
        groupBy: "device",
        from: "2015.11.01",
        to: "2015.11.10"
    },
    geoChart: {
        type:'geo-location',
        format:'raw',
        from: "2015.11.01",
        to: "2015.11.10"
    }
});
                
Success 200
Field Type Description
name1 Object The name of the response object containing data.
It's name will be the same you specified in the request. This object will contain the data in the requested format.
Response example
HTTP/1.1 200 OK
{
    deviceOpenPie: {
        "PC\/Laptop": 10,
        "Mobile": 3
    },
    geoChart: [
        {
            count: "4",
            country: "HUNGARY",
            region: "BUDAPEST"
        },
        {
            count: "9",
            country: "USA",
            region: "FLORIDA"
        }
    ],
    open:{
        total: 13,
        unique: 8
    }
}
                

Getting global statistics

You can get global statistics about campaigns in a given time interval using this API.
You'll receive the statistics as a CSV file in the end.
GET
https://api.automizy.com/campaigns/globalStatistics/:statType
Permission: Logged in user
Parameters
Field Type Description
statType String The type of the statistics you want to get. (Placed in the request url)
Allowed values: open, click, unsubscribe, bounce
from String The startpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format).
to String The endpoint of the statistics. (date, yyyy-MM-dd hh:mm:ss format).
showContent Number 0 by default. This case you can get the download link from the X-Download-Url Response Header.
If set to 1 response body will contain the CSV content.
curl
jQuery
||Getting the contacts who opened a campaign between 2016-07-12 15:00:00 and 2016-07-12 15:20:00

$ curl 'https://api.automizy.com/campaigns/globalStatistics/open?from=2016-07-12+15%3A00%3A00&to=2016-07-12+15%3A20%3A00&showContent=1' \
-X GET \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
//Getting the contacts who opened a campaign between 2016-07-12 15:00:00 and 2016-07-12 15:20:00

$.ajax({
    type: "GET",
    url: "https://api.automizy.com/campaigns/globalStatistics/open",
    data: {
        "from": "2016-07-12 15:00:00",
        "to": "2016-07-12 15:20:00",
        "showContent": 1
    },
    headers: {
        Authorization: 'Bearer ' + window.accessToken
    },
    success: function(data) {
        console.log(data)
    }
});
                
Success 200
Response example
"Contact email";"Open date";"Campaign name"
"john.doe@gmail.com";"2016-07-12 15:14:00";"My campaign"
"jane.doe@gmail.com";"2016-07-12 15:16:00";"My campaign2"
                

Split Tests

Split tests are specially sent email campaigns, they are send to only a few contact, and the system chooses the more successful newsletter based on the opening/click stats. After that the winner newsletter can be sent to the remaining contacts.

Creating a new split test

POST
https://api.automizy.com/split-tests
Permission: Logged in user
Parameters
Field Type Description
name String Name of the split test
percentage Number Size of the sample
Allowed values: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100
sendTime String The exact time when you want to begin the test.
A date with the following format: 'yyyy-mm-dd hh:mm:ss'
newsletters Object[] The newsletters you want to test. The number of selected newsletters must be between two and four
winCondition String The algorithm which decides which is the winner
Allowed values: "most_email_open", "most_email_click"
conditionCheckDelay Object Containing data about how long the test will run.
  conditionCheckDelay[days] Number The number of days you want the statistics to run.
Default value: 0
Size range: 0-44
  conditionCheckDelay[hours] Number The number of hours you want the statistics to run.
Default value: 0
Size range: 0-23
  conditionCheckDelay[minutes] Number The number of minutes you want the statistics to run.
Default value: 0
Size range: 0-59
winAction String The action you want to make when the test is sent, and the time is over.
Allowed values: 'DO_NOTHING', 'SEND_REMAINING'
segments Number[] The array containing the id of segments you want to send the test to.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/split-tests' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    'name': 'My first split test',
    'conditionCheckDelay': {
        'days': 1,
        'hours': 2,
        'minutes': 30
    },
    'sendTime': '2015-06-22 14:00:00',
    'percentage': 10,
    'winAction': 'SEND_REMAINING',
    'winCondition': 'MOST_LINK_CLICK',
    'segments': [1,4,10],
    'newsletters': [
        {
            'newsletter': 3,
            'name': 'Third campaign',
            'embedImages': true,
            'sendFromEmail': 'myemail@mymail.com',
            'replyToEmail': 'myemail@mymail.com',
            'sendFromName': 'John Doe',
        },
        {
            'newsletter': 4,
            'name': 'Fourth campaign',
            'embedImages': false,
            'sendFromEmail': 'myemail@mymail.com',
            'replyToEmail': 'myemail@mymail.com',
            'sendFromName': 'John Doe',
        }
    ]
 }'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/split-tests",
    data:{
        name: 'My first split test',
        conditionCheckDelay: {
        //The test will run for 1 days, 2 hours and 30 minutes
            days: 1,
            hours: 2,
            minutes: 30
        },
        sendTime: '2015-06-22 14:00:00',
        percentage: 10,
        winAction: 'SEND_REMAINING',
        winCondition: 'MOST_LINK_CLICK',
        segments: [1,4,10],
        newsletters: [
            {
                newsletter: 3, //id
                name: 'Third campaign',
                embedImages: true,
                sendFromEmail: 'myemail@mymail.com',
                replyToEmail: 'myemail@mymail.com',
                sendFromName: 'John Doe',
            },
            {
                newsletter: 4, //id
                name: 'Fourth campaign',
                embedImages: false,
                sendFromEmail: 'myemail@mymail.com',
                replyToEmail: 'myemail@mymail.com',
                sendFromName: 'John Doe',
            }
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.splitTests().send({
    name: 'My first split test',
    conditionCheckDelay: {
    //The test will run for 1 days, 2 hours and 30 minutes
        days: 1,
        hours: 2,
        minutes: 30
    },
    sendTime: '2015-06-22 14:00:00',
    percentage: 10,
    winAction: 'SEND_REMAINING',
    winCondition: 'MOST_LINK_CLICK',
    segments: [1,4,10],
    newsletters: [
        {
            newsletter: 3, //id
            name: 'Third campaign',
            embedImages: true,
            sendFromEmail: 'myemail@mymail.com',
            replyToEmail: 'myemail@mymail.com',
            sendFromName: 'John Doe',
        },
        {
            newsletter: 4, //id
            name: 'Fourth campaign',
            embedImages: false,
            sendFromEmail: 'myemail@mymail.com',
            replyToEmail: 'myemail@mymail.com',
            sendFromName: 'John Doe',
        }
    ]
});
                
Success 200
Field Type Description
campaigns Object[] The object containing the sent campaigns.
firstConditionCheck Object Containing data about the time when the results will be checked.
  days Object The number of days the statistics run.
  hours Object The number of hours the statistics run.
  minutes Object The number of minutes the statistics run.
id Number The id of the split test.
name String The name of the split test.
percentage Number Size of the sample
status String The statuc of the test.
winAction String The action you want to make when the test is sent, and the time is over.
winCondition String The algorithm which decides which is the winner
winner Number The id of the winning campaign.
Response example
HTTP/1.1 200 OK
{
    _links: Object,
    campaigns: Array[2],
    conditionCheck: null,
    firstConditionCheck: {
        days: 1,
        hours: 2,
        minutes: 30,
    },
    id: "36",
    job: Object,
    name: "My first split test",
    percentage: 10,
    status: "WAIT_UNTIL_SCHEDULE_TIME",
    winAction: "SEND_REMAINING",
    winCondition: "MOST_LINK_CLICK",
    winner: null
}
                

Templates

Creating a new template

POST
https://api.automizy.com/templates
Permission: Logged in user
Parameters
Field Type Description
name String Size range: 1..200
editorCodeoptional String The code that the editor uses to create the template.
htmlCode String The html code of the new template.
maxWidthoptional Number Default value: 650
Size range: 0..
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/templates' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
{
    "name": "My first test template",
    "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/template",
    data:{
        "name": "My first test template",
        "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.templates().insert({
    "name": "My first test template",
    "htmlCode": "<html><head></head><body><b>TEST</b></body></html>"
}); //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new template
name String The name of the new template
editorCode String The code that the editor uses to create the template.
htmlCode String The html code of the new template
hasBackup Boolean The new template has backup.
maxWidth Number The maximal width of the new template
createDate Object The object containing data about when the new template was created.
  createDate[date] String The exact time when the new template was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
previewUrl String A link to an image which shows the templates preview.
Response example
HTTP/1.1 200 OK
{
   "id": 6,
   "name": "My first test template",
   "createDate": {
       "date": "2015-03-31 17:15:34",
       "timezone": "Europe/Budapest",
       "timezone_type": 3
   },
   "editorCode": "",
   "htmlCode": "<html><head></head><body><b>TEST</b></body></html>",
   "hasBackup": false,
   "maxWidth": 650,
   "previewUrl": "https://img-dev.automizy.com/a3f719582a7f156d14ae33653504344f/preview/templates/286.jpg"
}
                

Getting a given template

GET
https://api.automizy.com/templates/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/templates/5' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/templates/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.templates().getRecordById(5) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new template
name String The name of the new template
editorCode String The code that the editor uses to create the template.
htmlCode String The html code of the new template
hasBackup Boolean The new template has backup.
maxWidth Number The maximal width of the new template
createDate Object The object containing data about when the new template was created.
  createDate[date] String The exact time when the new template was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
previewUrl String A link to an image which shows the templates preview.
Response example
HTTP/1.1 200 OK
{
   "id": 6,
   "name": "My first test template",
   "createDate": {
       "date": "2015-03-31 17:15:34",
       "timezone": "Europe/Budapest",
       "timezone_type": 3
   },
   "editorCode": "",
   "htmlCode": "<html><head></head><body><b>TEST</b></body></html>",
   "hasBackup": false,
   "maxWidth": 650,
   "previewUrl": "https://img-dev.automizy.com/a3f719582a7f156d14ae33653504344f/preview/templates/286.jpg"
}
                

Getting all templates

GET
https://api.automizy.com/templates
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/templates?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/templates",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.templates().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[templates] Object[] Array containing the templates.
    _embedded[templates][x] Object[] Object containing data of the template.
      _embedded[templates][x][id] Number The id of the template
      _embedded[templates][x][name] String The name of the template
      _embedded[templates][x][editorCode] String The code that the editor uses to create the template.
      _embedded[templates][x][htmlCode] String The html code of the template
      _embedded[templates][x][hasBackup] Boolean The template has backup.
      _embedded[templates][x][maxWidth] Number The maximal width of the templates
      _embedded[templates][x][_links] Object Links to the related REST APIs
      _embedded[templates][x][createDate] Object The object containing data about when the template was created.
        _embedded[templates][x][createDate][date] String The exact time when the template was created.
        _embedded[templates][x][createDate][timezone] String The timezone of the user.
        _embedded[templates][x][createDate][timezone_type] Number
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/templates?page=1"
		},
		"first":
		{
			"href": "https:\/\/api.automizy.com\/templates"
		},
		"last":
		{
			"href": "https:\/\/api.automizy.com\/templates?page=1"
		}
	},
	"_embedded":
	{
		"templates": [
		{
			"id": 35,
			"previewUrl": "https:\/\/img.automizy.com\/0a13431cad9c81709b2a4d0767d18190\/preview\/templates\/35.jpg",
			"name": "alma",
			"createDate":
			{
				"date": "2015-06-12 16:51:41",
				"timezone_type": 3,
				"timezone": "Europe\/Budapest"
			},
			"editorCode": "\u003Cdiv class=\u0022noblock\u0022\u003EDrag an item from the left side and drop it here!\u003C\/div\u003E\u003Cdiv class=\u0022pee-block\u0022 data-name=\u0022image\u0022 data-type=\u0022content\u0022\u003E\u003Cdiv class=\u0022pee-block-head ui-sortable-handle\u0022 style=\u0022display: none;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022pee-block-settings\u0022 data-title=\u0022Block settings\u0022 style=\u0022display: none;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022pee-block-copy\u0022 data-title=\u0022Copy this block\u0022 style=\u0022display: none;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022pee-block-bgcolor\u0022 data-title=\u0022Background color\u0022 style=\u0022display: none;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022pee-block-delete\u0022 data-title=\u0022Delete this block\u0022 style=\u0022display: none;\u0022\u003E\u003C\/div\u003E\n                    \n                    \u003Cdiv class=\u0022pee-block-content\u0022 style=\u0022background-color: rgb(255, 255, 255);\u0022\u003E\n                        \u003Cdiv align=\u0022center\u0022 class=\u0022pee-block-content-image imagein nocontrol\u0022 data-max-img-width=\u0022100%\u0022 data-fileid=\u00221_w9xiq0rpptlfw8jr\u0022\u003E\n                            \u003Cdiv align=\u0022center\u0022 class=\u0022control\u0022\u003E\u003Cimg src=\u0022vendor\/emaileditor\/images\/pee-sample.jpg\u0022 class=\u0022\u0022 data-width-in-percent=\u00220\u0022\u003E\u003C\/div\u003E\n                            \u003Cdiv align=\u0022center\u0022 class=\u0022control\u0022\u003E\u003Cinput type=\u0022button\u0022 value=\u0022Select image\u0022 class=\u0022simple-button\u0022\u003E\u003C\/div\u003E\n                        \u003Cdiv class=\u0022progressbar-box\u0022\u003E\u003Cdiv class=\u0022progressbar\u0022\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cdiv class=\u0022ui-wrapper\u0022 style=\u0022overflow: hidden; position: relative; width: 488px; height: 500px; top: auto; left: auto; margin: 0px; display: inline-block;\u0022\u003E\u003Cimg src=\u0022https:\/\/img.automizy.com\/0a13431cad9c81709b2a4d0767d18190\/emaileditor\/a26dd331e0af620cf1da2710912b2bf7c47cdefd.jpg\u0022 data-fileid=\u00220rp1r0olaqv6ajor\u0022 style=\u0022padding: 0px; margin: 0px; min-width: 0px; max-width: 100%; resize: none; position: static; zoom: 1; display: block; height: 500px; width: 488px;\u0022 alt=\u0022\u0022 data-href=\u0022http:\/\/\u0022 title=\u0022\u0022 class=\u0022ui-resizable\u0022 data-width-in-percent=\u002278\u0022\u003E\u003Cdiv class=\u0022ui-resizable-handle ui-resizable-e\u0022 style=\u0022z-index: 90;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022ui-resizable-handle ui-resizable-s\u0022 style=\u0022z-index: 90;\u0022\u003E\u003C\/div\u003E\u003Cdiv class=\u0022ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se\u0022 style=\u0022z-index: 90;\u0022\u003E\u003C\/div\u003E\u003C\/div\u003E\u003C\/div\u003E\n                    \u003C\/div\u003E\n                \u003C\/div\u003E\u003Cdiv class=\u0022pee-info-block\u0022 data-style-padding-top=\u00220px\u0022 data-style-padding-bottom=\u00220px\u0022 data-style-padding-left=\u00220%\u0022 data-style-padding-right=\u00220%\u0022 data-style-background-color=\u0022#eef4e6\u0022 data-style-border-color=\u0022#d7d7d7\u0022 data-style-border-width=\u00220px\u0022 data-style-max-width=\u0022650px\u0022\u003E\u003C\/div\u003E",
			"htmlCode": "\u003Chtml\u003E\u003Chead\u003E\u003Ctitle\u003Ealma\u003C\/title\u003E\u003Cmeta http-equiv=\u0022Content-Type\u0022 content=\u0022text\/html; charset=utf-8\u0022\u003E\u003Cmeta property=\u0022og:title\u0022 content=\u0022alma\u0022 \/\u003E\u003Cmeta property=\u0022og:description\u0022 content=\u0022...\u0022 \/\u003E\u003Cmeta property=\u0022og:type\u0022 content=\u0022website\u0022 \/\u003E\u003Cmeta property=\u0022og:url\u0022 content=\u0022%%webversion%%\u0022 \/\u003E\u003Cmeta property=\u0022og:image\u0022 content=\u0022https:\/\/www.automizy.com\/images\/editor-share-300x300.jpg\u0022 \/\u003E\u003Cstyle\u003E@media only screen and (max-width: 480px) {.column2{width: 100% !important;}}\u003C\/style\u003E\u003C\/head\u003E\u003Cbody align=\u0022center\u0022 width=\u0022100%\u0022 bgcolor=\u0022#eef4e6\u0022 style=\u0022text-align:center; width:100%; background-color:#eef4e6\u0022\u003E\u003Cdiv align=\u0022center\u0022 width=\u0022100%\u0022 bgcolor=\u0022#eef4e6\u0022 style=\u0022text-align:center; width:100%; background-color:#eef4e6\u0022\u003E\u003C!--[if mso]\u003E\u003Cdiv align=\u0022center\u0022 class=\u0022outlook\u0022 style=\u0022text-align:center\u0022\u003E\u003Ctable cellpadding=\u00220\u0022 cellspacing=\u00220\u0022 border=\u00220\u0022 width=\u0022650px\u0022 style=\u0022width:650px\u0022\u003E\u003Ctr\u003E\u003Ctd\u003E\u003C![endif]--\u003E\u003Ctable cellpadding=\u00220\u0022 cellspacing=\u00220\u0022 border=\u00220\u0022 style=\u0022width:100%; border:0px solid rgb(215, 215, 215); background-color:rgb(238, 244, 230); max-width:650px; margin:0 auto 0 auto; padding:0\u0022\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\u0022padding-top:0px; padding-bottom:0px; padding-left:0%; padding-right:0%\u0022\u003E\u003Cdiv\u003E\n                    \n                    \u003Ctable cellpadding=\u00220\u0022 cellspacing=\u00220\u0022 border=\u00220\u0022 width=\u0022100%\u0022 style=\u0022padding:0; margin:0; width:100%\u0022\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\u0022background-color:#ffffff;color:#000000;padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px;font-size:16px;font-family:Arial;clear:both;\u0022\u003E\n                        \u003Cdiv align=\u0022center\u0022 style=\u0022color:#000000;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:0px;font-family:Arial;vertical-align:top;text-align:center;\u0022\u003E\n                            \n                            \n                        \u003Cdiv style=\u0022color: rgb(0, 0, 0); padding: 0px; font-size: 0px; font-family: Arial; width: 100%; text-align: center;\u0022\u003E\u003Cimg src=\u0022https:\/\/img.automizy.com\/0a13431cad9c81709b2a4d0767d18190\/emaileditor\/a26dd331e0af620cf1da2710912b2bf7c47cdefd.jpg\u0022 style=\u0022max-width:78%\u0022 alt=\u0022\u0022 title=\u0022\u0022 data-width-in-percent=\u002278\u0022 width=\u0022488\u0022 data-mso-width=\u0022488\u0022 data-mso-height=\u0022500\u0022 data-img-id=\u00220\u0022\u003E\u003C\/img\u003E\u003C\/div\u003E\u003C\/div\u003E\n                    \u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n                \u003C\/div\u003E\u003Cdiv class=\u0022pee-info-block\u0022 data-style-padding-top=\u00220px\u0022 data-style-padding-bottom=\u00220px\u0022 data-style-padding-left=\u00220%\u0022 data-style-padding-right=\u00220%\u0022 data-style-background-color=\u0022#eef4e6\u0022 data-style-border-color=\u0022#d7d7d7\u0022 data-style-border-width=\u00220px\u0022 data-style-max-width=\u0022650px\u0022\u003E\u003C\/div\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\u003C!--[if mso]\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/table\u003E\u003C\/div\u003E\u003C![endif]--\u003E\u003C\/div\u003E\u003C\/body\u003E\u003C\/html\u003E",
			"hasBackup": false,
			"maxWidth": 650,
			"_links":
			{
				"self":
				{
					"href": "https:\/\/api.automizy.com\/templates\/35"
				}
			}
		}]
	},
	"page_count": 1,
	"page_size": 9223372036854775807,
	"total_items": 1,
	"page": 1
}
                

Removing a given template

DELETE
https://api.automizy.com/templates/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/templates/5' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/templates/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.templates().delete(5) //returns jqXHR
                

Updating a given template

PATCH
https://api.automizy.com/templates/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String Size range: 1..200
editorCodeoptional String The code that the editor uses to create the template.
htmlCodeoptional String The html code of the new template.
maxWidthoptional Number Size range: 0..
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/templates/5' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name": "Renamed template"
 }'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/templates/5",
    data:{
        "name": "Renamed template"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.templates().update({
    "name": "Renamed template"
}, 7) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new template
name String The name of the new template
editorCode String The code that the editor uses to create the template.
htmlCode String The html code of the new template
hasBackup Boolean The new template has backup.
maxWidth Number The maximal width of the new template
createDate Object The object containing data about when the new template was created.
  createDate[date] String The exact time when the new template was created.
  createDate[timezone] String The timezone of the user.
  createDate[timezone_type] Number
previewUrl String A link to an image which shows the templates preview.
Response example
HTTP/1.1 200 OK
{
   "id": 6,
   "name": "Renamed template"
   "createDate": {
       "date": "2015-03-31 17:15:34",
       "timezone": "Europe/Budapest",
       "timezone_type": 3
   },
   "editorCode": "",
   "htmlCode": "<html><head></head><body><b>TEST</b></body></html>",
   "hasBackup": false,
   "maxWidth": 650,
   "previewUrl": "https://img-dev.automizy.com/a3f719582a7f156d14ae33653504344f/preview/templates/286.jpg"
}
                

Users

Getting all users of the current site

GET
https://api.automizy.com/users
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/users?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/users",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.users().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[users] Object[] Array containing the users.
    _embedded[users][x] Object[] Object containing data of the users.
      _embedded[users][x][id] String The id of the user
      _embedded[users][x][lastName] String The last name of the user
      _embedded[users][x][firstName] String The first name of the user
      _embedded[users][x][status] String The status the user
      _embedded[users][x][email] String The email address of the user.
      _embedded[users][x][_links] Object Links to the related REST APIs
      _embedded[users][x][date] String The date the users was created.
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/users?page=1"
		},
		"first":
		{
			"href": "https:\/\/api.automizy.com\/users"
		},
		"last":
		{
			"href": "https:\/\/api.automizy.com\/users?page=1"
		}
	},
	"_embedded":
	{
		"users": [
		{
			"id": "U-664",
			"status": "active",
			"email": "john.doe@gmail.com",
			"date": "2016-01-22 20:23:23",
			"firstName": "John",
			"lastName": "Doe",
			"_links":
			{
				"self":
				{
					"href": "https:\/\/api.automizy.com\/users\/U-664"
				}
			}
		}]
	},
	"page_count": 1,
	"page_size": 9223372036854775807,
	"total_items": 1,
	"page": 1
}
                

Getting the currently logged in user

GET
https://api.automizy.com/users/current
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/users/current' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/users/current",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.users().getRecordById('current') //returns jqXHR
                
Success 200
'x' is the id of the site.
Field Type Description
firstName String The first name of the user.
id Number The id of the user.
lastName String The last name of the user.
company String The company of the user
currentSite String The site where the user is logged in.
fieldEnclosure String The character which is expected to be the field enclosure when importing.
Default: """
fieldSeparator String The character which is expected to be the field separator when importing.
Default: ";"
characterEncoding String The encoding format that the uses uses.
Default: "UTF-8"
intercomHash String A long, generated string to access intercom.
language String The language code of the user.
registrationTime Object The object containing data about the user's registration.
  registrationTime[date] String The exact time of the registration.
  registrationTime[timezone] String The timezone, where from the user registered.
  registrationTime[timezone_type] String
sites Object The object containing data about the sites the user can access.
  sites[x] Object An object containing data about a site the user can access.
  sites[x][company] String The company of the site.
timeZone String The timezone of the user.
userName String The email address the user uses for login.
isAdmin Boolean Shows if the current user is admin.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id": "18",
	"firstName": "John",
	"lastName": "Doe",
	"timeZone": "Europe\/Budapest GMT +01:00",
	"registrationTime":
	{
		"date": "2015-05-05 12:24:51",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"language": "en_US",
	"userName": "john.doe@gmail.com",
	"sites":
	{

		"578":
		{
			"company": "John Ltd."
		}
	},
	"characterEncoding": "ISO-8859-2",
	"fieldSeparator": ";",
	"fieldEnclosure": "\u0022",
	"currentSite": 578,
	"company": "johnltd",
	"intercomHash": "c033df58fcb078744d63aa40aacd9b056036fe3114b",
	"isAdmin": false,
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/users\/18"
		}
	}
}
                

Getting a given user

GET
https://api.automizy.com/users/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/users/18' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/users/18",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.users().getRecordById(18) //returns jqXHR
                
Success 200
'x' is the id of the site.
Field Type Description
firstName String The first name of the user.
id Number The id of the user.
lastName String The last name of the user.
company String The company of the user
currentSite String The site where the user is logged in.
fieldEnclosure String The character which is expected to be the field enclosure when importing.
Default: """
fieldSeparator String The character which is expected to be the field separator when importing.
Default: ";"
characterEncoding String The encoding format that the uses uses.
Default: "UTF-8"
intercomHash String A long, generated string to access intercom.
language String The language code of the user.
registrationTime Object The object containing data about the user's registration.
  registrationTime[date] String The exact time of the registration.
  registrationTime[timezone] String The timezone, where from the user registered.
  registrationTime[timezone_type] String
sites Object The object containing data about the sites the user can access.
  sites[x] Object An object containing data about a site the user can access.
  sites[x][company] String The company of the site.
timeZone String The timezone of the user.
userName String The email address the user uses for login.
isAdmin Boolean Shows if the current user is admin.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
	"id": "18",
	"firstName": "John",
	"lastName": "Doe",
	"timeZone": "Europe\/Budapest GMT +01:00",
	"registrationTime":
	{
		"date": "2015-05-05 12:24:51",
		"timezone_type": 3,
		"timezone": "Europe\/Budapest"
	},
	"language": "en_US",
	"userName": "john.doe@gmail.com",
	"sites":
	{

		"578":
		{
			"company": "John Ltd."
		}
	},
	"characterEncoding": "ISO-8859-2",
	"fieldSeparator": ";",
	"fieldEnclosure": "\u0022",
	"currentSite": 578,
	"company": "johnltd",
	"intercomHash": "c033df58fcb078744d63aa40aacd9b056036fe3114b",
	"isAdmin": false,
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/users\/18"
		}
	}
}
                

Getting the currently logged in user's supported timezones

GET
https://api.automizy.com/users/supported-time-zones
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/users/supported-time-zones' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/users/supported-time-zones",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
//No Automizy JS Api function for this yet
                
Success 200
Field Type Description
Array String[] The array containing all the supported timezones.
Response example
HTTP/1.1 200 OK
{
    [
        "Africa/Abidjan GMT +00:00",
        "Africa/Accra GMT +00:00",
        "Africa/Addis_Ababa GMT +03:00",
        .
        .
        .
    ]
}
                

Jobs

Getting all jobs

GET
https://api.automizy.com/jobs
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/jobs?where%5B0%5D%5B0%5D%5B0%5D=name&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%test%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/jobs",
    data:{
        where:[
            [
                ['name', 'like', '%test%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.jobs().where([
    [
        ["name", "like", "%test%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[jobs] Object[] Array containing the campaigns.
    _embedded[jobs][x] Object[] Object containing data of a campaign.
      _embedded[jobs][x][id] Number The id of the job.
      _embedded[jobs][x][name] String The name of the job.
      _embedded[jobs][x][progressCurrent] Number The current progress of the job, for example number of already imported rows when importing.
      _embedded[jobs][x][progressMax] Number The maximum progress of the job, for example the total number of rows when importing.
      _embedded[jobs][x][started] Object Date object containing data about when the job started.
        _embedded[jobs][x][started][date] String The exact time when the job started.
        _embedded[jobs][x][started][timezone] String The timezone of the user.
        _embedded[jobs][x][started][timezone_type] Number
      _embedded[jobs][x][finished] Object Date object containing data about when the job finished.
Only campaign send jobs get this value.
        _embedded[jobs][x][finished][date] String The exact time when the job started.
        _embedded[jobs][x][finished][timezone] String The timezone of the user.
        _embedded[jobs][x][finished][timezone_type] Number
      _embedded[jobs][x][status] String The status of the job.
Values: SCHEDULED, RUNNING, PAUSED, FINISHED, CANCELED, ERROR, SCHEDULED_PAUSED, CONTACT_LIMIT_REACHED, EMAIL_LIMIT_REACHED
      _embedded[jobs][x][visibleUntil] Object The time object indicating when the job will disappear.
        _embedded[jobs][x][visibleUntil][date] String The exact time when the job disappears.
        _embedded[jobs][x][visibleUntil][timezone] String The timezone of the user.
        _embedded[jobs][x][visibleUntil][timezone_type] Number
      _embedded[jobs][x][type] String The type of the job.
Values: EMAIL_SEND, SEGMENT_CALCULATE, SEGMENT_SAVE, IMPORT_CONTACTS, EXPORT_TABLE, CAMPAIGN_SEND, LEAD_SCORE_GENERATE, SPLIT_TEST, SPLIT_TEST_CAMPAIGN, IMPORT_CONTACTS_FROM_ARRAY, BULK_CHANGE
      _embedded[jobs][x][referenceId] Number The campaign, segment, import, etc. id the job refers to.
      _embedded[jobs][x][parent] Number. The id of the parent job if there is one.
      _embedded[jobs][x][isStoppable] Boolean Shows if the job is stoppable.
      _embedded[jobs][x][isPausable] Boolean Shows if the job is pauseable.
      _embedded[jobs][x][children] Array Array containing the id of children jobs.
      _embedded[jobs][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
                    {
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/jobs?where[0][0][0]=name\u0026where[0][0][1]=like\u0026where[0][0][2]=%test%"
		}
	},
	"_embedded":
	{
		"jobs": [{
			"id": 2926,
			"name": "My test campaign 2016. 05. 13. 16:39:25",
			"progressCurrent": 0,
			"progressMax": 2,
			"started":
			{
				"date": "2016-05-18 14:46:13",
				"timezone_type": 3,
				"timezone": "Europe\/Budapest"
			},
			"finished": null,
			"status": "CONTACT_LIMIT_REACHED",
			"visibleUntil": null,
			"type": "CAMPAIGN_SEND",
			"referenceId": 706,
			"parent": null,
			"isStoppable": true,
			"isPausable": true,
			"children": [],
			"_links":
			{
				"self":
				{
					"href": "https:\/\/api.automizy.com\/jobs\/2926"
				}
			}
		}]
	},
	"page_count": 0,
	"page_size": 9223372036854775807,
	"total_items": 0,
	"page": 0
}

                

Getting a given job

GET
https://api.automizy.com/jobs/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/jobs/7' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/jobs/7",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.jobs().getRecordById(7) //return jqXHR
                
Success 200
Field Type Description
id Number The id of the job.
name String The name of the job.
progressCurrent Number The current progress of the job, for example number of already imported rows when importing.
progressMax Number The maximum progress of the job, for example the total number of rows when importing.
started Object Date object containing data about when the job started.
  started[date] String The exact time when the job started.
  started[timezone] String The timezone of the user.
  started[timezone_type] Number
finished Object Date object containing data about when the job finished.
Only campaign send jobs get this value.
  finished[date] String The exact time when the job started.
  finished[timezone] String The timezone of the user.
  finished[timezone_type] Number
status String The status of the job.
Values: SCHEDULED, RUNNING, PAUSED, FINISHED, CANCELED, ERROR, SCHEDULED_PAUSED, CONTACT_LIMIT_REACHED, EMAIL_LIMIT_REACHED
visibleUntil Object The time object indicating when the job will disappear.
  visibleUntil[date] String The exact time when the job disappears.
  visibleUntil[timezone] String The timezone of the user.
  visibleUntil[timezone_type] Number
type String The type of the job.
Values: EMAIL_SEND, SEGMENT_CALCULATE, SEGMENT_SAVE, IMPORT_CONTACTS, EXPORT_TABLE, CAMPAIGN_SEND, LEAD_SCORE_GENERATE, SPLIT_TEST, SPLIT_TEST_CAMPAIGN, IMPORT_CONTACTS_FROM_ARRAY, BULK_CHANGE
referenceId Number The campaign, segment, import, etc. id the job refers to.
parent Number. The id of the parent job if there is one.
isStoppable Boolean Shows if the job is stoppable.
isPausable Boolean Shows if the job is pauseable.
children Array Array containing the id of children jobs.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    "id": 2926,
    "name": "My campaign 2016. 05. 13. 16:39:25",
    "progressCurrent": 0,
    "progressMax": 2,
    "started":
    {
        "date": "2016-05-18 14:46:13",
        "timezone_type": 3,
        "timezone": "Europe\/Budapest"
    },
    "finished": null,
    "status": "CONTACT_LIMIT_REACHED",
    "visibleUntil": null,
    "type": "CAMPAIGN_SEND",
    "referenceId": 706,
    "parent": null,
    "isStoppable": true,
    "isPausable": true,
    "children": [],
    "_links":
    {
        "self":
        {
            "href": "https:\/\/api.automizy.com\/jobs\/2926"
        }
    }
}
                

Webhooks

Webhooks are events which can be triggered when a special event happens to a contact.

Creating a webhook

POST
https://api.automizy.com/webhooks
Permission: Logged in user
Parameters
Field Type Description
type String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
url String The url of the webhook.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/webhooks' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "type": "UNSUBSCRIBE",
    "url": "https://automizy.com",
 }'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/webhooks",
    data:{
        "type": "UNSUBSCRIBE",
        "url": "https://automizy.com",
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.webhooks().insert({
    "type": "UNSUBSCRIBE",
    "url": "https://automizy.com",
 })
                
Success 200
Field Type Description
id Number The id of the new webhook.
type String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
url String The url of the webhook.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    id: "1",
    type: "UNSUBSCRIBE",
    url: "https://automizy.com/",
    _links:{
		self:{
			href: "https:\/\/api.automizy.com\/webhooks\/1"
		}
	}

}
                

Getting all webhooks

GET
https://api.automizy.com/webhooks
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
Size range: 0..
pageoptional Number The offset of the result
Default value: 1
Size range: 1..
fieldsoptional String The required fields separated with ',' character
linksoptional String The required links separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:asc
whereoptional String[][] Collection filter
  where[x] String[] The array of logical groups. The conditions inside the groups are joined with the "and" logical operator, while the groups are joined with the "or" logical operator.
    where[x][0] String Field name
    where[x][1] String Relation
Allowed values: "between", "eq", "neq", "gt", "gte", "in", "like", "lt", "lte"
    where[x][2] String Value
curl
jQuery
Automizy Js Api
#Filtering the collection where url contains the word 'automizy':
$ curl 'https://api.automizy.com/contacts?where%5B0%5D%5B0%5D%5B0%5D=url&where%5B0%5D%5B0%5D%5B0%5D=like&where%5B0%5D%5B0%5D%5B0%5D=%automizy%' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/webhooks",
    data:{
        where:[
            [
                ['url', 'like', '%automizy%']
            ]
        ]
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.webhooks().where([
    [
        ["url", "like", "%automizy%"]
    ]
]).get() //returns jqXHR
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[webhooks] Object[] Array containing the newsletters.
    _embedded[webhooks][x] Object[] Object containing data of the webhook.
    _embedded[webhooks][x][id] Number The id of the webhook.
    _embedded[webhooks][x][type] String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
    _embedded[webhooks][x][url] String The url of the webhook.
    _embedded[webhooks][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/webhooks?page=1"
		},
		"first":
		{
			"href": "https:\/\/api.automizy.com\/webhooks"
		},
		"last":
		{
			"href": "https:\/\/api.automizy.com\/webhooks?page=1"
		}
	},
	"_embedded":
	{
		"webhooks": [
		{
			"id": "1",
			"type": "UNSUBSCRIBE",
			"url": "https://automizy.com/",
			"_links":
			{
				"self":
				{
					"href": "https:\/\/api.automizy.com\/webhooks\/1"
				}
			}
		}]
	},
	"page_count": 1,
	"page_size": 9223372036854775807,
	"total_items": 1,
	"page": 1
}
                

Getting a given webhook

GET
https://api.automizy.com/webhooks/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/webhooks/1' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/webhooks/1",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.webhooks().getRecordById(1) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the webhook.
type String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
url String The url of the webhook.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    id: "1",
    type: "UNSUBSCRIBE",
    url: "https://automizy.com/",
    _links:{
		self:{
			href: "https:\/\/api.automizy.com\/webhooks\/1"
		}
	}

}
                

Removing a given webhook

DELETE
https://api.automizy.com/webhooks/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/webhooks/5' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/webhooks/5",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
$AA.contacts().webhooks.delete(5) //returns jqXHR
                

Updating a given webhook

PATCH
https://api.automizy.com/webhooks/:id
Permission: Logged in user
Parameters
Field Type Description
typeoptional String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
urloptional String
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/webhooks/1' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "url": "https://api.automizy.com/"
 }'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/webhooks/1",
    data:{
        "url": "https://api.automizy.com/"
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.webhooks().update({
    "url": "https://api.automizy.com/"
}, 1) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the webhook.
type String The type of the webhook
Allowed values: UNSUBSCRIBE, BOUNCE, CLICK
url String The url of the webhook.
_links Object Links to the related REST APIs
Response example
HTTP/1.1 200 OK
{
    id: "1",
    type: "UNSUBSCRIBE",
    "url": "https://api.automizy.com/",
    _links:{
		self:{
			href: "https:\/\/api.automizy.com\/webhooks\/1"
		}
	}

}
                

Outgoing Webhooks

The data sent to the url you provided in case an event triggered.
GET
https://url.provided.by.you
WEBHOOK - CLICK
Field name Example value Description
au_contact_id 115 Id of the contact.
au_contact_email john.doe@email.com Email address of the contact.
au_campaign_id 119 The id of the clicked campaign.
au_type 1 The type of the event.
1 in case of click.
WEBHOOK - UNSUBSCRIBE
Field name Example value Description
au_contact_id 115 Id of the contact.
au_contact_email john.doe@email.com Email address of the contact.
au_type 2 The type of the event.
2 in case of unsubscribe.
WEBHOOK - BOUNCE
Field name Example value Description
au_contact_id 115 Id of the contact.
au_contact_email john.doe@email.com Email address of the contact.
au_contact_status ACTIVE Status of the contact.
au_bounce_type SOFT The type of bounce.
au_bounce_code 5.4.4 Standardized bounce code.
au_type 3 The type of the event.
3 in case of bounce.

Other functions

Getting the logged in account.

GET
https://api.automizy.com/account
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/account' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/account",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
$AA.account().get()
                
Success 200
Field Type Description
company String The company which has the account.
hash String The hash code of the account. Needed for Automizy Analytics for example.
isScriptInserted boolean True, if the user has inserted the Automizy Analytics script in his webpage.
isFree Boolean Shows if the account is a free account.
defaults Object Object containing some default settings.
  defaults[senderName] String Default sender name at campaigns.
  defaults[senderEmail] String Default sender email address at campaigns.
  defaults[replyEmail] String Default sender reply address at campaigns.
  defaults[emailFooter] String Html code of the footer.
  defaults[unsubscribeHtml] String Html code of the unsubscribe section.
  defaults[bounceAddress] String Bounce email address, where bounced email go.
  defaults[softBounceThreshold] String This sets a limit, above this number soft bounces will be counted as hard ones.
  defaults[unsubscribeNotificationEmail] String The email address where notifications about unsubscriptions will be sent.
settings Object Object containing additional settings.
  settings[emails] Object Object containing email-related settings.
    settings[emails][unsubscribeLinkRequired] Boolean If true, inserting an unsubscribe link is obligatory in every email.
    settings[emails][bounceAddressConfigurable] Boolean If true, user can set the bounce email address.
    settings[emails][attachmentsEnabled] Boolean If true, attachments will be enabled is emails.
    settings[emails][canEmbedImagesIntoEmail] Boolean If true, embedding pictures in emails will be enabled.
  settings[customFields] Object Object containing settings about custom fields.
    settings[customFields][textFieldEnabled] Boolean If true, user can use long text custom fields.
  settings[imports] Object Object containing settings about imports.
    settings[imports][canImportNewContacts] Boolean If true, user can import new contacts.
  settings[segments] Object Object containing settings about segments.
    settings[segments][canLimitSegmentsSize] Boolean If true, user can set maximum segment size.
Contacts will be ordered by lead score, and only the top X of them will be on the segment.
Response example
HTTP/1.1 200 OK
{
    {
	"id": 14,
	"company": "John Ltd.",
	"isFree": false,
	"hash": "14AUSSAAQSSZMD3T6O0IBOIZS",
	"type": "MONTHLY.AUTOMIZY",
	"isScriptInserted": true,
	"defaults":
	{
		"senderName": "John Doe",
		"senderEmail": "john.doe@gmail.com",
		"replyEmail": "john.doe@gmail.com",
		"emailFooter": null,
		"unsubscribeHtml": null,
		"bounceAddress": null,
		"softBounceThreshold": 5,
		"unsubscribeNotificationEmail": null
	},
	"settings":
	{
		"emails":
		{
			"unsubscribeLinkRequired": true,
			"bounceAddressConfigurable": true,
			"attachmentsEnabled": true,
			"canEmbedImagesIntoEmail": true
		},
		"customFields":
		{
			"textFieldEnabled": true
		},
		"imports":
		{
			"canImportNewContacts": true
		},
		"segments":
		{
			"canLimitSegmentsSize": true
		}
	}
}
}
                

Getting the 'Unsubscribed' form.

When a contact clicks on the unsubscribe link, this form will be shown to him.
GET
https://api.automizy.com/custom-html/unsubscribe
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/custom-html/unsubscribe' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/custom-html/unsubscribe",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
//No Automizy JS Api function for this yet
                
Success 200
Field Type Description
html String The html code of the unsubscribed form.
Response example
HTTP/1.1 200 OK
{
    html: "<!DOCTYPE html>↵<html>↵<head>↵<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />↵</head>↵<body>↵<p>You have been successfully unsubscribed</p>↵</body>↵</html>"
}
                

Getting the finished imports

GET
https://api.automizy.com/contact-imports
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/contact-imports' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/contact-imports",
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section.
                
//No Automizy JS Api function for this yet
                
Success 200
Field Type Description
_links Object Links to the related REST APIs
_embedded Object Contains the results and additional data
  _embedded[contactImports] Object[] Array containing the imports.
    _embedded[contactImports][x] Object The 'x'th import.
      _embedded[contactImports][x][id] String The id of the import.
      _embedded[contactImports][x][name] String The name of the import.
      _embedded[contactImports][x][importedSubscriberCount] Number The number of contacts who were imported during this import process.
      _embedded[contactImports][x][date] Object The object containing data about when the import was done.
        _embedded[contactImports][x][date][date] String The exact time of the registration.
        _embedded[contactImports][x][date][timezone] String The timezone, where from the user registered.
        _embedded[contactImports][x][date]timezone_type] String
      _embedded[contactImports][x][alreadyInDatabaseErrorCount] Number The number of contacts who were already in the database.
      _embedded[contactImports][x][unSubscribedErrorCount] Number The number of contacts who already unsubscribed.
      _embedded[contactImports][x][invalidEmailAddressErrorCount] Number The number of invalid email addresses in the import file.
      _embedded[contactImports][x][creationForbiddenErrorCount] Object If importing new contacts is disabled, only updating already existing ones is permitted, then this shows how many new contacts were in the import file.
      _embedded[contactImports][x][bannedContactErrorCount] Number Number of contacts who were in the import file, but are banned.
      _embedded[contactImports][x][_links] Object Links to the related REST APIs
page_count Integer The number of pages needed to show the results.
page_size Integer The number of items shown on one page.
total_items Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
	"_links":
	{
		"self":
		{
			"href": "https:\/\/api.automizy.com\/contact-imports?page=1"
		},
		"first":
		{
			"href": "https:\/\/api.automizy.com\/contact-imports"
		},
		"last":
		{
			"href": "https:\/\/api.automizy.com\/contact-imports?page=1"
		}
	},
	"_embedded":
	{
		"contactImports": [
		{
			"id": "1",
			"name": "Import 2015-04-30 17:15:37",
			"date":
			{
				"date": "2015-04-30 17:15:37",
				"timezone_type": 3,
				"timezone": "Europe\/Budapest"
			},
			"importedSubscriberCount": 10000,
			"alreadyInDatabaseErrorCount": 0,
			"unSubscribedErrorCount": 0,
			"invalidEmailAddressErrorCount": 1,
			"creationForbiddenErrorCount":
			{},
			"bannedContactErrorCount": 0,
			"_links":
			{
				"self":
				{
					"href": "https:\/\/api.automizy.com\/contact-imports\/1"
				}
			}
		}]
	},
	"page_count": 1,
	"page_size": 9223372036854775807,
	"total_items": 1,
	"page": 1
}