Skip to Content
Benbase

Errors

HTTP status codes, error responses, and authentication errors.

Errors

HTTP Status Codes

StatusMeaning
200Success
400Bad request — invalid payload or missing required fields
401Unauthorized — missing or invalid API key
404Not found — resource does not exist
409Conflict. The employee already exists for this employer. POST /employee-changes/new-hire returns it.
429Too many requests. See Rate Limits.
500Server 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

ScenarioStatusmessage
No Authorization header, or a header with no Bearer prefix401API key is required.
An API key that is not valid, or that is disabled401Invalid 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.com401Invalid 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.

On this page