---
title: "POST /api/optimizer-x12-denials"
method: POST
path: "/api/optimizer-x12-denials"
---

# POST /api/optimizer-x12-denials

`POST /api/optimizer-x12-denials`

## Request

- Base URL: `https://forecaster.cairhealth.com`
- URL: `https://forecaster.cairhealth.com/api/optimizer-x12-denials`
- Auth: HTTP bearer

Processes X12 denials and returns associated claim IDs.

## Request body

- object
  - `edi` string[], required: Array of EDI strings to be processed. Each string should be either a valid 837 or 835 EDI transaction, with the ISA headers included. The order of the edi strings does not matter, but the Cair Optimizer will only process 837s for which there exists a matching 835 somewhere else in the request.
  - `patientControlNumbers` string[]: Array of patient control numbers. Optional, only use if you want to kick off the optimizer for only the claims with these PCNs

## Response `200`

Array of objects containing data of processed claims.

- object[]
  - `id` string: Unique identifier for the claim. The ID returned can be used to poll for results using the [Poll Optimizer Results](../claims/poll-claim-optimization) API. Output can also be configured to be sent through webhooks using [Webhook Delivery](../claims/webhook-delivery).
  - `patientControlNumber` string: Control number assigned to the patient. This is extracted from your EDI and is a unique identifier for the claim.
  - `apiStatus` string: Status of the API processing for the claim. Typically at this point the response will be `PROCESSING_EDI`. Refer to [API Status](../claims/poll-claim-optimization#api-status-values) for possible values
  - `createdAt` string, date-time: Timestamp when the claim was created

## Other responses

- `401`: Unauthorized access or invalid credentials
- `500`: Server error or processing failure

## Changes

- **2026-11-03** `b32380ccde9a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cairhealth/apis/cair-health-apis/changes/api/optimizer-x12-denials/post.md)

---

[API](https://skmtc.dev/cairhealth/apis/cair-health-apis.md) - [All operations](https://skmtc.dev/cairhealth/apis/cair-health-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/cairhealth/apis/cair-health-apis/revisions/b32380ccde9a?raw)
