API Responses & Error Codes

API Responses & Error Codes

This page provides an overview of possible responses from the Suonora API. It includes success responses for valid requests and error responses for issues such as invalid input, authentication failures, or rate limits.


Success Responses

All successful responses include "success": true in the response body.

  • 200 OK – The request was processed successfully.
  • 201 Created – The resource was created successfully.

Example Success Response

json
{
  "success": true
}

Error Responses

Error responses include "success": false and an error message describing the issue.

Below is a summary of possible error responses:

HTTP StatusError TypeDescription
400Bad RequestThe request was malformed or contained invalid parameters.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe account does not have permission to perform this action.
429Too Many RequestsThe request rate limit has been exceeded.
500Internal Server ErrorAn unexpected server error occurred.

Example Error Response

json
{
  "success": false,
  "error": "Invalid API key provided."
}

Example Too Many Requests Response

json
{
  "success": false,
  "error": "Rate limit exceeded. Please wait before making more requests."
}

If you receive a 429 Too Many Requests error, you should implement retry logic in your application to avoid exceeding your allowed quota and ensure compliance with the rate limit.