OFAC API Error Codes

The API uses standard HTTP status codes to indicate whether a request was successful or why it failed.

Error response format

{
  "detail": "name is required",
  "instance": "https://api.domain.com/v1/screen",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank",
  "code": "MISSING_NAME",
  "pointer": "/subject/name"
}

HTTP status codes

StatusCodeWhen it happensCommon causes
200OKRequest processed successfullyMatches may still be empty
400Bad RequestInvalid or malformed request bodyMissing name, empty batch, invalid JSON, wrong types, invalid enum values, more than 50 subjects on /v1/screen/batch, unknown sources id
401UnauthorizedAuthentication failedMissing or invalid Authorization header, invalid API key
404Not FoundEndpoint does not existWrong URL path or version
405Method Not AllowedUnsupported HTTP methodUsing GET instead of POST
415Unsupported Media TypeInvalid content typeMissing or incorrect Content-Type: application/json
429Too Many RequestsAccount exceeded 5 screening requests per secondShared by /v1/screen, /v1/screen/batch, and /v1/screen/wallet. Response includes Retry-After: 1.
500Internal Server ErrorUnexpected server errorTemporary failure

503 Service Unavailable means the API could not check the key because a dependency was down. Retry later.