Introduction

Using martailer's RESTful APIs you will be able to generate ads on various placements and report back the performance metrics within your martailer account. These APIs are organized around REST, and use your API keys for authentication.

Authenticate

Authenticate RESTful API requests by providing your API key as part of each request. You can get your API keys from your account manager. Your API key is passed using X-API-KEY header with each request.

Errors

Our API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error from information provided as part of the request (e.g. the requested object doesn't exist, an invalid setting, etc.), and codes in the 5xx range indicate an error on martailer's end.

The response of all API errors contain a message parameter which has developer-facing information about why the request failed.

See the table below for a list of error codes and their corresponding descriptions:

CodeSummaryDescription
200OKThe request completed successfully
400Bad RequestRequest is missing or has a bad parameter
400Not AuthorizedRequest is missing or has an invalid API key
401Not AuthorizedKey is valid, but account does not have permissions to perform this action
403ForbiddenRequest is missing or has an invalid API key
404Not FoundThe requested resource doesn't exist
500Server ErrorSomething is wrong on martailer's end

Versioning

When we make backwards incompatible changes to the API, we release new API versions, which are reflected in the API endpoint structure.