NAV Navbar
curl
  • Introduction
  • Authentication
  • Contacts lists
  • Blacklists
  • Campaigns
  • Automations
  • Statistics
  • Templates
  • 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"
    

    HTTP Headers Authentication

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

    HTTP success 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 Required Description
    accountId true Id of the account
    apiKey true 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"
    

    HTTP Headers Authentication

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

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Create list

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    Body parameters

    Parameter Required Description
    name true The name of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Body parameters

    Parameter Required Description
    name true The name of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    
    

    Delete a contact list.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    List fields

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success 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"
            }
        ]
    }
    

    Retreive the fields (columns) from a list.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Create 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" }'
    

    HTTP 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" }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Create a field.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Body parameters

    Parameter Required Description
    kind true STRING, BOOL, INT or DATE
    caption true Column's name

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list
    fieldId true Id of the field

    Body parameters

    Parameter Required Description
    kind true STRING, BOOL, INT or DATE
    caption true Column's name

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body :

    
    

    Delete a field.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list
    fieldId true Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body :

    
    

    Delete all fields.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        {
            "created": "2018-05-25T09:12:29Z",
            "edited": "2018-05-25T09:12:29Z",
            "email": "user1@sarbacane.com",
            "ialonrh54rrpmjvj1ywn": "3 rue des lilas 59000 LILLE",
            "id": "jfjC1uwfRKCLWOkAYkzSrA",
            "phone": "+33600000001"
        },
        {
            "created": "2018-05-25T09:09:50Z",
            "edited": "2018-05-25T09:09:50Z",
            "email": "user2@sarbacane.com",
            "ialonrh54rrpmjvj1ywn": "51 rue de la gare 92000 PARIS",
            "id": "CYeg4jdgSKqXwmGaXQwjrA",
            "phone": "+33600000002"
        }
    ]
    

    List the contacts in a list.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000
    email false E-mail address
    phone false Phone number
    start false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)
    end false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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": "user3@sarbacane.com", \
            "phone": "+33600000003", \
            "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }'
    

    HTTP Headers Authentication:

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts"
    -H "accountId: YOUR_ACCOUNTID"
    -H "apiKey: YOUR_API_KEY"
    -d '{   "email": "user3@sarbacane.com", \
        "phone": "+33600000003", \
        "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }'
    
    

    HTTP success response code:

    HTTP/2 200
    

    Response body:

    [
        "Mru3FE5fQnepxDgvuz3M9A",
        "2018-05-25T09:50:15Z",
        "2018-05-25T09:50:15Z",
        "user3@sarbacane.com",
        "+33600000003",
        "18 rue de la plage 33000 BORDEAUX"
    ]
    

    Add a contact.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Update a contact

    HTTP Authentication

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/contacts/{contactId}"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{"email": "newEmail@sarbacane.com", "phone": "+33670000001", "ialonrh54rrpmjvj1ywn": "Nouvelle adresse"}'
    

    HTTP Headers Authentication

    curl -X PUT "https://mailifyapis.com/v1/lists/{listId}/contacts/{contactId}"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{"email": "newEmail@sarbacane.com", "phone": "+33670000001", "ialonrh54rrpmjvj1ywn": "Nouvelle adresse"}'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    
    

    Update a contact.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list
    contactId true Id of the contact

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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": "user3@sarbacane.com", \
            "phone": "+33600000003", \
            "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }'
    

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/lists/{listId}/contacts/upsert"
    -H "accountId: YOUR_ACCOUNTID"
    -H "apiKey: YOUR_API_KEY"
    -d '{   "email": "user3@sarbacane.com", \
        "phone": "+33600000003", \
        "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }'
    
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        "Mru3FE5fQnepxDgvuz3M9A",
        "2018-05-25T09:50:15Z",
        "2018-05-25T09:50:15Z",
        "user3@sarbacane.com",
        "+33600000003",
        "18 rue de la plage 33000 BORDEAUX"
    ]
    

    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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Add a JSON contacts blocks

    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", "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }, \
            {"email": "user2@domain.com", "phone": "+33600000002", "nvVhK7dwSJyPAbFKrfUtjw": "05 rue de Tourcoing 59000 LILLE" }, \
            {"email": "user3@domain.com", "phone": "+33600000003", "nvVhK7dwSJyPAbFKrfUtjw": "115 boulevard émile Zola 69000 LYON" } ]'
    

    HTTP 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", "nvVhK7dwSJyPAbFKrfUtjw": "18 rue de la plage 33000 BORDEAUX" }, \
        {"email": "user2@domain.com", "phone": "+33600000002", "nvVhK7dwSJyPAbFKrfUtjw": "05 rue de Tourcoing 59000 LILLE" }, \
        {"email": "user3@domain.com", "phone": "+33600000003", "nvVhK7dwSJyPAbFKrfUtjw": "115 boulevard émile Zola 69000 LYON" } ]'
    

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Body parameters

    Parameter Required Description
    upsert false Upsert option: ?upsert=true
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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=user1@domain.com"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
    }
    

    Delete a contact.

    HTTP Request

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

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list
    contactId false Id of the contact
    email false E-mail address
    phone false Phone number

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Clear a list

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    Clear a list.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    listId true Id of the list

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP Headers Authentication

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

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Create a blacklist

    HTTP Authentication

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

    HTTP 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"}'
    

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    Body parameters

    Parameter Required Description
    name true The name of the blacklist

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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": "Nouveau nom de la liste"}'
    

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
        "created": "2017-09-14T12:51:14Z",
        "id": "rqWxwoUMRqKJDkyfUG8UAA",
        "kind": "BLACKLIST",
        "modified": "2017-09-14T18:24:12Z",
        "name": "Nouveau nom de la liste"
    }
    

    Update a blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    name true The name of the blacklist

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
    }
    

    Delete a blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    List fields

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    List the blacklist fields.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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"
    

    HTTP success 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 the bounces in blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000
    email false E-mail address
    phone false Phone number
    start false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)
    end false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Add a bounce in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    blacklistId true Id of the blacklist

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'

    HTTP success 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 in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    newEmail false New e-mail address
    newPhone false New phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Add a JSON 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"} ] }'
    

    HTTP 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"} ] }'
    

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
    }
    

    Delete a bounce from the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    email false E-mail address
    phone false Phone number

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    List unsubscribers

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success 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 the unsubscribers in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000
    email false E-mail address
    phone false Phone number
    start false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)
    end false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Add an unsubscriber in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Update an unsubuscriber

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

    HTTP 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"}'
    

    HTTP success 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 in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    newEmail false New e-mail address
    newPhone false New phone number

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Add a JSON 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"} ] }'
    

    HTTP 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"} ] }'
    

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
    }
    

    Delete an unsubscriber from the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    email false E-mail address
    phone false Phone number

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    List complaints

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success 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 the complaints in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000
    email false E-mail address
    phone false Phone number
    start false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)
    end false Filter on modification date (ISO Date: 2019-04-25T08:31:43.280Z)

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Add a complaint in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"}'
    

    HTTP 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"}'
    

    HTTP success 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 in the blacklist.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    newEmail false New e-mail address
    newPhone false New phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Add a JSON 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"} ] }'
    

    HTTP 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"} ] }'
    

    HTTP success 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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number
    fieldId false Id of the field

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    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"
    

    HTTP 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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
    }
    

    Delete a complaint from the blacklit.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    blacklistId true Id of the blacklist
    email false E-mail address
    phone false Phone number

    Error codes

    HTTP code Error Description
    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 FAILED TO ACQUIRE LOCK Item already in use by another ressource
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Campaigns

    Create an E-mail campaign

    HTTP Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/email"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{
        "name": "Name",
        "emailFrom": "contact@email.com",
        "aliasFrom": "From",
        "emailReplyTo": "contact@email.com",
        "aliasReplyTo": "Reply To",
        "subject": "Subject"
      }'
    

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/email"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{
        "name": "Name",
        "emailFrom": "contact@email.com",
        "aliasFrom": "From",
        "emailReplyTo": "contact@email.com",
        "aliasReplyTo": "Reply To",
        "subject": "Subject"
      }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Create an E-mail campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    Body parameters

    Parameter Required Description
    name true The name of the campaign
    emailFrom true Sender E-mail address
    aliasFrom true Sender alias
    emailReplyTo true Reply-To E-mail
    aliasReplyTo true Reply-To alias
    subject true E-mail's subject

    Error codes

    HTTP code Error Description
    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

    Create a SMS campaign

    HTTP Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/sms"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{
        "name": "Name",
        "kind": "SMS_NOTIFICATION",
        "content": "Inscription validée !"
      }'
    
    

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/sms"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{
        "name": "Name",
        "kind": "SMS_MARKETING",
        "smsFrom": "YOURCOMPANY",
        "content": "Solde: -20% dès ce soir !"
      }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Create a SMS campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    Body parameters

    Parameter Required Description
    name true The name of the campaign
    kind true SMS_MARKETING or SMS_NOTIFICATION
    smsFrom false Custom SMS sender (between 3 and 11 alpha-numerics characters)
    content true SMS Content Max: 450 characters from GSM table

    Error codes

    HTTP code Error Description
    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"
    

    HTTP Headers Authentication

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

    HTTP success 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 the campaigns.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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 a campaign

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success 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": {}
        }
    }
    

    Retreive a campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Error codes

    HTTP code Error Description
    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/blacklists"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{
        "blacklistIds": [
          "rZskDacLS4-v4q-X2whMbP",
          "zRtDrmirReerskYVAz9o1A"
        ]
      }'
    

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/blacklists"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "blacklistIds": [
        "rZskDacLS4-v4q-X2whMbP",
        "zRtDrmirReerskYVAz9o1A"
      ]}'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
      "blacklistIds": [
          "rZskDacLS4-v4q-X2whMbP",
          "zRtDrmirReerskYVAz9o1A"
      ],
    }
    

    Link one or more blacklist(s) to your campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    blacklistIds true Ids list of blacklists (Array [ {}, {} ] )

    Error codes

    HTTP code Error Description
    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 ITEM_NOT_FOUND The resource needed for the operation does not exist
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Import a list

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

    HTTP 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"
      }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    
    

    Import a list into the campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    listId true Id of the list

    Error codes

    HTTP code Error Description
    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

    Import a template

    HTTP Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/content"
      -u "YOUR_ACCOUNTID:YOUR_API_KEY"
      -d '{
        "templateId": "md1166aAQXOItlDLcBzyQA"
      }'
    

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/content"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "templateId": "md1166aAQXOItlDLcBzyQA" }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    
    

    Import a template into the campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    templateId true Id of the template

    Error codes

    HTTP code Error Description
    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 ITEM_NOT_FOUND The resource needed for the operation does not exist
    500 INTERNAL_SERVER_ERROR Internal error, please contact support

    Import 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" } ]'
    

    HTTP 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" } ]'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

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

    Import recipients into the campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    email false E-mail address
    phone false Phone number

    Error codes

    HTTP code Error Description
    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 recipients

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        {
        "id": "qYCnj6VoQA2rD9stZMJ5-Q",
            "email": "user1@domain.com",
            "phone": "+33600000001"
        },
        {
        "id": "pQLje5XpRB4zU5hwPOMR2-K",
            "email": "user2@domain.com",
            "phone": "+33600000002"
        }
    ]
    
    

    Retreive the recipients in the campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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 fields

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        {
            "id": "CONTACT_ID",
            "caption": "ID",
            "kind": ""
        },
        {
            "id": "STATE_ID",
            "caption": "State",
            "kind": ""
        },
        {
            "id": "ORIGIN_KIND_ID",
            "caption": "Origin Kind",
            "kind": ""
        },
        {
            "id": "ORIGIN_CAPTION_ID",
            "caption": "Origin Caption",
            "kind": ""
        },
        {
            "id": "EMAIL_CORRECTION_ID",
            "caption": "Email Correction",
            "kind": ""
        },
        {
            "id": "PHONE_CORRECTION_ID",
            "caption": "Phone Correction",
            "kind": ""
        },
        {
            "id": "EMAIL_ID",
            "caption": "",
            "kind": ""
        },
        {
            "id": "PHONE_ID",
            "caption": "",
            "kind": ""
        },
        {
            "id": "CIVILITY_ID",
            "caption": "Civilité",
            "kind": "STRING"
        },
        {
            "id": "FIRSTNAME_ID",
            "caption": "Prénom",
            "kind": "STRING"
        },
        {
            "id": "LASTNAME_ID",
            "caption": "Nom",
            "kind": "STRING"
        },
        {
            "id": "RH6YoMoXQJKCDlKF6wKbCg",
            "caption": "adresse",
            "kind": "STRING"
        }
    ]
    

    Retreive the fields in the campaign recipient's list.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Error codes

    HTTP code Error Description
    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

    Create 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" }'
    '
    

    HTTP 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" }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    
    
    

    Create a content (HTML/TEXT) into the campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    sendId true Id of the campaign's send

    Error codes

    HTTP code Error Description
    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

    Send campaign

    HTTP Authentication

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

    HTTP Headers Authentication

    curl -X POST "https://mailifyapis.com/v1/campaigns/kRzJCozIR1-U4F-r971haQ/send"
      -H "accountId: YOUR_ACCOUNTID"
      -H "apiKey: YOUR_API_KEY"
      -d '{ "requestedSendDate": "2019-04-25T08:31:43.280Z" }'
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
        "webcopy":"http://eye.sarbinteg.com/"
    }
    

    Send (or schedule) a campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Body parameters

    Parameter Required Description
    requestedSendDate false Schedule ISO Date (ex: "2019-04-25T08:31:43.280Z")

    Error codes

    HTTP code Error Description
    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

    Automations

    List your automations

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        {
            "count": 0,
            "created": "2018-06-28T08:14:03Z",
            "edited": "2018-06-28T08:14:47Z",
            "id": "otFSLkt7TBSWjyOh753S5Q",
            "kind": "WELCOME",
            "list": "List Automation example #1",
            "name": "Automation example #1",
            "status": "DISABLE",
            "steps": [
                {
                    "id": "N0AVjMPbRyyclTuTnSSNrw",
                    "subject": "Welcome!",
                    "type": "EMAIL"
                }
            ]
        },
        {
            "count": 0,
            "created": "2018-07-26T13:52:28Z",
            "edited": "2018-07-27T09:57:14Z",
            "id": "F3tC6G8lReyu09ePqGQGgg",
            "kind": "WELCOME",
            "list": "Campagne AUTO / 20180726",
            "name": "Campagne Auto 20180726",
            "status": "ENABLED",
            "steps": [
                {
                    "id": "j7VKryzgSuGY7z_yStGnvA",
                    "subject": "Automation - first message",
                    "type": "EMAIL"
                }
            ]
        }
    ]
    
    

    List your automations.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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

    Campaign statistics

    HTTP Authentication

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

    HTTP Headers Authentication

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

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

    Retreive global statistics for a campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign

    Error codes

    HTTP code Error Description
    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"
    

    HTTP 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"
    

    HTTP success response code

    HTTP/2 200
    

    Response body

    [
        {
            "bounce": false,
            "clicks": 1,
            "complaint": false,
            "desktop": true,
            "links": {
                "http://www.sarbacane.com?utm_source=Sarbacane&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://www.sarbacane.com?utm_source=Sarbacane&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
        }
    ]
    

    Retreive unit (recipient by recipient) statistics for a campaign.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    campaignId true Id of the campaign
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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

    Templates

    List templates

    HTTP Authentication

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

    HTTP Headers Authentication

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

    HTTP success response code

    HTTP/2 200
    

    Response body

    {
        "count": X,
        "templates": [
            {
                "id": "md1166aAQXOItlDLcBzyQA",
                "name": "Name",
                "createdAt": "2019-01-01T00:00:00Z",
                "updatedAt": "2019-01-01T00:00:00Z",
            }
        ]
    }
    

    List templates.

    HTTP Request

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

    Headers parameters:

    Parameter Required Description
    accountId true Id of the account
    apiKey true API Key

    URL parameters

    Parameter Required Description
    offset false Start position
    limit false Maximum number of returned elements - Max: 1 000

    Error codes

    HTTP code Error Description
    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: {'email':'recipient.com'}

    JSON Body

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

    Type Description
    delivered Delivered Email
    soft_bounce Bounced Email
    hard_bounce Hard bounced Email
    open Opened Email
    click Clicked Email
    unsubscribe Unsubscribed Email
    complaint Complainted Email

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

    Parameter Description Example
    campaignId Id of the campaign "campaignId": "EDE18BYwQwqYA9_BKyTsVr"
    date Event date "date": "2018-01-17T11:21:59.314Z"
    email Recipient Email "email": "recipient.com"
    from Sender Email "from": "sender.com"
    sendId Id of the send "sendId": "BbJ-n53VQ-2_3i5ewR111R"
    subject Message subject "subject": "30% off !"
    category Type of refusal "category": "RELAYING_ISSUES"
    returnCode Return code "returnCode": -1
    smtpDescription SMTP error description "smtpDescription": "There are no DNS entries for the hostname tgipimail.com. I cannot 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
    operatingSystem Operating system "operatingSystem": "WINDOWS"
    webmail Webmail type "webmail": "Unknown"