Errors.
OpenInsure uses standard HTTP response codes to indicate the success or failure of an API request.
Status Codes
200 OK The request was successful. 400 Bad Request The request was unacceptable, often due to missing a required parameter. 401 Unauthorized No valid API key provided. 403 Forbidden The API key does not have permissions to perform the request. 404 Not Found The requested resource doesn't exist. 429 Too Many Requests Too many requests hit the API too quickly. 500 Internal Server Error Something went wrong on OpenInsure's end. Error Object
Error responses contain a JSON object with a machine-readable code and a human-readable message.
Response
{
"error": {
"code": "resource_missing",
"message": "No policy found with ID pol_123...",
"request_id": "req_abc123"
}
}