API Overview

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:

Code

Summary

Description

200

OK

The request completed successfully

400

Bad Request

Request is missing or has a bad parameter

400

Not Authorized

Request is missing or has an invalid API key

401

Not Authorized

Key is valid, but account does not have permissions to perform this action

403

Forbidden

Request is missing or has an invalid API key

404

Not Found

The requested resource doesn't exist

500

Server Error

Something 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.