Generating an API token

A demo API token is available when trying out calls here in the documentation.

Contact us at [email protected] to get an API token if your subscription is elligble.

Authentication

All HTTP requests to the API should include a api-token header with your api token as a value.

curl -H "api-token: [YOURAPITOKEN]" "https://api.snaplytics.io/v1/[endpoint]"

Errors

The Snaplytics API will return the following HTTP responses

CodeNameDescription
200OKEverything A OK!
401NotAuthenticatedAPI token missing or invalid
404NotFoundReturned both if entity does not exist or you are not allowed to access it.

All errors will return a JSON blob in the following format:

{
  "error": true,
  "message": "Human readable error message"
}

❗️

Watch out!

We may return errors not listed above, so don't rely on the errors. Check the content of the JSON blob as well.