API documentation

General information

If you would like to integrate Enormail in your CMS or CRM solution this is a good point to start. At this moment we only have a PHP API wrapper available
but we expect the community to release wrappers sooner or later for other languages. (Yes we mean you ...)

API wrappers

The PHP wrapper is the quickest way to access our API. Drop it in your project and start coding right away.

PHP 5.3

Getting started

Before you can use our API you have to create an API key. Go to the manage api section in your Enormail account and
create a new API key.

Authenitifcation

The Enormail API uses HTTP Basic Authentication to authenticate requests. When you make an API request you provide your API key as the username and the password
portion can be blank or a dummy value, as it is not used for API authentication.

To test if your connection to our API is working properly you can access our API directly through your browser.

Adding a contact

Adds a contact to your list. On success it returns the new contact details in the location header.

Important: although you're able to easily add contacts through our API which did not optin to your mailinglist, we highly recommend to use this function
with caution. Please use the forms subscribe method to subscribe contacts to your mailinglist and respect the CAN-SPAM-ACT. Abusing this
function will risk your account being banned.

POST https://api.enormail.eu/api/1.0/contacts/{listid}.{json|xml}

Params

Name

Type

Description

listid

string

The listid the contact is added to (required)

name

string

The contact's name (required)

email

string

The contact's e-mailaddress (required)

activate_autoresponder

tinyint

1 or 0, trigger the autoresponder on the list for this contact. Default is 0.

API using forms

Getting your API formid

When communicating with forms you require an unique formid. In the following sequence
you'll find instructions to retrieve your formid.

First, create a new form or go to your form publish settings.

Second, copy the formid from the publish settings.

Subscribing contacts with forms

Subscribes a contact through your subscribtion form. This method wil act like the form has been submitted by
the contact. On success the subscribe method will send your activation message to the subscribing contact.

POST https://api.enormail.eu/api/1.0/forms/{formid}.{json|xml}

Params

Name

Type

Description

name

string

The contact name (required)

email

string

The contact e-mail address (required)

fields

array

An array with additional fields, some fields maybe required depending on form settings.