The Greenspark API uses standard HTTP status codes to represent the result of your requests.
| Code | Type | Description |
|---|
| 200 | OK | The request succeeded. |
| 201 | Created | The request succeeded, and a new resource was created. This is typically the response after POST requests, or some PUT requests. |
| Code | Type | Description |
|---|
| 400 | Bad Request | The server cannot process the request because of a client error, such as malformed syntax or a wrong parameter type. |
| 401 | Unauthorized | The API key is missing or not accepted for this route. A Public API key is accepted only on widget endpoints and the public account and community routes. Routes that require a Private API key, and the project catalog list routes, reject it. |
| 403 | Forbidden | The account plan does not include this route. A Private API key can call the API on a paid business plan. Estimations and reporting routes other than GET /v2/reports need Premium or Enterprise. Adding, verifying or deleting an email domain, and creating or updating custom email templates, need Growth, Premium, or Enterprise. |
| 404 | Not Found | The endpoint is valid, and the resource does not exist. |
| 422 | Unprocessable Entity | The monthly API allowance is used up. The body message is MAX_API_CALLS_REACHED and includes resetsAt, the time the allowance resets. The allowance resets on the billing-cycle renewal, monthly even on an annual plan. |
| Code | Type | Description |
|---|
| 500 | Internal Server Error | The server has encountered a situation it does not know how to handle. |