Automizy REST API Docs

Old Rest API 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.

Where is the Old Rest Api?

Click here if you use the old Rest Api and you want to read the old documentation. But warning, these APIs are deprecated.

Headers

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

Authentication headers

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 value: "application/json"

"application/json" is easier to handle, but response is limited, you can get 500 data rows maximally.
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 Settings menu in the bottom-left corner.
  • You click on 'API Token' menu.
  • 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.

Contacts

Contacts are the people, email addresses you order into send your campaigns.

Getting a given contact

GET
https://api.automizy.com/v2/contacts/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/contacts/84' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/contacts/84",
    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.contacts2().getRecordById(84) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the contact.
email String The email address of the contact.
status String The status of the contact.
requestDate String The date when the contact got the subscription request. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
requestIp String The IP address of the client.
unsubscribeDate Object The date when the contact unsubscribed, plus timezone info. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
leadScore Number The lead score of the contact.
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
smartLists Object[] The lists of the contact.
tags String[] The tags of the contact.
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@automizy.com",
    "status": "ACTIVE",
    "requestDate": "1997-07-16T19:20:30+01:00",
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": 0,
    "smartLists": [
        {
            "id":12,
            "name":"my list"
        },
        {
            "id":18,
            "name":"my other list"
        }
    ],
    "tags":["test 1", "test 2"],
    "customFields": {
        2: "Max",
        5: null,
        6: "1989-07-26T00:00:00+01:00"
    }
}
                

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.m35dhfte769fdz",
   "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
smartLists Array 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
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.m35dhfte769fdz",
    "smartLists": [2, 5],
    "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.m35dhfte769fdz",
        "smartLists": [2, 5],
        "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.m35dhfte769fdz"
}
                

Removing a given contact

DELETE
https://api.automizy.com/v2/contacts/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/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/v2/contacts/:id
Permission: Logged in user
Parameters
Field Type Description
email String The email address of the contact.
smartLists Integer[] The ids of the lists you want to set to the contact.
statusoptional String The status of the contact. You can only send email to contacts with ACTIVE status.
Allowed values: ACTIVE, INACTIVE, BOUNCED, UNSUBSCRIBED, BANNED
customFieldsoptional Object Object containing custom fields.
  customFields[x] Mixed 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 formats:
    • YYYY-MM-DD (eg 1997-07-16)
    • YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00 or 1997-07-16T19:20:30Z).
tagsoptional String[] The tags you want to set to the contact.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/contacts/5' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
                    -d '
{
    "customFields":{
        2:"Boss"
    }
}'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/v2/contacts/5",
    data:{
        "customFields":{
            2:"Boss"
        }
    },
    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.contacts2().update({
    "customFields":{
        2:"Boss"
    }
},5);
                
Success 200
Field Type Description
id Number The id of the contact.
email String The email address of the contact.
status String The status of the contact.
requestDate String The date when the contact got the subscription request. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
requestIp String The IP address of the client.
unsubscribeDate Object The date when the contact unsubscribed, plus timezone info. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
leadScore Number The lead score of the contact.
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
smartLists String[] The list ids of the contact.
tags String[] The tags of the contact.
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@automizy.com",
    "status": "ACTIVE",
    "requestDate": "1997-07-16T19:20:30+01:00",
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": 0,
    "smartLists": [2, 5],
    "tags":["test 1", "test 2"],
    "customFields": {
        2: "Max",
        5: null,
        6: "1989-07-26T00:00:00+01:00"
    }
}
                

Lists

Lists API organizes subscribers into different groups.
Currently in Automizy you can't create a contact that doesn't belong to at least one list.

Creating a new list

POST
https://api.automizy.com/v2/smart-lists
Permission: Logged in user
Parameters
Field Type Description
name String The name of the new list.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/smart-lists' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name":"My new list"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/smart-lists",
    data:{
        "name":"My new list"
},
    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.smartLists().insert({
    "name":"My new list"
}) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the given lists.
name String The name of the given lists.
createdAt String The date of the given list created.
filters Array The filters of the given list.
contactsCount Number The number of the contacts is on the given list.
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "createdAt": "2018-02-18T13:54:55+01:00",
    "filters": [],
    "name": "My new list",
    "contactsCount": 0
}
                

Creating a new contact on a list

POST
https://api.automizy.com/v2/smart-lists/:id/contacts
Permission: Logged in user
Parameters
Field Type Description
email String The email address of the contact.
statusoptional String The status of the contact. You can only send email to contacts with ACTIVE status.
Allowed values: ACTIVE, INACTIVE, BOUNCED, UNSUBSCRIBED, BANNED
customFieldsoptional Object Object containing custom fields.
  customFields[x] Mixed Object containing data of a custom fields.
Allowed formats for different types of custom fields:
  • STRING: Custom text.
  • INTEGER: Custom integer.
  • DATETIME: String in the following formats:
    • YYYY-MM-DD (eg 1997-07-16)
    • YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00 or 1997-07-16T19:20:30Z).
tagsoptional String[] The tags you want to set to the contact.
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/smart-lists/12/contacts' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
{
    "email":"testuser@automizy.com",
    "customFields":{
        "birthday":"1997-07-16"
    }
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/smart-lists/12/contacts",
    data:{
        "email":"testuser@automizy.com",
        "customFields":{
            "birthday":"1997-07-16"
        }
    },
    headers: {Authorization: 'Bearer ' + window.accessToken},
    success: function (data){
        console.log(data)
    }
 });
//What is the window.accessToken? You can see it in the Authentication section
                
//smartListId = 12
$AA.smartLists().addContact(12, {
    "email":"testuser@automizy.com",
    "customFields":{
        "birthday":"1997-07-16"
    }
});
                
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.
requestDate String The date when the contact got the subscription request. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
requestIp String The IP address of the client.
unsubscribeDate Object The date when the contact unsubscribed, plus timezone info. Format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
leadScore Number The lead score of the new contact.
customFields Object Object containing custom fields.
  customFields[x] String/Array Object containing data of a custom field.
customFields Object[] The list ids of the new contact.
tags String[] The tags of the new contact.
Response example
HTTP/1.1 200 OK
{
    "id": 5,
    "email": "testuser@automizy.com",
    "status": "ACTIVE",
    "requestDate": "1997-07-16T19:20:30+01:00",
    "requestIp": null,
    "unsubscribeDate": null,
    "leadScore": 0,
    "smartLists": [
        {
            "id":12,
            "name":"my list"
        },
        {
            "id":18,
            "name":"my other list"
        }
    ],
    "tags":["test 1", "test 2"],
    "customFields": {
        2: "Max",
        5: null,
        6: "1989-07-26T00:00:00+01:00"
    }
}
                

Getting all lists

GET
https://api.automizy.com/v2/smart-lists
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
pageoptional Number The offset of the result
Default value: 1
fieldsoptional String The required fields separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:desc
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/smart-lists' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/smart-lists",
    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.smartLists().get() //returns jqXHR
                
Success 200
Field Type Description
smartLists Array Array containing the lists.
smartLists[x] Object Object containing data of lists.
  smartLists[x][id] Number The id of the list.
  smartLists[x][name] String The name of the list.
  smartLists[x][createdAt] String The date of the list created.
  smartLists[x][contactsCount] Number The number of the contacts is on the list.
  smartLists[x][filters] Array The filters of the list.
pageCount Integer The number of pages needed to show the results.
pageSize Integer The number of items shown on one page.
page Integer The actual page.
totalItems Integer The number of results.
Response example
HTTP/1.1 200 OK
{
    "smartLists": [{
        "id": 84,
        "createdAt": "2018-02-18T13:54:55+01:00",
        "filters": [],
        "name": "The best list ever",
        "contactsCount": 0
    },
    {
        "id": 85,
        "createdAt": "2018-02-18T13:57:34+01:00",
        "filters": [],
        "name": "Almost the best list ever",
        "contactsCount": 0
    }]
    "pageCount": 1,
    "pageSize": 500,
    "totalItems": 2,
    "page": 1
}
                

Getting all contacts from a list

GET
https://api.automizy.com/v2/smart-lists/:id/contacts
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
pageoptional Number The offset of the result
Default value: 1
fieldsoptional String The required fields separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:desc
curl
jQuery
Automizy Js Api
#Filtering the collection where email ends with "@example.com":
$ curl 'https://api.automizy.com/v2/smart-lists/:id/contacts' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/smart-lists/:id/contacts",
    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().getContactsById(smartListId) //returns jqXHR
                
Success 200
Field Type Description
contacts Object[] Array containing the contacts.
  contacts[x] Object[] Object containing data of contact.
  contacts[x][id] Number The id of the contact.
  contacts[x][email] String The email address of the contact.
  contacts[x][status] String The status of the contact.
  contacts[x][requestDate] Object The date when the contact got the subscription requiest.
  contacts[x][requestIp] String The IP address of the client.
  contacts[x][unsubscribeDate] Object The date when the contact unsubscribed.
  contacts[x][leadScore] Number The lead score of the new contact.
  contacts[x][customFields] Object Object containing custom fields.
    contacts[x][customFields][x] String/Array Object containing data of a custom field.
  contacts[x][tags] String[] The tags on the contact.
pageCount Integer The number of pages needed to show the results.
pageSize Integer The number of items shown on one page.
totalItems Integer The number of results.
page Integer The actual page.
Response example
HTTP/1.1 200 OK
{
    "contacts": [{
        "id": 5,
        "email": "testuser@automizy.com",
        "status": "ACTIVE",
        "requestDate": "1997-07-16T19:20:30+01:00",
        "requestIp": null,
        "unsubscribeDate": null,
        "leadScore": 0,
        "smartLists": [
                {id:21, name:"Test list 1"},
                {id:32, name:"Test list 2"}
            ],
        "tags":["test 1", "test 2"],
        "customFields": {
            2: "Max",
            5: null,
            6: "1989-07-26T00:00:00+01:00"
        }
    }]
    "pageCount": 1,
    "pageSize": 1000,
    "totalItems": 1,
    "page": 1
}
                

Getting a given list

GET
https://api.automizy.com/v2/smart-lists/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/smart-lists/83' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/smart-lists/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.smartLists().getRecordById(83) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the given lists.
name String The name of the given lists.
createdAt String The date of the given list created.
filters Array The filters of the given list.
contactsCount Number The number of the contacts is on the given list.
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "createdAt": "2018-02-18T13:54:55+01:00",
    "filters": [],
    "name": "The best list ever",
    "contactsCount": 0
}
                

Removing a given list

DELETE
https://api.automizy.com/v2/smart-lists/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/smart-lists/84' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/v2/smart-lists/84",
    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.smartLists().delete(84) //returns jqXHR
                

Updating a given list

PATCH
https://api.automizy.com/v2/smart-lists/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The new name of the list.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/smart-lists/84' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name":"Awesome list"
}'
                
$.ajax({
    type: "PATCH",
    url: "https://api.automizy.com/v2/smart-lists/84",
    data:{
        "name":"Awesome list"
},
    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.smartLists().update({
    "name":"Awesome list"
}, 84) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the given lists.
name String The name of the given lists.
createdAt String The date of the given list created.
filters Array The filters of the given list.
contactsCount Number The number of the contacts is on the given list.
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "createdAt": "2018-02-18T13:54:55+01:00",
    "filters": [],
    "name": "Awesome list",
    "contactsCount": 0
}
                

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/v2/custom-fields
Permission: Logged in user
Parameters
Field Type Description
name String The name of the new custom field.
You can insert this in to the email, between {{ and }} signs.
For example: "Hey {{nick name}}!"
type String Allowed values: STRING, INTEGER, DATETIME
label String The label of the new custom field. You see this in the custom field lists and tables.
defaultoptional String You can give a default value to each custom field. If you send an email to a contact who has no value in the custom field, the default value is inserted.

For example:
1. You set the "nick name" custom field default value to "Bro".
2. After that you send an email to a contact (who has no nick name) with this text: "Hey {{nick name}}!".
3. The contact received this: "Hey Bro!".
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/custom-fields' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
	"type":"STRING",
	"name":"nick name",
	"default":"Bro",
	"label":"Nick Name"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/custom-fields",
    data:{
        "type":"STRING",
        "name":"nick name",
        "default":"Bro",
        "label":"Nick Name"
    },
    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.customFields2().insert({
    "type":"STRING",
    "name":"nick name",
    "default":"Bro",
    "label":"Nick Name"
});
                
Success 200
Field Type Description
id Number The id of the new custom field.
name String The name of the new custom field.
default String The default value of the new custom field.
label String The label of the new custom field.
type String The type of the new custom field.
priority Number The priority of the new custom field. [not in use]
Response example
HTTP/1.1 200 OK
{
    "id": 83,
    "name": "nick name",
    "type": "STRING",
    "label": "Nick Name",
    "default": "Bro",
    "priority": 0
}
                

Getting all custom fields

GET
https://api.automizy.com/v2/custom-fields
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
pageoptional Number The offset of the result
Default value: 1
fieldsoptional String The required fields separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:desc
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/v2/custom-fields' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/custom-fields",
    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.customFields2().get() //returns jqXHR
                
Success 200
Field Type Description
customFields Array Array containing the custom fields.
customFields[x] Object Object containing data of custom fields.
  customFields[x][id] Number The id of the custom field.
  customFields[x][name] String The name of the new custom field.
  customFields[x][default] String The default value of the custom field.
  customFields[x][label] String The label of the new custom field.
  customFields[x][priority] Number The priority of the new custom field.
  customFields[x][type] String The type of the new custom field.
pageCount Integer The number of pages needed to show the results.
pageSize Integer The number of items shown on one page.
page Integer The actual page.
totalItems Integer The number of results.
Response example
HTTP/1.1 200 OK
{
    "customFields": [{
        "id": 84,
        "name": "nick name",
        "label": "Nick Name",
        "default": "Bro",
        "type": "STRING",
        "priority": 0
    },
    {
        "id": 85,
        "name": "birthday",
        "label": "Birthday",
        "default": null,
        "type": "DATETIME",
        "priority": 0
    }]
    "pageCount": 1,
    "pageSize": 500,
    "totalItems": 2,
    "page": 1
}
                

Getting a given custom field

GET
https://api.automizy.com/v2/custom-fields/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/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/v2/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.customFields2().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.
default String The default value of the new custom field.
label String The label of the new custom field.
type String The type of the new custom field.
priority Number The priority of the new custom field. [not in use]
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "name": "nick name",
    "label": "Nick Name",
    "default": "Bro",
    "type": "STRING",
    "priority": 0
}
                

Removing a given custom field

DELETE
https://api.automizy.com/v2/custom-fields/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/custom-fields/84' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/v2/custom-fields/84",
    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.customFields2().delete(84) //returns jqXHR
                

Updating a given custom field

PATCH
https://api.automizy.com/v2/custom-fields/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The new name of the custom field.
labeloptional String The new label of the custom field.
defaultoptional String The new default value of the custom field.
priorityoptional Number The new priority of the custom field.
You can't change the type of the custom field
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/custom-fields/84' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "label":"Other Nick Name"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/custom-fields/84",
    data:{
        "label":"Other Nick Name"
},
    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.customFields2().update({
    "label":"Other Nick Name"
}, 84) //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.
default String The default value of the new custom field.
label String The label of the new custom field.
type String The type of the new custom field.
priority Number The priority of the new custom field. [not in use]
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "name": "nick name",
    "label": "Nick Name",
    "default": "Bro",
    "type": "STRING",
    "priority": 0
}
                

Tags

Tags are short metadescriptions that can be added to contacts. It is mostly used to show the life-cycle stage, interest or different statuses of contacts in your marketing and sales funnel. Contacts can be filtered based on tags and can be easily segmented based on this metadata.

Creating a new tag

POST
https://api.automizy.com/v2/contacts/tag-manager
Permission: Logged in user
Parameters
Field Type Description
name String The name of the new tag.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/contacts/tag-manager' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
	"name":"Gold member"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/contacts/tag-manager",
    data:{
        "name":"Gold member"
    },
    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.contactTags().insert({
    "name":"Gold member"
});
                
Success 200
Field Type Description
id Number The id of the new tag.
name String The name of the new tag.
Response example
HTTP/1.1 200 OK
{
    "id": 83,
    "name": "Gold member"
}
                

Getting all tags

GET
https://api.automizy.com/v2/contacts/tag-manager
Permission: Logged in user
Parameters
Field Type Description
limitoptional Number Number of results per page
pageoptional Number The offset of the result
Default value: 1
fieldsoptional String The required fields separated with ',' character
orderoptional String Order the collection via the given attribute(field:asc or field:desc)
Default value: id:desc
curl
jQuery
Automizy Js Api
#Filtering the collection where name contains the word 'test':
$ curl 'https://api.automizy.com/v2/contacts/tag-manager' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/contacts/tag-manager",
    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.contactTags().get() //returns jqXHR
                
Success 200
Field Type Description
contactTags Array Array containing the tags.
contactTags[x] Object Object containing data of tags.
  contactTags[x][id] Number The id of the tag.
  contactTags[x][name] String The name of the new tag.
pageCount Integer The number of pages needed to show the results.
pageSize Integer The number of items shown on one page.
page Integer The actual page.
totalItems Integer The number of results.
Response example
HTTP/1.1 200 OK
{
    "contactTags": [{
        "id": 84,
        "name": "Gold member"
    },
    {
        "id": 85,
        "name": "Platinum member"
    }]
    "pageCount": 1,
    "pageSize": 500,
    "totalItems": 2,
    "page": 1
}
                

Getting a given tag

GET
https://api.automizy.com/v2/contacts/tag-manager/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/contacts/tag-manager/84' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "GET",
    url: "https://api.automizy.com/v2/contacts/tag-manager/84",
    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.contactTags().getRecordById(84) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new tag.
name String The name of the new tag.
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "name": "Gold member"
}
                

Removing a given tag

DELETE
https://api.automizy.com/v2/contacts/tag-manager/:id
Permission: Logged in user
curl
jQuery
Automizy Js Api
$ curl 'https://api.automizy.com/v2/contacts/tag-manager/84' \
-X DELETE \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
                
$.ajax({
    type: "DELETE",
    url: "https://api.automizy.com/v2/contacts/tag-manager/84",
    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.contactTags().delete(84) //returns jqXHR
                

Updating a given tag

PATCH
https://api.automizy.com/v2/contacts/tag-manager/:id
Permission: Logged in user
Parameters
Field Type Description
nameoptional String The new name of the tag.
curl
jQuery
Automizy Js Api
 $ curl 'https://api.automizy.com/v2/contacts/tag-manager/84' \
-X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <ACCESS TOKEN>' \
-d '
 {
    "name":"Orange member"
}'
                
$.ajax({
    type: "POST",
    url: "https://api.automizy.com/v2/contacts/tag-manager/84",
    data:{
        "name":"Orange member"
},
    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.contactTags().update({
    "name":"Orange member"
}, 84) //returns jqXHR
                
Success 200
Field Type Description
id Number The id of the new tag.
name String The name of the new tag.
Response example
HTTP/1.1 200 OK
{
    "id": 84,
    "name": "Orange member"
}
                

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 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
}