Introduction to the Answerly API

Fatos Bediu
Founder & Developer answerly.io
The Answerly API uses a straightforward REST architecture with self-descriptive endpoints and body parameters. It always accepts application/json
as content type and returns JSON encoded responses.
The Answerly API server is: api.answerly.io
and only supports https!
Authentication
Our API uses API keys to authenticate your requests. You create and manage your API keys inside the dashboard. To learn how to create an API key, click here.
To send an authorized request, you must always include the API key in your JSON body, for example:
{
"APIKey": "797EA469B14D4AB5AD695FA85FD9EEFACDB40ADD86CF5E9F625E3B978979EDEB",
...
}
Request Methods
POST
- Create/Update/Delete
GET
- Read
Response Codes
200
- ✅ Request completed successfully
400
- 🚫 Bad request
401
- 🚫 API key unauthorized to complete the request
500
- ⚠️ Internal server error
Response Structure
Our API uses a standard JSON response with two keys status and/or data.
status (boolean)
This key is always in the response, and its truthy value implies the server completed the request successfully. In contrast, its falsy value implies the server failed to complete your request due to a reason.
data (any)
This key is only in the response when you expect data from the request or if the request failed to complete due to a reason.
- If the status is true, then the data type can be an
object
,string
,boolean
,array
-- it all depends on what you're trying to read from the server.
- If the status is false, then the data type is always a
string
that contains the reason why your request failed to complete. The reasons are always in plain English.
200 Response examples
POST (success)
{
"status": true
}
GET (success)
{
"status": true,
"data": {
"id": "6dab200a-e905-40g3-a655-59085111892b",
"content": "My example banner",
"linkMode": "fancy",
"closeBehavior": "forget",
"scrollBehavior": "follow",
"cornerStyle": "dubbed"
}
}
POST/GET (failure)
{
"status": false,
"data": "A banner widget with that ID was not found"
}
400 Response example
{
"status": false,
"data": "Bad JSON"
}
401 Response example
{
"status": false,
"data": "Unauthorized"
}
500 Response example
{
"status": false,
"data": "Internal Server Error"
}
Did we answer your question?
How can we improve this answer?