Errors
HTTP status codes, error responses, and authentication errors.
Errors
HTTP Status Codes
| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — invalid payload or missing required fields |
401 | Unauthorized — missing or invalid API key |
404 | Not found — resource does not exist |
409 | Conflict. The employee already exists for this employer. POST /employee-changes/new-hire returns it. |
429 | Too many requests. See Rate Limits. |
500 | Server error |
Error Response Format
{
"error": {
"message": "<error-message>",
"code": "<ERROR_CODE>",
"validationErrors": {
"fieldErrors": {},
"formErrors": [],
"issues": []
}
}
}code is a fixed value for each type of error, for example UNAUTHORIZED or BAD_REQUEST. Only a 400 response can have validationErrors. It gives the fields of the request that failed validation.
Authentication Errors
| Scenario | Status | message |
|---|---|---|
No Authorization header, or a header with no Bearer prefix | 401 | API key is required. |
| An API key that is not valid, or that is disabled | 401 | Invalid or disabled API key. |
A key sent to the host of the other environment, for example a live_sk_ key sent to https://embed-sandbox.benbase.com | 401 | Invalid or disabled API key. |
A key works only on the host of its own environment. See Go Live.
Webhook Retry Policy
Webhooks are delivered via Svix. If your endpoint does not return a 2xx response within 15 seconds, Svix will retry delivery. See the Svix retry documentation for the full retry schedule.