# Errors and credits

> Status codes the Platform API returns and how credit charges work.

Source: https://docs.csquaregrc.com/api/errors


## Status codes

| Status | When |
| --- | --- |
| 200 / 201 | Success. |
| 400 | Missing or invalid input, for example `Valid program_id UUID required` or an invalid webhook URL. |
| 401 | Missing or invalid API key. |
| 402 | The sub-organization has used its credit allocation. |
| 403 | The `program_id` does not belong to your organization. |
| 404 | Unknown path. The body includes the path you called. |
| 429 | Sub-organization limit reached for your plan. |
| 500 | Something failed on our side. Retry with backoff. |

Error bodies always have the shape `{ "error": "message" }`.

## Credits

Checks cost credits: compliance check 5, AML status 5, risk score 15. When you pass `sub_org_id`, the charge is recorded against that sub-organization so you can bill your customers accurately. A sub-organization with `credit_allocation` of `0` has no cap.

## Retries

Requests are safe to retry on `500`. Creating a sub-organization or webhook is not idempotent, so check with a `GET` before retrying a `POST` that timed out.

