> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medera.info/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart — Prior Authorization

> Drive the 17-state PA workflow end-to-end.

The PA workflow runs through 17 documented states with payer-specific rules and 5-channel submission. Voice agent The PA Specialist handles outbound peer-to-peer calls.

## State machine

<Frame>
  <svg viewBox="0 0 720 520" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="medera/pa-workflow.svg" style={{ width: '100%', height: 'auto', display: 'block', maxWidth: '780px', margin: '24px auto' }}><defs><pattern id="mdr-dots" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(0,0,0,0.08)" /></pattern></defs><rect x="0" y="0" width="720" height="520" fill="#ffffff" /><rect x="0" y="0" width="720" height="32" fill="#141413" /><circle cx="14" cy="16" r="3" fill="#ff5f57" /><circle cx="26" cy="16" r="3" fill="#febc2e" /><circle cx="38" cy="16" r="3" fill="#28c840" /><text x="54" y="20" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11" fontWeight="500">medera/pa-workflow\.svg</text><text x="706" y="20" textAnchor="end" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">17-state PA workflow</text><rect x="0" y="32" width="720" height="488" fill="#fafaf6" /><rect x="0" y="32" width="720" height="488" fill="url(#mdr-dots)" /><rect x="0.5" y="0.5" width="719" height="519" fill="none" stroke="#141413" strokeOpacity="0.18" /><text x="360.0" y="56" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="15" fontWeight="600">Prior authorization · 17-state workflow</text><rect x="76.0" y="93.0" width="84" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="118.0" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">PA\_INITIATED</text><line x1="156.0" y1="110" x2="162.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="162.0,106 162.0,114 168.0,110" fill="rgba(20,20,19,0.25)" /><rect x="176.0" y="93.0" width="122" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="237.0" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">CRITERIA\_EVALUATION</text><line x1="294.0" y1="110" x2="300.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="300.0,106 300.0,114 306.0,110" fill="rgba(20,20,19,0.25)" /><rect x="314.0" y="93.0" width="117" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="372.5" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">CRITERIA\_EVALUATED</text><line x1="427.0" y1="110" x2="433.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="433.0,106 433.0,114 439.0,110" fill="rgba(20,20,19,0.25)" /><rect x="447.0" y="93.0" width="101" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="497.5" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">DOCUMENTS\_READY</text><line x1="544.0" y1="110" x2="550.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="550.0,106 550.0,114 556.0,110" fill="rgba(20,20,19,0.25)" /><rect x="564.0" y="93.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="604.0" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">SUBMITTED</text><path d="M 660 127.0 Q 672 142.0 660 157.0 L 60 157.0 Q 48 172.0 60 187.0" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" fill="none" /><rect x="168.5" y="187.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="208.5" y="208" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">IN\_REVIEW</text><line x1="244.5" y1="204" x2="250.5" y2="204" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="250.5,200 250.5,208 256.5,204" fill="rgba(20,20,19,0.25)" /><rect x="264.5" y="187.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="304.5" y="208" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">PENDED</text><line x1="340.5" y1="204" x2="346.5" y2="204" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="346.5,200 346.5,208 352.5,204" fill="rgba(20,20,19,0.25)" /><rect x="360.5" y="187.0" width="95" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="408.0" y="208" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">INFO\_REQUESTED</text><line x1="451.5" y1="204" x2="457.5" y2="204" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="457.5,200 457.5,208 463.5,204" fill="rgba(20,20,19,0.25)" /><rect x="471.5" y="187.0" width="80" height="34" fill="#76a1fc" stroke="#4f7be0" strokeWidth="1" /><text x="511.5" y="208" textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="700">APPROVED</text><text x="360.0" y="200" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">On denial</text><line x1="360.0" y1="210" x2="360.0" y2="222" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="356.0,222 364.0,222 360.0,228" fill="rgba(20,20,19,0.25)" /><rect x="176.0" y="253.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="216.0" y="274" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">DENIED</text><line x1="252.0" y1="270" x2="258.0" y2="270" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="258.0,266 258.0,274 264.0,270" fill="rgba(20,20,19,0.25)" /><rect x="272.0" y="253.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="312.0" y="274" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">APPEAL</text><line x1="348.0" y1="270" x2="354.0" y2="270" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="354.0,266 354.0,274 360.0,270" fill="rgba(20,20,19,0.25)" /><rect x="368.0" y="253.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="408.0" y="274" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">P2P</text><line x1="444.0" y1="270" x2="450.0" y2="270" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="450.0,266 450.0,274 456.0,270" fill="rgba(20,20,19,0.25)" /><rect x="464.0" y="253.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="504.0" y="274" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">OVERTURNED</text><path d="M 660 287.0 Q 672 302.0 660 317.0 L 60 317.0 Q 48 332.0 60 347.0" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" fill="none" /><rect x="176.0" y="347.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="216.0" y="368" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">EXPIRED</text><line x1="252.0" y1="364" x2="258.0" y2="364" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="258.0,360 258.0,368 264.0,364" fill="rgba(20,20,19,0.25)" /><rect x="272.0" y="347.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="312.0" y="368" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">WITHDRAWN</text><line x1="348.0" y1="364" x2="354.0" y2="364" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="354.0,360 354.0,368 360.0,364" fill="rgba(20,20,19,0.25)" /><rect x="368.0" y="347.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="408.0" y="368" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">CLOSED</text><line x1="444.0" y1="364" x2="450.0" y2="364" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="450.0,360 450.0,368 456.0,364" fill="rgba(20,20,19,0.25)" /><rect x="464.0" y="347.0" width="80" height="34" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="504.0" y="368" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">ARCHIVED</text><text x="360.0" y="360" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="12" fontWeight="600">Submission channels</text><rect x="67.0" y="382.0" width="74" height="28" fill="#76a1fc" stroke="none" strokeWidth="1" /><text x="104.0" y="400.2" textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">EPA\_API</text><rect x="177.0" y="382.0" width="110" height="28" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="232.0" y="400.2" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">CLEARINGHOUSE</text><rect x="326.0" y="382.0" width="68" height="28" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="360.0" y="400.2" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">PORTAL</text><rect x="463.0" y="382.0" width="50" height="28" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="488.0" y="400.2" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">FAX</text><rect x="582.0" y="382.0" width="68" height="28" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="616.0" y="400.2" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">MANUAL</text><text x="360.0" y="460" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Same state machine across every channel · per-payer rules · evidence-anchored</text></svg>
</Frame>

<Steps>
  <Step title="Evaluate criteria">
    <CodeGroup>
      ```text theme={"system"}
      bash cURL curl -X POST https://api.medera.info/api/prior-auth/evaluate \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "patient_data": { "diagnosis_codes": ["F32.1"], "phq9_score": 14 }, "procedure_codes": ["90834"], "payer_id": "AETNA" }'
      ```

      ```typescript JavaScript const result = await client.pa.evaluate({ patient_data: { diagnosis_codes: ['F32.1'], phq9_score: 14 }, procedure_codes: ['90834'], payer_id: 'AETNA', }); // result.recommendation: AUTO_APPROVE theme={"system"}
      | LIKELY_APPROVE | NEEDS_REVIEW | LIKELY_DENY
      ```

      |

      ```text theme={"system"}
      python Python result = client.pa.evaluate(patient_data={"diagnosis_codes": ["F32.1"], "phq9_score": 14}, procedure_codes=["90834"], payer_id="AETNA",)
      ```
    </CodeGroup>
  </Step>

  <Step title="Create the PA request">
    <CodeGroup>
      ```text theme={"system"}
      bash cURL curl -X POST https://api.medera.info/api/prior-auth/requests \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "patient_id": "pat_abc", "diagnosis_codes": ["F32.1"], "procedure_codes": ["90834"], "clinical_justification": "...", "payer_id": "AETNA" }'
      ```

      ```text theme={"system"}
      typescript JavaScript const req = await client.pa.createRequest({ patient_id: 'pat_abc', diagnosis_codes: ['F32.1'], procedure_codes: ['90834'], clinical_justification: '...', payer_id: 'AETNA', });
      ```

      ```text theme={"system"}
      python Python req = client.pa.create_request(patient_id="pat_abc", diagnosis_codes=["F32.1"], procedure_codes=["90834"], clinical_justification="...", payer_id="AETNA",)
      ```
    </CodeGroup>

    Initial state: `PA_INITIATED`.
  </Step>

  <Step title="Generate documents">
    <CodeGroup>
      ```text theme={"system"}
      bash cURL curl -X POST https://api.medera.info/api/prior-auth/documents/generate \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "request_id": "pa_abc", "document_types": ["MEDICAL_NECESSITY", "CLINICAL_SUMMARY"] }'
      ```

      ```text theme={"system"}
      typescript JavaScript await client.pa.generateDocuments({ request_id: req.pa_id, document_types: ['MEDICAL_NECESSITY', 'CLINICAL_SUMMARY'], });
      ```
    </CodeGroup>
  </Step>

  <Step title="Submit">
    Submission selects the highest-priority available channel:

    ```text theme={"system"}
    EPA_API → CLEARINGHOUSE → PORTAL → FAX → MANUAL
    ```

    ```text theme={"system"}
    bash curl -X POST https://api.medera.info/api/prior-auth/requests/{id}/submit \ -H "X-API-Key: $MEDERA_API_KEY"
    ```
  </Step>

  <Step title="Track and appeal">
    Poll status; if denied, generate the appeal with new evidence.

    ```text theme={"system"}
    bash curl https://api.medera.info/api/prior-auth/requests/{id} \ -H "X-API-Key: $MEDERA_API_KEY" # If denied: curl -X POST https://api.medera.info/api/prior-auth/requests/{id}/appeal \ -H "X-API-Key: $MEDERA_API_KEY"
    ```
  </Step>
</Steps>

## Supported payers

`CARELON_ANTHEM`, `OPTUM_BH`, `MAGELLAN`, `EVERNORTH`, `UNITED_HEALTHCARE`, `AETNA`, `CIGNA`, `BLUE_CROSS`, `MEDICAID`, `MEDICARE`.

## Document types

`MEDICAL_NECESSITY`, `CLINICAL_SUMMARY`, `TREATMENT_PLAN`, `ASSESSMENT`, `PROGRESS_NOTE`, `DISCHARGE_SUMMARY` — plus X-12 EDI 278 for clearinghouse submission.

***

## What's next

<CardGroup cols={2}>
  <Card title="Prior Authorization Agent" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/file-check-2.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=49f0f21ae1056274346b6a6236075644" href="/agentic/agents/prior-authorization" width="40" height="40" data-path="icons/ui/file-check-2.svg">
    Agent-level documentation.
  </Card>

  <Card title="PA API" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/terminal.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=a54c23f663622840fa7b900ec04462a5" href="/api-reference/pa/initiate" width="40" height="40" data-path="icons/ui/terminal.svg">
    Full REST surface.
  </Card>

  <Card title="Denial Appeals" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/undo.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=c51a77eb19d96b00093f62df6a32c5f5" href="/agentic/agents/denial-appeals" width="40" height="40" data-path="icons/ui/undo.svg">
    Appeal lifecycle.
  </Card>

  <Card title="Eligibility" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/badge-check.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=56e825a4617429f1459f14dd9ee0d798" href="/agentic/agents/eligibility-verification" width="40" height="40" data-path="icons/ui/badge-check.svg">
    Pre-visit benefits.
  </Card>
</CardGroup>
