Skip to content

Protocol

Our API works exclusively using the HTTP protocol. All requests should be send using the HTTP protocol. With the exception of the authentication request, all HTTP request and response messages are both JSON encoded messages.

All API requests must be made over HTTPS. Calls made over plain HTTP are not supported.

Requests and Responses

All API requests are JSON encoded messages. The are sent as a standard HTTP POST. The end point differs for each environment. See the endpoints for each environment.

JSON attribute keys are case insensitive. Every request should contain the previously acquired access_token in the Authorization: Bearer HTTP-header.

A request needs the following minimal components:

POST [URL] HTTP/1.1
Host: api.staging.mypup.app
Content-Type: application/json
Authorization: Bearer [ACCESSTOKEN]

[JSON] 

All response messages are JSON encoded and have at least a message attribute which contains an error message if there is an error. Almost all response messages also contain an additional success and error attribute. The success attribute will be set to true if the command executed successfully. The error attribute will contain an error-code if there is any.

Note: When parsing the response messages, you must keep in mind that it can have additional fields in the future.

{
  "success": true,
  "error": null,
  "message": null 
}