Our API uses conventional HTTP responses to indicate the success or failure of requests. Status 200
responses indicate success, status 4xx
indicate failures due to errors in the information sent, and status 500
indicate internal errors on our server.
HTTP Code | Description |
---|---|
200 OK | Your request was successful. |
400 Bad Request | A mandatory parameter was not sent or is invalid. In this case, the response itself will indicate what the problem is. |
401 Unauthorized | No API Key was sent, or it is invalid. |
403 Forbidden | Unauthorized request. API abuse or the use of prohibited parameters can generate this code. |
403 Forbidden / Cloudfront (GET) | 403 errors in GET calls indicate that you are sending a body with the request. You should not send any information in the body in GET type calls. |
404 Not Found | The requested endpoint or object does not exist. |
429 Too Many Requests | Too many requests in a given period of time. More in our section on Rate Limiting. |
500 Internal Server Error | Something went wrong on the Asaas server. |
All API endpoints accept and respond in JSON.
Example response for HTTP 400:
{
"errors":[
{
"code":"invalid_value",
"description":"The value field must be informed"
},
{
"code":"invalid_dueDate",
"description":"The due date cannot be earlier than today"
}
]
}