Mailocator API is designed to integrate into tools using a RESTful interface
Use the API to get
- monthly summaries for accounting in external systems
- statistical information about individual projects
- the ability to export data from a data warehouse
- interface for importing external audiences (supported by selected ESP, e.g. Targito)
API key
Procedure for creating an API key:
open a Mailocator project
go to Settings project
In the Expert section, select the Mailocator API tab and follow the instructions.
Endpoint and query structure
Endpoint always has this structure, there can be more parameters
https://api.mailocator.com/[ version ]/[ method ]/[ parameter ]/[ content-type ]
Authorization
Include the following header in the HTTP request, where the API key must be base64-encoded:
Authorization: basic VGhpcyBpcyBteSBhcGkga2V5
Example request
curl -X GET "https://api.mailocator.com/2.0/ping/time/JSON" \
-H "Authorization: basic VGhpcyBpcyBteSBhcGkga2V5"
Result
HTTP/1.1 200 OK
{"status":1, "error":0, "mesg": "Request successful", "timestamp":1595621265}
Error
HTTP/1.1 401 Unauthorized
{"status":0, "error":true, "mesg": "Authorization failed: Invalid API key!"}
Test environment
If you have a valid key, you can use the test environment at https://api.mailocator.com/test/