haley marketing logo
Search
Close this search box.

HaleyMail REST API

The HaleyMail REST API requires an API Key. API Keys are generated in the MyHaley Customer Control Panel. If you are a developer, you must obtain an API key from a Haley Marketing client. We can not provide you a key on their behalf.

Required Parameters

keyyour api key
fnthe API function you are requesting

The REST Response

The REST Response is a JSON formatted string. The string always consists of two parts, the ticket and the results.
The ticket describes the function requested, the key used for the request, time elapsed, and the API version.
The results consist of a status [ok|error], an extended status message, and the data the function returns. If an error occurs, the error details will appear in the extended status message.

Here is an example of a successful call to the API keyTest function.

 

				
					{
    "ticket": {
        "fn": "keyTest",
        "key": "cb5e5816e63d16d5d54703902083f",
        "elapsed": "0.005501",
        "api version": "1.0"
    },
    "results": {
        "status": "ok",
        "xstatus": "",
        "data": {
            "ClientName": "HMG Test Account"
        }
    }
}