API Docs

API structure

Successful requests

In case no exception occurs and the API returns HTTP 200 the response will have the following structure:

    "success": true,
    "code": 200,
    "data": "[response data]"

The type of "data" in the response can vary depending on the used endpoint. E.g. while the embed code endpoint returns a string (=> the actual embed code), the riddle list will return an array consisting of all riddles matching the given query.

Failed requests

In case an exception occurs the response will include different information.

    "success": false,
    "code": 400,
    "error": "BAD_REQUEST",
    "message": "Bad Request."

Let's go through each sent parameter:

  • code: The HTTP response code; Check out https://http.cat to explore various codes.
  • error: An unique error code which is easier to work with when working with this API programmatically.
  • message: An error message which includes more information why what happened. In some cases additional information is redacted to not expose any security-risking information. If that is the case and you want to know more please contact us in the support chat.