NAV Navbar
curl
  • Introduction
  • Authentication
  • Contacts Lists
  • Blacklists
  • Campaigns
  • Statistics
  • Webhooks
  • Introduction

    Welcome to Mailify's API documentation. You will find here all the help needed to integrate them.

    These APIs are of the RESTFull / JSON type.

    All of our endpoints (url access) is used in the appropriate HTTP method, but also offers a duplicate in GET via a single URL that embeds the necessary (authentication & settings).

    This feature allows us to implement our APIs without having to develop a connector.

    Authentication

    HTTP Authentication::

    curl -X GET "https://mailifyapis.com/v1/info"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/info"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Authentication is based on a couple of parameters: the id of your account, as well as your API key.

    Authentication Parameters

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key

    These settings can be used in two different authentication methods:

    Contacts Lists

    List lists

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists?offset=0&limit=3"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists?offset=0&limit=3"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

     [
        {
            "count": 200000,
            "created": "2017-08-24T14:59:36Z",
            "customFields": null,
            "edited": "2017-08-24T15:00:56Z",
            "id": "z2P3eXaMQUq9-kIL3wV1Cg",
            "kind": "NORMAL",
            "name": "Exemple: 200 000"
        },
        {
            "count": 1,
            "created": "2017-08-30T10:24:50Z",
            "customFields": null,
            "edited": "2017-08-30T10:26:14Z",
            "id": "eTO6OsIaSPeeOdAYqBiL8A",
            "kind": "NORMAL",
            "name": "Exemple: api list"
        },
        {
            "count": 5,
            "created": "2017-09-28T08:06:22Z",
            "customFields": null,
            "edited": "2017-09-28T08:06:27Z",
            "id": "vaJ_WhfRSsKNjw3DvqRy8w",
            "kind": "NORMAL",
            "name": "Exemple: test"
        },
    ]
    

    Allows you to retrieve all available contact lists.

    HTTP Request

    GET https://mailifyapis.com/v1/lists

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    offset 0 Position of the cursor [0-9]*
    limit max Number of lists [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a list

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"name": "API List"}'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"name": "API List"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "count": 0,
        "created": "2017-10-02T08:26:10Z",
        "customFields": null,
        "edited": "2017-10-02T08:26:10Z",
        "id": "AhjmGK9YRlGbXKawl1pBvw",
        "kind": "NORMAL",
        "name": "API List"
    }
    

    Create a contact list.

    HTTP Request

    POST https://mailifyapis.com/v1/lists

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    name null List Name
    Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Update a list

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"name": "New list name"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"name": "New list name"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "created": "2017-10-02T08:26:10Z",
        "id": "AhjmGK9YRlGbXKawl1pBvw",
        "kind": "NORMAL",
        "modified": "2017-10-02T08:26:10Z",
        "name": "New list name"
    }
    

    Update a contacts list.

    HTTP Request

    PUT https://mailifyapis.com/v1/lists/{listId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    name null New list name
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a list

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {}
    

    Delete a contact list.

    HTTP Request

    DELETE https://mailifyapis.com/v1/lists/{listId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List custom fields

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists/{listId}/fields"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists/{listId}/fields"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "fields": [
            {
                "caption": "Creation Date",
                "id": "CREATION_DATE_ID",
                "kind": ""
            },
            {
                "caption": "Modification Date",
                "id": "MODIFICATION_DATE_ID",
                "kind": ""
            },
            {
                "caption": "email",
                "id": "EMAIL_ID",
                "kind": ""
            },
            {
                "caption": "phone",
                "id": "PHONE_ID",
                "kind": ""
            },
            {
                "caption": "Nom",
                "id": "AIUxng6TSyy1VRSWChPMnA",
                "kind": "STRING"
            },
            {
                "caption": "Inscrit",
                "id": "Be3o05ylR1Obz83GZc1Dkw",
                "kind": "BOOL"
            },
            {
                "caption": "Age",
                "id": "CyWAmoViRGyj_vtxMgg-qA",
                "kind": "INT"
            },
            {
                "caption": "Anniversaire",
                "id": "DbwHHDIiSEWER5KUyrIJVQ",
                "kind": "DATE"
            },
            {
                "caption": "ADDRESS",
                "id": "Ei_23RzYRF2MOzz_h__eLA",
                "kind": "STRING"
            }
        ]
    }
    

    Retrieves custom fields (columns) from a list.

    HTTP Request

    GET https://mailifyapis.com/v1/lists/{listId}/fields

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a field

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/fields"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{ "kind": "STRING", "caption": "ADDRESS" }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/fields"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "kind": "STRING", "caption": "ADDRESS" }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "caption": "ADDRESS",
        "id": "Ei_23RzYRF2MOzz_h__eLA",
        "kind": "STRING"
    }
    

    Add a field.

    HTTP Request

    POST https://mailifyapis.com/v1/lists/{listId}/fields

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    kind null STRING, BOOL, INT or DATE
    caption null Reference name of the column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update a field

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{ "kind": "STRING", "caption": "New name"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "kind": "STRING", "caption": "New name"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "caption": "New name",
        "id": "RIUxng6TSyy1VRSWChPMnA",
        "kind": "STRING"
    }
    

    Update a field.

    HTTP Request

    PUT https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    kind null STRING, BOOL, INT or DATE
    caption null Reference name of the column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a field

    HTTP Authentication:

    curl -X  DELETE "https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete a field (column) from a list.

    HTTP Request

    DELETE https://mailifyapis.com/v1/lists/{listId}/fields/{fieldId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete all fields

    HTTP Authentication

    curl -X  DELETE "https://mailifyapis.com/v1/lists/{listId}/fields"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Headers Authentication

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/fields"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete all fields (columns) from a list.

    HTTP Request

    DELETE https://mailifyapis.com/v1/lists/{listId}/fields

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List contacts

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists/{listId}/contacts?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/lists/{listId}/contacts?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    
    {
    [
        {
            "5-vaxpyAQKqMAYIu887F1A": "Rogers",
            "created": "2017-10-02T12:56:09Z",
            "edited": "2017-10-02T12:56:09Z",
            "email": "user1@sunrise.com",
            "nvVhK7dwSJyPAbFKrfUtjw": "08/03/1917",
            "phone": "+33600000001"
        },
        {
            "5-vaxpyAQKqMAYIu887F1A": "Wilson",
            "created": "2017-10-02T12:56:09Z",
            "edited": "2017-10-02T12:56:09Z",
            "email": "user2@sunrise.com",
            "nvVhK7dwSJyPAbFKrfUtjw": "21/09/1968",
            "phone": "+33600000002"
        }
    ]
    
    }
    

    Lists the contacts in a list.

    HTTP Request

    GET https://mailifyapis.com/v1/lists/{listId}/contacts

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    offset 0 Position of the cursor [0-9]*
    limit 1 Number of contacts [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a contact

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{   "email": "user@domain.com", \
            "phone": "33600000008", \
            "5-vaxpyAQKqMAYIu887F1A": "Rogers", \
            "nvVhK7dwSJyPAbFKrfUtjw": "08-03-1917" }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts"
    -H "accountId: YOUR_ACCOUNTID"
    -H "apiKey: YOUR_API_KEY"
    -d '{   "email": "user@domain.com", \
        "phone": "33600000008", \
        "5-vaxpyAQKqMAYIu887F1A": "Rogers", \
        "nvVhK7dwSJyPAbFKrfUtjw": "08-03-1917" }'
    
    

    Response code:

    HTTP/2 200
    

    Response body:

    [
        "2017-10-02T12:56:09Z",
        "2017-10-02T12:56:09Z",
        "user1@sunrise.com",
        "+33600000008",
        "Rogers",
        "08-03-1917"
    ]
    
    

    Add a contact to a list.

    HTTP Request

    POST https://mailifyapis.com/v1/lists/{listId}/contacts

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    email null The contact's e-mail
    phone null The mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update a contact

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/contacts"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "newEmail": "newUser@domain.com"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/contacts"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "newEmail": "newUser@domain.com"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Update a contact in a list.

    HTTP Request

    PUT https://mailifyapis.com/v1/lists/{listId}/contacts

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    email null The contact's e-mail
    phone null The mobile number of the contact
    newEmail null The new E-mail
    newPhone null The new mobile number
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add or update a contact

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts/upsert"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{   "email": "user@domain.com", \
            "phone": "33600000008", \
            "5-vaxpyAQKqMAYIu887F1A": "Rogers", \
            "nvVhK7dwSJyPAbFKrfUtjw": "08-03-1917" }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts/upsert"
    -H "accountId: YOUR_ACCOUNTID"
    -H "apiKey: YOUR_API_KEY"
    -d '{   "email": "user@domain.com", \
        "phone": "33600000008", \
        "5-vaxpyAQKqMAYIu887F1A": "Rogers", \
        "nvVhK7dwSJyPAbFKrfUtjw": "08-03-1917" }'
    
    

    Response code:

    HTTP/2 200
    

    Response body:

    [
        "2017-10-02T12:56:09Z",
        "2017-10-02T12:56:09Z",
        "user1@sunrise.com",
        "+33600000008",
        "Rogers",
        "08-03-1917"
    ]
    
    

    Add or update a contact in a list. If the contact doesn't exist, it will be added. If it exists already, the contact will be updated. A contact is a uniq e-mail/phone couple.

    HTTP Request

    POST https://mailifyapis.com/v1/lists/{listId}/contacts/upsert

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    email null The contact's e-mail
    phone null The mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a contact block (JSON)

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts/import"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '[{"email": "user1@domain.com", "phone": "+33600000001" }, \
            {"email": "user2@domain.com", "phone": "+33600000002"}, \
            {"email": "user3@domain.com", "phone": "+33600000003"} ]'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts/import"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '[{"email": "user1@domain.com", "phone": "+33600000001" }, \
        {"email": "user2@domain.com", "phone": "+33600000002"}, \
        {"email": "user3@domain.com", "phone": "+33600000003"} ]'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "invalid": 0,
        "valid": 3
    }
    

    Adds a block (JSON) of contacts (Max: 4MB per request).

    HTTP Request

    POST https://mailifyapis.com/v1/lists/{listId}/contacts/import

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of the list concerned
    email E-mail E-mail column name
    phone Mobile Mobile column name
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a contact

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/contacts/Mru3FE5fQnepxDgvuz3M9A"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    
    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/contacts?email=user1@domain.com"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"  
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/contacts/Mru3FE5fQnepxDgvuz3M9A"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    
    curl -X DELETE "https://mailifyapis.com/v1/lists/{listId}/contacts?email=user@domain.com"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete a contact from a list.

    HTTP Request

    DELETE https://mailifyapis.com/v1/lists/{listId}/contacts/{contactId}

    DELETE https://mailifyapis.com/v1/lists/{listId}/contacts?email={contactEmail}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of a list
    contactId null Id of a contact
    contactEmail null Email of the contact
    email null E-mail of the contact
    phone null Mobile number of the contact
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete all contacts

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/empty"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/empty"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    
    

    Delete all contacts from a list.

    HTTP Request

    POST https://mailifyapis.com/v1/lists/{listId}/empty

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    listId null Id of a list
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Blacklists

    List blacklists

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists?offset=0&limit=3"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists?offset=0&limit=3"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "blacklists": [
            {
                "count": 179,
                "creationDate": "2017-08-22T15:39:56Z",
                "id": "DEFAULT_BOUNCELIST",
                "modificationDate": "2017-08-22T15:40:24Z",
                "name": ""
            },
            {
                "count": 55,
                "creationDate": "2017-08-22T14:49:36Z",
                "id": "DEFAULT_BLACKLIST",
                "modificationDate": "2017-08-22T15:40:50Z",
                "name": ""
            },
            {
                "count": 154,
                "creationDate": "2017-09-14T12:47:43Z",
                "id": "yfownwJES8K2Y_RPWvOnfw",
                "modificationDate": "2017-09-14T12:47:43Z",
                "name": "Liste d\u00e9sabo Client1"
            }
        ]
    }
    
    

    List blacklists.

    HTTP Request

    GET https://mailifyapis.com/v1/blacklists

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    offset 0 Position of the cursor [0-9]*
    limit max Number of lists [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a black list

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"name": "Nom de la liste"}'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"name": "Nom de la liste"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "blacklist": {
            "created": "2017-09-14T12:51:14Z",
            "creator": "API",
            "id": "rqWxwoUMRqKJDkyfUG8UAA",
            "kind": "BLACKLIST",
            "modified": "2017-09-14T12:51:14Z",
            "modifier": "API",
            "name": "Exemple"
        }
    }
    

    Create a blacklist.

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    name null Black List Name
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update a blacklist

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"name": "New list name"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{bkacklistId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"name": "New list name"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "created": "2017-09-14T12:51:14Z",
        "id": "rqWxwoUMRqKJDkyfUG8UAA",
        "kind": "BLACKLIST",
        "modified": "2017-09-14T18:24:12Z",
        "name": "New list name"
    }
    

    Update a blacklist.

    HTTP Request

    PUT https://mailifyapis.com/v1/blacklists/{blacklistId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    name null Black List Name
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a blacklist

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delte a blacklist.

    HTTP Request

    DELETE https://mailifyapis.com/v1/blacklists/{blacklistId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List blacklists custom fields

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/fields"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/fields"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "fields": [
            {
                "caption": "EMAIL",
                "id": "EMAIL_ID",
                "kind": ""
            },
            {
                "caption": "PHONE",
                "id": "PHONE_ID",
                "kind": ""
            }
        ]
    }
    

    List blacklists custom fields.

    HTTP Request

    GET https://mailifyapis.com/v1/blacklists/{blacklistId}/fields

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List bounces

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contacts": [
            {
                "contact": [
                    "2017-09-18T08:11:57Z",
                    "2017-09-18T08:11:57Z",
                    "user@domain.com",
                    "+33600000001"
                ]
            },
            {
                "contact": [
                    "2017-09-15T12:35:00Z",
                    "2017-09-15T12:36:13Z",
                    "user1@domain.com",
                    "+33600000001"
                ]
            }
        ]
    }
    

    List bounces.

    HTTP Request

    GET https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of a list
    offset 0 Position of the cursor [0-9]*
    limit 1 Number of contacts [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a bounce

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "2017-09-18T08:11:57Z",
        "2017-09-18T08:11:57Z",
        "user@domain.com",
        "+33600000001"
    }
    

    Add a bounce to a blacklist.

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces

    Body/URL parameters :

    Parameter Default Description
    email null E-mail of the contact
    phone null Mobile number of the contact
    blacklistId null Id of the Black List
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update a bounce

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'
    

    Custom Headers Authentication: curl curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces" -H "accountId: YOUR_ACCOUNTID" -H "apiKey: YOUR_API_KEY" -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contact": [
            "2017-09-18T08:17:17Z",
            "2017-09-15T12:35:00Z",
            "user_modified@domain.com",
            "+33600000001"
        ]
    }
    

    Update a bounce.

    HTTP Request

    PUT https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of a list
    email null E-mail of the contact
    phone null Mobile number of the contact
    newEmail null New E-mail of the contact
    newPhone null New Mobile Number of the Contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a bounces block

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces/import"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces/import"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "invalid": 0,
        "valid": 2
    }
    

    Add a block (JSON) of bounces (Max: 4MB per request).

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces/import

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    email null E-mail of the contact
    phone null Mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a bounce

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces?email=user@domain.com&phone=%2B33647474452"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces?email=user@domain.com&phone=%2B33647474452"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete a bounce.

    HTTP Request

    DELETE https://mailifyapis.com/v1/blacklists/{blacklistId}/bounces

    Body/URL parameters :

    Parameter Default Description
    blacklistId null Id of the Black List
    accountId null Account Id
    apiKey null API Key
    email null E-mail of the contact
    phone null Mobile number of the contact
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List unsubscribers

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contacts": [
            {
                "contact": [
                    "2017-09-18T08:11:57Z",
                    "2017-09-18T08:11:57Z",
                    "user@domain.com",
                    "+33600000001"
                ]
            },
            {
                "contact": [
                    "2017-09-15T12:35:00Z",
                    "2017-09-15T12:36:13Z",
                    "user1@domain.com",
                    "+33600000001"
                ]
            }
        ]
    }
    

    List unsubscribers.

    HTTP Request

    GET https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of a list
    offset 0 Position of the cursor [0-9]*
    limit 1 Number of contacts [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add an unsubscriber

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "2017-09-18T08:11:57Z",
        "2017-09-18T08:11:57Z",
        "user@domain.com",
        "+33600000001"
    }
    

    Add un unsubscriber.

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers

    Body/URL parameters :

    Parameter Default Description
    email null E-mail of the contact
    phone null Mobile number of the contact
    blacklistId null Id of the Black List
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update an unsubscriber

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contact": [
            "2017-09-18T08:17:17Z",
            "2017-09-15T12:35:00Z",
            "user_modified@domain.com",
            "+33600000001"
        ]
    }
    

    Update an unsubscriber.

    HTTP Request

    PUT https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    email null E-mail of the contact
    phone null Mobile number of the contact
    newEmail null New E-mail of the contact
    newPhone null New Mobile Number of the Contact
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add an unsubscribers block

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers/import"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers/import"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "invalid": 0,
        "valid": 2
    }
    

    Add a block (JSON) of unsubscribers (Max: 4MB per request).

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers/import

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of the Black List
    email null E-mail of the contact
    phone null Mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete an unsubscriber

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers?email=user@domain.com&phone=%2B33647474452"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers?email=user@domain.com&phone=%2B33647474452"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete an unsubscriber.

    HTTP Request

    DELETE https://mailifyapis.com/v1/blacklists/{blacklistId}/unsubscribers

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of a list
    email null E-mail of the contact
    phone null Mobile number of the contact
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    List complaints

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contacts": [
            {
                "contact": [
                    "2017-09-18T08:11:57Z",
                    "2017-09-18T08:11:57Z",
                    "user@domain.com",
                    "+33600000001"
                ]
            },
            {
                "contact": [
                    "2017-09-15T12:35:00Z",
                    "2017-09-15T12:36:13Z",
                    "user1@domain.com",
                    "+33600000001"
                ]
            }
        ]
    }
    

    List complaints.

    HTTP Request

    GET https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    blacklistId null Id of a list
    offset 0 Position of the cursor [0-9]*
    limit 1 Number of contacts [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a complaint

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000000"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "2017-09-18T08:11:57Z",
        "2017-09-18T08:11:57Z",
        "user@domain.com",
        "+33600000001"
    }
    

    Add a complaint.

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints

    Body/URL parameters :

    Parameter Default Description
    blacklistId null Id of the Black List
    email null E-mail of the contact
    phone null Mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Update a complaint

    HTTP Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'
    

    Custom Headers Authentication:

    curl -X PUT "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "user@domain.com", "phone": "+33600000001", "newEmail": "user_modified@domain.com"}'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "contact": [
            "2017-09-18T08:17:17Z",
            "2017-09-15T12:35:00Z",
            "user_modified@domain.com",
            "+33600000001"
        ]
    }
    

    Update a complaint.

    HTTP Request

    PUT https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints

    Body/URL parameters :

    Parameter Default Description
    blacklistId null Id of the Black List
    accountId null Account Id
    apiKey null API Key
    email null E-mail of the contact
    phone null Mobile number of the contact
    newEmail null New E-mail of the contact
    newPhone null New Mobile Number of the Contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Add a complaints block

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints/import"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints/import"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '[ {"email": "user@domain.com", "phone": "+33600000001" }, {"email": "user2@domain.com", "phone": "+33600000002"} ] }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "invalid": 0,
        "valid": 2
    }
    

    Add a block (JSON) of complaints (Max: 4MB per request).

    HTTP Request

    POST https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints/import

    Body/URL parameters :

    Parameter Default Description
    blacklistId null Id of the Black List
    accountId null Account Id
    apiKey null API Key
    email null E-mail of the contact
    phone null Mobile number of the contact
    fieldId null Id of a column
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Delete a complaint

    HTTP Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?email=user@domain.com&phone=%2B33647474452"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X DELETE "https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints?email=user@domain.com&phone=%2B33647474452"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
    }
    

    Delete a complaint.

    HTTP Request

    DELETE https://mailifyapis.com/v1/blacklists/{blacklistId}/complaints

    Body/URL parameters :

    Parameter Default Description
    blacklistId null Id of the Black List
    accountId null Account Id
    apiKey null API Key
    email null E-mail of the contact
    phone null Mobile number of the contact
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support

    Campaigns

    Create campaign

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{ "name": "Name", "kind": "EMAIL" }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "name": "Name", "kind": "EMAIL" }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "id":"kRzJCozIR1-U4F-r971haQ",
        "name":"Name"
    }
    

    Create a campaign.

    HTTP Request

    POST https://mailifyapis.com/v1/campaigns

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    name null Campaign name
    kind null Campaign kind: EMAIL or SMS_MARKETING or SMS_NOTIFICATION
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    List campaigns

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/campaigns?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/campaigns?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    [
        {
            "count": 1827,
            "created": "2017-09-22T15:02:31Z",
            "edited": "2017-09-25T15:25:28Z",
            "id": "zqb26jJXSnywtCcX1Cj_HA",
            "kind": "SMS",
            "name": "Campagne sms"
        },
        {
            "count": 195668,
            "created": "2017-09-25T15:50:30Z",
            "edited": "2017-09-26T10:11:35Z",
            "id": "TEsK2AHJS-agbfdc-iDctQ",
            "kind": "NORMAL",
            "name": "Campagne E-mail 200k contacts"
        }
    ]
    
    

    List campaigns.

    HTTP Request

    GET https://mailifyapis.com/v1/campaigns

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    offset 0 Position of the cursor [1-9]*
    limit max Number of campaigns [1-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Get campaign

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "campaign": {
            "blacklists": [
                "DEFAULT_BLACKLIST"
            ],
            "id": "kRzJCozIR1-U4F-r971haQ",
            "kind": "NORMAL",
            "modificationDate": "2018-07-27T08:06:48Z",
            "name": "Name",
            "sends": [
                "PRQ-IEN8Teq1QhPAuIL1kg"
            ],
            "sentDate": "0001-01-01T00:00:00Z",
            "state": "DRAFTING",
            "tags": [
                "EMAIL"
            ],
            "unsubscription": {}
        }
    }
    

    Get a campaign.

    HTTP Request

    GET https://mailifyapis.com/v1/campaigns/{campaignId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Campaign Id
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Add recipients

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/recipients"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '[ { "email": "user1@domain.com", "phone": "+33600000001"}, { "email": "user2@domain.com", "phone": "+33600000002" } ]'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/recipients"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '[ { "email": "user1@domain.com", "phone": "+33600000001"}, { "email": "user2@domain.com", "phone": "+33600000002" } ]'
    

    Response code:

    HTTP/2 200
    

    Response body:

    [
        {
            "email": "user1@domain.com",
            "phone": "+33600000001"
        },
        {
            "email": "user2@domain.com",
            "phone": "+33600000002"
        }
    ]
    
    

    Add recipients in a campaign (Max: 4MB per request).

    HTTP Request

    POST https://mailifyapis.com/v1/campaigns/{campaignId}/recipients

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Campaign Id
    email null E-mail of the recipient
    phone null Mobile number of the recipient
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/list"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{ "listId": "rZskDacLS4-v4q-X2whMbP }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/list"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "listId": "rZskDacLS4-v4q-X2whMbP }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    
    

    Link your campaign with a contacts list.

    HTTP Request

    POST https://mailifyapis.com/v1/campaigns/{campaignId}/list

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Campaign Id
    listId null List Id
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Set content

    HTTP Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/send/PRQ-IEN8Teq1QhPAuIL1kg/content"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{ "html":"<html />", "text": "text" }'
    

    Custom Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/send/PRQ-IEN8Teq1QhPAuIL1kg/content"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "html":"<html />", "text": "text" }'
    

    Response code:

    HTTP/2 200
    

    Response body:

    
    

    Set the send content. You first have to retreive then sendId from the campaign: with STANDARD campaign, there is only one sendId.

    HTTP Request

    POST https://mailifyapis.com/v1/campaigns/{campaignId}/send/{sendId}/content

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Campaign Id
    sendId null Send Id
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Statistics

    Global statistics

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/reports/q8sErLkAS1eRjSmQkoaZcQ"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/reports/q8sErLkAS1eRjSmQkoaZcQ"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    {
        "values": {
            "V6UDRB2TRVKnCxwDqdQgrg": {
                "date": 1507013732,
                "id": "V6UDRB2TRVKnCxwDqdQgrg",
                "overview": {
                    "count": 1,
                    "device": {
                        "unknown": 2
                    },
                    "os": {
                        "values": {
                            "Unknown": 1
                        }
                    },
                    "read": {},
                    "shared": {},
                    "successes": 1
                }
            },
            "RXIn3nzJT0-4hsmKY1oUgQ": {
                "date": 1507013732,
                "id": "RXIn3nzJT0-4hsmKY1oUgQ",
                "overview": {
                    "bounces": 4,
                    "clickers": 34,
                    "clicks": 56,
                    "complaints": 2,
                    "count": 96,
                    "device": {
                        "desktop": 26,
                        "mobile": 28,
                        "unknown": 56
                    },
                    "openers": 30,
                    "opens": 47,
                    "os": {
                        "values": {
                            "Android": 6,
                            "BlackBerry": 6,
                            "IOS": 3,
                            "Linux": 5,
                            "Mac": 6,
                            "Others": 8,
                            "Windows": 3,
                            "WindowsPhone": 3
                        }
                    },
                    "read": {
                        "interest": 13
                    },
                    "shared": {},
                    "unsubscribers": 4
                }
            },
            "SUjbJSKbQXyutvcichdObA": {
                "date": 1507013732,
                "id": "SUjbJSKbQXyutvcichdObA",
                "overview": {
                    "bounces": 5,
                    "clickers": 6,
                    "clicks": 10,
                    "count": 100,
                    "device": {
                        "desktop": 9,
                        "mobile": 9,
                        "unknown": 84
                    },
                    "openers": 7,
                    "opens": 10,
                    "os": {
                        "values": {
                            "Android": 4,
                            "BlackBerry": 2,
                            "IOS": 2,
                            "Mac": 2,
                            "Others": 5,
                            "WindowsPhone": 1
                        }
                    },
                    "read": {
                        "interest": 14
                    },
                    "shared": {},
                    "unsubscribers": 4
                }
            }
        }
    }
    

    Retrieve Campaigns Statistics.

    HTTP Request

    GET https://mailifyapis.com/v1/reports/{campaignId}

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Id of the concerned campaign
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Recipients statistics

    HTTP Authentication:

    curl -X GET "https://mailifyapis.com/v1/reports/q8sErLkAS1eRjSmQkoaZcQ/recipients?offset=0&limit=2"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
    

    Custom Headers Authentication:

    curl -X GET "https://mailifyapis.com/v1/reports/q8sErLkAS1eRjSmQkoaZcQ/recipients?offset=0&limit=2"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    Response code:

    HTTP/2 200
    

    Response body:

    [
        {
            "bounce": false,
            "clicks": 1,
            "complaint": false,
            "desktop": true,
            "links": {
                "http://www.mailify.com?utm_source=mailify&utm_medium=EMAIL&utm_campaign=utmExample": 1
            },
            "mobile": false,
            "opens": 1,
            "recipient": {
                "email": "user1@domain.com",
                "fields": {
                    "CONTACT_ID": "8gk6_4LztM6sZMBCalLu3g",
                    "ORIGIN_CAPTION_ID": "usersList",
                    "ORIGIN_KIND_ID": "LIST",
                    "STATE_ID": "NORMAL"
                },
                "phone": ""
            },
            "replies": 0,
            "softs": 0,
            "success": false,
            "unsubscribe": false
        },
        {
            "bounce": false,
            "clicks": 1,
            "complaint": false,
            "desktop": true,
            "links": {
                "http://developers.mailify.com?utm_source=mailify&utm_medium=EMAIL&utm_campaign=utmExample": 1
            },
            "mobile": false,
            "opens": 1,
            "recipient": {
                "email": "user2@domain.com",
                "fields": {
                    "CONTACT_ID": "X4Idy9KQRcSQXss-Eqlj3Q",
                    "ORIGIN_CAPTION_ID": "usersList",
                    "ORIGIN_KIND_ID": "LIST",
                    "STATE_ID": "NORMAL"
                },
                "phone": ""
            },
            "replies": 0,
            "softs": 0,
            "success": false,
            "unsubscribe": false
        }
    ]
    

    Get stats of your camapign, recipient by recipient

    HTTP Request

    GET https://mailifyapis.com/v1/reports/{campaignId}/recipients

    Body/URL parameters :

    Parameter Default Description
    accountId null Account Id
    apiKey null API Key
    campaignId null Id of the concerned campaign
    offset 0 Position of the cursor [0-9]*
    limit 1 Number of contacts [0-9]* - Max: 1000
    HTTP Error code Signifiance
    401 NEED_ACCOUNT_ID -- No account ID is specified in the request.
    401 NEED_API_KEY -- No API key is specified in the request.
    401 API_KEY_UNAUTHORIZED -- Invalid API key.
    404 SERVICE_*_UNREACHABLE -- The requested service is unavailable.
    500 INTERNAL_SERVER_ERROR -- Internal error, please contact support.

    Webhooks

    Service activation

    Webhooks

    Configuration

    Webhooks2

    1. Give a name to this webhook, so you can identify your different webhooks if there is a need to manage several.

    2. Check the events for which you want to receive updates.

    3. Enter the URL where this information will be transmitted (HTTP POST).

    4. Confirm: a JSON test packet will be sent on the URL to validate your settings.

    JSON Envelope

    For each event, you will receive a JSON envelope with an identifiable type. This envelope will be transmitted on the URL that you have filled in via an HTTP POST request. The JSON will be in the body (DATA) of the request.

    The different types of events are:

    Parameter Value Description
    type delivered E-mail received
    type soft_bounce E-mail in temporary failure
    type hard_bounce E-mail in definitive failure
    type open Open email
    type click E-mail clicked
    type unsubscribe Unsubscribe
    type complaint Complaint

    You will find in the rest of the envelope all or some of the following parameters:

    Parameter Description example
    campaignId Id of the campaign concerned "campaignId": "EDE18BYwQwqYA9_BKyTsVr"
    date Date of the event "date": "2018-01-17T11: 21: 59.314Z"
    email Recipient's e-mail "email": "recipient@domain.com"
    from E-mail of the sender "from": "sender@domain.com"
    sendId Shipping Id "sendId": "BbJ-n53VQ-2_3i5ewR111R"
    subject Subject of the message "subject": "30% off!"
    category Type of refusal "category": "RELAYING_ISSUES"
    returnCode Return code "returnCode": -1
    smtpDescription Description of the SMTP error "smtpDescription": "There are no DNS entries for the hostname tgipimail.com I can not determine where to send this message."
    browser Browser type "browser": "CHROME 63.0.3239.132"
    language Browser language "language": "en, en-US; q = 0.9, fr-FR; q = 0.8, fr; q = 0.7"
    operatingSystem Operating system "operatingSystem": "WINDOWS"
    webmail Type of webmail "webmail": "Unknown"