# Get API access Source: https://docs.develophealth.ai/api-reference/authentication Create an API token and use it to authenticate requests to the Develop Health API. The Develop Health API uses API tokens for bearer authentication. Include your API token in the `Authorization` header of every request. ## Generate an API token 1. Sign in to the Develop Health platform. 2. Open **Settings**. 3. Select **User administration**. 4. Select **Open User Administration**. 5. In the administration window, select **API Tokens**. 6. Create a new API token, then copy it and store it securely. > [!NOTE] > > If you do not see **API Tokens**, ask your organization administrator for access. ## Authenticate a request Pass the API token as a bearer token: ```bash theme={null} curl https://api.develophealth.ai/status \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` > [!WARNING] > > Treat API tokens like passwords. Do not expose them in client-side code or commit them to source control. Replace a token immediately if it is exposed. # Cancel a benefit verification Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/cancel_item post /benefit-verification/{id}/cancel Cancel an in-progress benefit verification. Cancelling a benefit verification request will stop the verification process and prevent any further updates. ## API errors | HTTP status | `error.code` | Meaning | | - | - | - | | `404` | `not_found` | No benefit verification with that ID is visible to the authenticated organization. | | `500` | `unexpected_error` | An unexpected internal error occurred. Retrying may succeed; contact support if it persists. | See [Response handling](/api-reference/response-handling) for common authentication and validation errors. # Retrieve a benefit verification Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/get_item get /benefit-verification/{id} Retrieve details of a specific benefit verification request. ## Response handling Use `data.status` to determine whether verification is still running, completed, failed, or cancelled. See [Benefit verification statuses and errors](/api-reference/medication-benefit-check/response-handling) for the lifecycle, workflow error codes, retrieve errors, and recommended caller behavior. # Overview Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/overview Processing modes, request inputs, and how to receive verification results. Benefit verification checks a patient's prescription coverage, whether each medication requires prior authorization, and available copays. ## Choose a processing mode * **Standard (default):** Best coverage with the simplest integration. * **Real-time:** For workflows that want a fast result but can wait longer. Falls back to Standard for the same coverage. * **Real-time only:** For workflows that cannot wait for slower verification. Fails if real-time verification cannot complete, with no standard fallback. Real-time access must be enabled for your organization. See [Real-time processing](/api-reference/medication-benefit-check/realtime-processing) for request settings, requirements, and fallback options. ## Recommended integration flow 1. [Create a benefit verification](/api-reference/medication-benefit-check/request-guide) and save the request ID. 2. Wait for a [webhook](/api-reference/medication-benefit-check/webhooks) confirming that verification completed or failed. 3. Read the result from the webhook, or [retrieve the request](/api-reference/medication-benefit-check/get_item) using its ID. See [statuses and errors](/api-reference/medication-benefit-check/response-handling) for result handling details. ## Request inputs Send patient, provider, medication, and insurance information. You can provide insurance card images, structured insurance details, or both. The [request guide](/api-reference/medication-benefit-check/request-guide) covers the required information, insurance uploads, and medication details. ## Completion time and verification methods | Method | Typical timing | Notes | | - | - | - | | Real-time electronic verification (eBV) | 80% of successful real-time BVs complete within 10 seconds; real-time processing has a 30-second deadline. | Available for eligible requests using Real-time or Real-time only processing. | | Electronic or direct integration | A few minutes | Used when the plan and request data support an electronic route. | | AI-assisted phone call | Tens of minutes | Depends on payer menus, hold times, and the information needed. | | Human phone call | Hours | Depends on payer availability and whether follow-up is needed. | Timing varies by payer. Develop Health selects the methods for the patient's plan. A request can use more than one method. Completed results include the methods used. ## Next steps * [Create a benefit verification](/api-reference/medication-benefit-check/request-guide) with patient, insurance, and medication inputs. * [Explore the API reference](/api-reference/medication-benefit-check/post) for full request and response details. * [Test in the sandbox](/guides/testing) with simulated coverage results. # Create a benefit verification Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/post post /benefit-verification Create an asynchronous verification for up to seven medications. Follow [Create a benefit verification](/api-reference/medication-benefit-check/request-guide) for a complete request example, input recommendations, and sandbox testing. Provide at least one of `insurance` (card images) or `insurance_content` (structured details). Prefer member ID with Rx BIN, PCN, and group. See [insurance inputs](/api-reference/medication-benefit-check/request-guide#insurance) for alternatives when Rx codes are missing. ## Response handling Store the returned `data.id`. A successful response means the verification was accepted. Retrieve the result with [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) or receive a [webhook event](/api-reference/medication-benefit-check/webhooks) when it completes or fails. See [statuses and error codes](/api-reference/medication-benefit-check/response-handling) for exact states, request errors, and workflow failures. # Real-time processing Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/realtime-processing Eligibility, processing modes, fallback behavior, and capacity for real-time benefit verification. > [!NOTE] > > Real-time capability must be enabled for your organization before you can use > it. Contact Develop Health to confirm availability and expected throughput. Real-time processing attempts electronic benefit verification (eBV) for every requested drug. 80% of successful real-time BVs complete within 10 seconds. Real-time processing has a 30-second deadline. Continue waiting for the webhook or polling the same resource ID. Standard fallback timing depends on the verification method and payer. See the [overview](/api-reference/medication-benefit-check/overview#completion-time-and-verification-methods) for typical timings by method. ## Choose a processing mode Set `preferred_processing_mode` when creating a benefit verification. The field defaults to `standard`. | Value | Behavior | Best for | | - | - | - | | `standard` | Uses the full benefit verification process and the broadest available input and completion paths. | Requests where completion rate is more important than latency. | | `realtime` | Attempts real-time eBV first, then automatically continues in standard mode when real-time processing is ineligible, unavailable, incomplete, or unsuccessful. | Latency-sensitive requests that should retain the broader standard process as a fallback. | | `realtime_only` | Attempts only real-time eBV. The request fails if real-time processing cannot complete; standard processing never starts. | Workflows that can handle a terminal failure instead of waiting for standard processing. | ## How real-time processing works The API is asynchronous: creation returns a benefit verification ID. Read the result with [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) or receive it through a webhook. A successful real-time result uses the same response fields and completeness requirements as a successful standard result. Lower real-time coverage means that fewer requests qualify for or complete through the fast path, not that successful results contain fewer fields. ## Track the current processing mode The responses from [`POST /benefit-verification`](/api-reference/medication-benefit-check/post) and [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) include `data.current_processing_mode`: ```json theme={null} { "data": { "id": "bv_...", "status": "pending", "current_processing_mode": "realtime" } } ``` Interpret `current_processing_mode` as follows: * `realtime` means the request is assigned to real-time processing or completed through it. * `standard` means the full standard benefit verification process owns the request. A request with `preferred_processing_mode: "realtime"` can return `standard` immediately or change from `realtime` to `standard` after fallback. The terminal webhook reports the benefit verification when it reaches `completed` or `failed`. Check `GET /benefit-verification/{id}` for a `cancelled` status or a processing-mode change before completion or failure. ## Fallback behavior A `realtime` request continues in standard processing on the same benefit verification when: * real-time processing is unavailable for the request; * real-time verification cannot return a complete result; or * the 30-second deadline is reached before every requested drug completes. Fallback can happen before a real-time attempt starts. The create response then returns `current_processing_mode: "standard"`, and standard processing begins immediately. Fallback can also happen after a real-time attempt starts. Subsequent responses from `GET /benefit-verification/{id}` show `current_processing_mode: "standard"`. Continue tracking the same benefit verification ID for the final status and result. A `realtime_only` request never falls back. If real-time verification is unavailable or cannot complete within 30 seconds, the benefit verification fails. ## Input requirements Requests for either real-time mode must include an NDC for every requested drug. If any drug omits its NDC, the API rejects the request without creating a benefit verification. Provide insurance information as structured values in `insurance_content` or card images in `insurance`. Real-time processing requires a member number and Rx BIN, plus Rx PCN and `rx_group` when applicable. We recommend structured data whenever possible because card extraction may increase request duration. Patient demographics alone do not qualify. At creation, the API rejects requests with neither an insurance card nor a nonblank value in `insurance_content`. ## Limitations * Every requested drug must complete within the 30-second deadline. Partial multi-drug results do not count as real-time completion. * Coverage varies by patient, plan, pharmacy benefit manager (PBM), drug, and organization configuration. * Real-time processing has lower rate limits than standard processing. Available capacity can vary, so `realtime` requests may fall back and `realtime_only` requests may fail during traffic bursts. Contact Develop Health before a material traffic increase to confirm expected real-time throughput for your organization. # Create a benefit verification Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/request-guide Required fields, insurance inputs, drug identifiers, quantity, and multi-drug requests. Create a BV with `POST /benefit-verification`. Use the [example sandbox request](#example-sandbox-request) to test with synthetic data. The [endpoint reference](/api-reference/medication-benefit-check/post) contains all request and response fields. **Use National Drug Codes (NDCs) whenever possible.** They identify the intended medication and are required for real-time processing. ## Example sandbox request > [accordion] View example request > > Set `DEVELOP_HEALTH_SANDBOX_TOKEN` to an API token for your > [sandbox organization](/guides/testing#environment-and-credentials). Store it > securely on your server. > > Save this as `bv-request.json`. The sandbox-only `mock_result` returns a > simulated result. The NPI is illustrative. Use your configured sandbox test > provider if your workflow requires one. > > ```json theme={null} theme={null} > { > "patient": { > "internal_id": "sandbox-patient-001", > "first_name": "Jamie", > "last_name": "Example", > "date_of_birth": "1990-01-15", > "gender": "female", > "address": { > "street": "123 Example Street", > "city": "San Francisco", > "state_province": "CA", > "zip_postal_code": "94107" > } > }, > "provider": { > "first_name": "Alex", > "last_name": "Example", > "npi": "1234567893", > "address": { > "street": "456 Example Avenue", > "city": "San Francisco", > "state_province": "CA", > "zip_postal_code": "94107" > } > }, > "insurance_content": { > "member_number": "SANDBOX001", > "rx_bin": "012345", > "rx_pcn": "TESTPCN", > "rx_group": "TESTGROUP", > "payer_name": "Example Health Plan", > "plan_name": "Example Pharmacy Plan" > }, > "drugs": [ > { > "ndc": "00169450514", > "quantity": 4 > } > ], > "preferred_processing_mode": "standard", > "mock_result": { > "status": "completed", > "case": "drugs_covered__prior_auth_not_required__has_copay" > } > } > ``` > > Submit the request: > > ```bash theme={null} > curl https://api.develophealth.ai/benefit-verification \ > -H "Authorization: Bearer $DEVELOP_HEALTH_SANDBOX_TOKEN" \ > -H "Content-Type: application/json" \ > --data-binary @bv-request.json > ``` > > Save the returned `data.id` to track the result. For more simulated outcomes, > see [sandbox testing](/guides/testing#simulate-benefit-verification-outcomes). ## Minimum request and recommended inputs | Field | Requirement | Recommended for completion | | - | - | - | | `patient` | Stable `internal_id`, first and last name, date of birth, gender, and complete address | Accurate demographics matching the insurance record; phone and email when available | | `provider` | First and last name, NPI, and complete address | Provider phone and fax when available | | `drugs` | One to seven medications | [Use the NDC format](#identify-medications-by-ndc) for each medication to avoid ambiguity | | `insurance` or `insurance_content` | At least one is required | Prefer member ID with Rx BIN, PCN, and group. See [insurance](#insurance) for alternatives | | `entity` | Optional | Legal name and tax ID when available, because some payers require them | | `diagnoses` | Optional | Relevant ICD-10 codes to help interpret coverage for the prescribed indication | | `preferred_processing_mode` | Optional; defaults to `standard` | Choose whether to attempt real-time processing and allow standard fallback | Include the patient, provider, drug, and insurance inputs above. An accepted request can still fail later if the payer cannot identify the member or needs more information. ## Patient and provider data ### Addresses Both the patient and provider require a complete address with: * `street` * `city` * `state_province`, using a valid US state * `zip_postal_code`, as a string so leading zeros are preserved `street_line_2` is optional and `country` defaults to `USA`. Use the patient's current address as recorded with their insurer. ### Gender `patient.gender` is required and accepts `male`, `female`, `other`, or `not_specified`. Use `not_specified` when the information has not been provided. Send known information that matches the payer record. Missing demographics can affect matching and cause delays or inaccurate results. ### Patient identifiers Use a stable `patient.internal_id` for the same patient across BV and PA requests. Store each returned BV ID separately so you can associate webhook updates with the correct workflow. The patient ID does not deduplicate create requests. ### Provider NPI and tax ID Send the provider whose NPI is authorized for the verification. Supplying the provider object does not itself authorize the provider. Resolve authorization requirements during onboarding and handle [authorization errors](/api-reference/medication-benefit-check/response-handling). The NPI identifies the provider and is different from an entity's tax ID. `entity.legal_name` and `entity.tax_id` are optional at intake, but some payers require them to complete verification. A missing tax ID can cause a later failure even though the API accepted the request. See [BV failure detail codes](/api-reference/medication-benefit-check/response-handling#detail-codes). ## Insurance **Provide at least one of `insurance` (card images) or `insurance_content` (structured details).** You can send both. For `insurance_content`, prioritize the member ID and pharmacy routing codes: * **Preferred:** Member ID with Rx BIN, Rx PCN, and Rx group. * **Some Rx codes missing:** Member ID with every Rx code you have, plus payer and plan names. * **No Rx codes available:** Member ID with payer and plan names. | Field | What to send | | - | - | | `member_number` | The member ID on the card, preserved as a string | | `rx_bin` | The six-digit pharmacy routing BIN, as a string to preserve leading zeros | | `rx_pcn` | The pharmacy processor control number | | `rx_group` | The pharmacy benefit group identifier; keep it separate from `group_number` | | `payer_name` | The payer name as shown on the card, as free text | | `plan_name` | The plan name as shown on the card | | `member_name` | The member name on the card, when available | | `group_number` | The group number on the card, when available | | `client_name` | The employer or client name, when shown | See [real-time inputs](#real-time-inputs) for insurance requirements in real-time modes. ### Upload insurance cards Send each card side as a separate item in `insurance`, with the file bytes encoded as Base64 in `file_content`. Insurance-card uploads require file contents; download URLs are unsupported. Replace these placeholders with Base64-encoded files: ```json theme={null} theme={null} { "insurance": [ { "file_content": "BASE64_FRONT_OF_CARD" }, { "file_content": "BASE64_BACK_OF_CARD" } ] } ``` Supported formats are JPEG/JPG, PNG, TIFF, BMP, HEIC, or a single-page PDF. Keep each decoded insurance-card image below 4 MiB (4,194,304 bytes) before Base64 encoding. Resize larger images before uploading. This size guidance applies only to decoded insurance-card images. Send each PDF card side as a single-page file. ### Read extracted insurance data [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) returns insurance records in `data.insurance`. Each record uses `discrete_content` for the values you supplied and `scanned_content` for values extracted from card images. ## Identify medications by NDC Use `CodedDrugInfo` with an `ndc` and an integer `quantity` for each medication. This format supports standard and real-time processing. Example entry in `drugs`: ```json theme={null} { "ndc": "00169450514", "quantity": 4 } ``` The coded format accepts supported product or package NDC representations, including the examples in the endpoint schema. Prefer the exact package NDC when available and keep it as a string to preserve leading zeros. A syntactically valid code must still resolve to a supported drug. For brand versus generic comparisons, submit each exact NDC separately. ### Quantity and units Quantity is separate from days supply. For the specific Wegovy presentation in the coded example above, four individual single-dose pens use `quantity: 4`. Confirm the mapping for other presentations, including quantities recorded in cartons or milliliters. > [!WARNING] > > BV drug objects have no quantity unit field or general unit-conversion rule. > An NDC alone does not specify whether your quantity represents cartons, > pens, or mL. Before sending fractional quantities, liquids, or multidose pens, > confirm the mapping with Develop Health. Do not round a fractional quantity > to fit `CodedDrugInfo`, or add the PA-only > `quantity_unit_of_measure` field to a BV request. PA prescriptions have a separate quantity contract. See the [PA prescription guide](/api-reference/prior-authorization/request-guide#prescription-and-quantity). > [accordion] Only when an NDC is unavailable > > Use the name-based `DrugInfo` format only when you cannot obtain an NDC. > This fallback supports `standard` processing only. Provide `name`, `dosage`, > and `quantity`: > > ```json theme={null} > { > "name": "Metformin", > "dosage": "500 mg", > "quantity": 30 > } > ``` > > Keep the entire `drugs` array in one format. Do not mix name-based and NDC-based > entries. > > `DrugInfo` accepts a numeric quantity, including decimals. Confirm the > dispensing unit as described above. Its `ndc` field is read-only and ignored > on input; use `CodedDrugInfo` when supplying an NDC. ## Real-time inputs Both `realtime` and `realtime_only` require an NDC for every drug and real-time access enabled for your organization. Insurance information must include a member number and Rx BIN, plus Rx PCN and `rx_group` when applicable. Provide this information as structured values in `insurance_content` or card images in `insurance`. We recommend structured data whenever possible because card extraction may increase request duration. Use `realtime` when standard fallback is acceptable, or `realtime_only` when your application can handle a failed real-time attempt without fallback. See [real-time processing](/api-reference/medication-benefit-check/realtime-processing) for the complete eligibility and fallback rules. ## Multiple drugs Submit one to seven drugs in a single request. Store the returned BV ID and inspect each drug's result after completion. Real-time completion requires all requested drugs to complete within the real-time deadline. Each submitted drug consumes one unit of the applicable [BV drug quota](/api-reference/rate-limits#requests-containing-multiple-drugs). Confirm billing terms separately with your Develop Health contact. ## Receive the result Wait for `benefit_verification.status_change` or use [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item). Completion time depends on the verification method and payer, including after real-time fallback. See [completion time](/api-reference/medication-benefit-check/overview#completion-time-and-verification-methods) for typical timings by method and [response handling](/api-reference/medication-benefit-check/response-handling) to determine when results are ready. # Benefit verification statuses and errors Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/response-handling How to interpret request errors, workflow states, and benefit verification failures. Benefit verification responses answer three separate questions: 1. Did the API accept the request? 2. Is verification still running? 3. If it stopped, did it produce a coverage result or a workflow error? ## How to interpret the response | Situation | Source of truth | Meaning | | - | - | - | | The create request is rejected | HTTP status and top-level `error.code` | The API did not return a newly accepted benefit verification ID. | | The create request succeeds | Returned `data.id` | Store the ID and begin monitoring the resource. | | Verification is running | `data.status: "pending"` | Continue waiting. Result fields may still be `null` or `unknown`. | | Verification completes | `data.status: "completed"` | Read the coverage result fields. This is not an error. | | Verification fails | `data.status: "failed"` and `data.error` | Use the workflow error code to correct, replace, or manually handle the request. | ## Lifecycle | `data.status` | Terminal | Meaning | | - | - | - | | `pending` | No | The request is queued or verification is in progress. | | `completed` | Yes | Verification finished. Read `patient_coverage_status` and each item in `drugs`. | | `failed` | Yes | The workflow could not complete. Inspect `data.error`. | | `cancelled` | Yes | The request was cancelled and no further verification work will be created. | The normal transitions are `pending` to `completed`, `failed`, or `cancelled`. Develop Health can retry a failed verification internally. When that happens, the resource moves from `failed` back to `pending`; consumers should accept this transition instead of enforcing terminal states as permanently immutable. `data.status_description` is display text. Do not branch on it because its wording can change without a versioned API change. ### Coverage results are not errors After `completed`, use `patient_coverage_status` and `drugs` for the business result. Clients should tolerate new result enum values rather than converting an unfamiliar coverage result into a failed workflow. ## Request errors These codes can be returned by [Run Benefit Verification](/api-reference/medication-benefit-check/post). Branch on `error.code`, not the human-readable title or description. | HTTP status | `error.code` | Meaning | Recommended handling | | - | - | - | - | | `400` | `invalid_us_state` | `patient.address.state_province` is not a valid US state. | Correct the state and resubmit. | | `400` | `mock_result_not_allowed` | A production organization sent `mock_result` or another mock-only field. | Remove mock-only fields and resubmit. | | `400` | `unknown_ndc` | A supplied NDC could not be resolved to a valid drug. | Correct the NDC or use the appropriate manual process. | | `400` | `referenced_resource_not_found` | The benefit verification named by `replaces` does not exist. | Verify the replacement ID and resubmit. | | `409` | `referenced_resource_invalid_conflict` | The benefit verification named by `replaces` has not been cancelled. | Continue using the existing verification or cancel it before creating a replacement. | | `500` | `unexpected_error` | An unexpected internal error occurred. | Use a manual fallback and contact support. Retry only if the integration can safely reconcile a duplicate request. | ### Cancelling a benefit verification [Cancel Benefit Verification](/api-reference/medication-benefit-check/cancel_item) returns `204` on success. It can also return: | HTTP status | `error.code` | Meaning | Recommended handling | | - | - | - | - | | `503` | `resource_busy` | Another process was briefly holding the benefit verification, so the cancellation was not applied. | Retry. The verification is unchanged, so a retry cannot cancel it twice. | Treat `503` as temporary. Retrying after a short delay is safe and is the expected way to handle it. A `500` from this endpoint is not retryable in the same way, so branch on the status rather than treating every failure alike. ### Insurance-document errors Insurance-document processing can also return these `400` codes: | `error.code` | Meaning | Recommended handling | | - | - | - | | `conversion_exception` | A document could not be converted into the required format. | Replace or re-export the document, then resubmit. | | `decode_exception` | The supplied Base64 data could not be decoded. | Correct the encoding and resubmit. | | `unsupported_mimetype` | The detected document type is not supported. | Convert the document to a supported type. | | `multipage_pdf` | An insurance-card PDF contains more than one page. | Upload a single-page PDF or image. | | `unsupported_file_type` | A file uses an unsupported format. | Convert the file to a supported type. | ## Workflow failures A successful create response does not rule out a later workflow failure. Problems such as unreadable insurance information or a payer that cannot locate the patient appear on the accepted resource returned by [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) and its webhook. When `data.status` is `failed`, `data.error` can contain a stable `code` and `detail_code` alongside human-readable fields. A code can be `null` on legacy verifications; handle it like `Internal Error`. ### Error codes These values are case-sensitive. | `data.error.code` | Meaning | Recommended handling | | - | - | - | | `Patient Not Found` | The plan contact could not locate the patient. | Verify the member ID, name, date of birth, and insurance documents before replacing the request. | | `Insurance Card OCR Failure` | Required information could not be read from the insurance card. | Upload clearer card images or provide the insurance values as structured data. | | `Insurance Unable to Provide Information` | The payer or PBM would not or could not provide the needed information. | Review the message and use a manual process if the request is urgent. | | `Document Quality Error` | An uploaded document was blurry, low resolution, or otherwise unusable. | Upload a higher-quality document. | | `Document Info Missing or Incorrect` | Required patient or insurance information was missing, outdated, or incorrect. | Use `detail_code` to correct the request, then replace it. | | `Unable to Route Call` | The system could not determine a valid payer or PBM contact number. | Provide additional insurance, payer, or plan information. | | `Unable to Gather Benefits` | Benefits could not be gathered after the available attempts. | Review the request data and use a manual fallback when needed. | | `Internal Error` | An internal workflow error prevented completion. | Use a manual fallback for urgent work and contact support with the benefit verification ID. | | `Patient Consent Required` | The payer requires the patient to provide verbal consent. | Obtain the required consent, then submit a replacement benefit verification. | ### Detail codes | `data.error.detail_code` | Meaning | | - | - | | `incorrect_member_id` | The member ID is incorrect. | | `incorrect_dob` | The patient's date of birth is incorrect. | | `incorrect_address` | The patient's address is incorrect. | | `incorrect_phone_number` | The patient's phone number is incorrect. | | `missing_member_id` | The member ID is missing. | | `medical_only_member_id` | The supplied member ID covers medical benefits only. | | `name_mismatch` | The patient's name does not match the insurance card. | | `missing_tax_id` | The provider or entity tax ID is missing. | | `incorrect_tax_id` | The provider or entity tax ID is incorrect. | | `incorrect_npi` | The provider NPI is incorrect. | | `patient_consent_required` | The payer requires the patient to provide verbal consent. | | `patient_declined_consent` | The patient declined to provide the required consent. | | `kaiser_prescriber_required` | Kaiser requires prescribing, benefits, and prior authorization work to be handled by a Kaiser provider. | | `expired` | The benefit verification expired under the account's configured expiry rules. | ## Retrieve errors | HTTP status | Code or response | Meaning | | - | - | - | | `404` | `{"detail":"No benefit verification found for id ..."}` | No benefit verification with that ID is visible to the authenticated organization. | | `400` | `benefit_verification_serialization_error` | The stored benefit verification could not be serialized into the public response. | ## Monitoring and unknown values Poll [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) to check the current BV status. The `benefit_verification.status_change` webhook delivers the full resource when verification completes or fails. Process webhooks idempotently and call the same GET endpoint when you need to confirm the current BV status. Treat code lists as extensible. Preserve unknown values in logs and use the same manual fallback as the closest catch-all error instead of failing to parse the response. See [Response format and errors](/api-reference/response-handling) for authentication, validation, and error-envelope semantics. # Benefit verification webhooks Source: https://docs.develophealth.ai/api-reference/medication-benefit-check/webhooks Understand when benefit verification webhooks are sent. The benefit verification flow determines medication coverage and whether a prior authorization is required. It has one event type: `benefit_verification.status_change`. See [Webhooks](/api-reference/webhooks) to configure an endpoint and understand the shared delivery envelope, signature verification, retries, and processing guidance. ## When webhooks are sent | Journey step | Webhook behavior | What your integration should do | | - | - | - | | Create the benefit verification | No webhook is sent for request acceptance; the API responds synchronously. | Store the returned benefit verification ID. | | Verification in progress | No webhook is sent for each verification attempt. | Continue to treat the benefit verification as pending. | | Terminal result | Develop Health sends `benefit_verification.status_change` when the verification reaches `completed` or `failed`. | Inspect the terminal status and results in `data`. | ## `benefit_verification.status_change` This event represents the terminal customer-facing result, not every attempt made to obtain it. Inspect: * `data.status`; * `data.error` when the verification failed; * `data.drugs` for coverage, PA requirements, and cost-sharing results; * `data.patient_coverage_status`; and * `data.pharmacy_benefit_manager_name`, `data.patient_plan_fund_source`, and `data.patient_coverage_type` when available. The webhook's `data` object matches the resource returned in the `data` field of [GET /benefit-verification/](/api-reference/medication-benefit-check/get_item). Use that endpoint to retrieve the latest complete benefit verification. # Retrieve a Prior Authorization Status Check Source: https://docs.develophealth.ai/api-reference/prior-authorization-status/get_item get /pa-status/{id} Returns the current state of an asynchronous PA status check. Only the effective processing method is returned. The requested `processing_method` from POST is not echoed. If an `instant_preferred` request falls back, the effective method changes from `instant` to `standard`. > [!WARNING] > > **Coming soon.** This API may change before launch, including breaking changes. Retrieve the current state and results of an asynchronous prior authorization status check. ## Reading the response The operation `status` is one of: * `pending`: processing is still underway. * `completed`: processing finished successfully. * `failed`: processing stopped and `failure_reason` explains why. `effective_processing_method` is either `instant` or `standard`. For an `instant_preferred` request, a change from `instant` to `standard` indicates that fallback occurred. `prior_authorizations` is `null` while processing is pending or after it fails. When processing completes, it is an array of matching prior authorizations. An empty array means the check completed successfully and no prior authorizations were found; it is not an error or an inconclusive result. Each result exposes a normalized `status` of `approved`, `denied`, `in_progress`, or `other`, along with any available dates and decision notes. Vendor case IDs, source statuses, PBM names, and medication details are not returned. # Create a Prior Authorization Status Check Source: https://docs.develophealth.ai/api-reference/prior-authorization-status/post post /pa-status Creates an asynchronous check for prior authorizations matching a patient, prescription NDC, and one or more insurance plans. `instant_only` never falls back to standard processing. An ineligible or failed instant check becomes a failed operation. `instant_preferred` attempts instant processing first. If instant processing is ineligible, fails, or produces no result, processing falls back to the standard method. > [!WARNING] > > **Coming soon.** This API may change before launch, including breaking changes. Create an asynchronous check for prior authorizations associated with one patient, one medication NDC, and one or more insurance plans. ## Processing methods * `instant_only` attempts only the instant method. If the request is ineligible or the instant attempt fails, the check ends with `status: failed`. * `instant_preferred` attempts the instant method first and may fall back to the standard method. Polling exposes the method currently handling the check as `effective_processing_method`. ## Request requirements * `prescription` contains only the medication `ndc`. * `insurances` contains one or more insurance objects. Each object must include at least one non-empty discrete insurance field or a non-empty `images` list. * Each insurance image supplies exactly one of `file_content` or `file_url`. * Patient gender must be `male`, `female`, or `other`. * Entity information is not accepted by this endpoint. The eventual successful response contains operation metadata only. Retrieve the prior authorization results by polling the returned ID. # Retrieve a prior authorization Source: https://docs.develophealth.ai/api-reference/prior-authorization/get_item get /prior-authorization/{id} Retrieve details of a specific prior authorization request. ## Response handling Use `data.status` to track progress and `data.outcome` for the result. See [Prior authorization statuses, outcomes, and errors](/api-reference/prior-authorization/response-handling) for lifecycle states, outcome codes, and what to do next. # Overview Source: https://docs.develophealth.ai/api-reference/prior-authorization/overview Who reviews and submits a PA, and how your application receives the result. Develop Health prepares a prior authorization from the patient, insurance, prescription, provider, and clinical information you send. Your organization uses a delegated or non-delegated workflow, configured during onboarding. ## Delegated and non-delegated workflows | Workflow | Who reviews and submits | What your application does | | - | - | - | | Delegated | Develop Health reviews, submits, and handles payer follow-up. | Receive the outcome by webhook. | | Non-delegated | Your user reviews and submits the prepared PA in Develop Health. | Provide the review link, then receive the outcome by webhook. | ## What your application needs to do 1. [Create a PA](/api-reference/prior-authorization/request-guide) and save the request ID. 2. Receive [webhook updates](/api-reference/prior-authorization/webhooks) and check the PA's status. 3. **PA review (non-delegated):** When the PA is ready for review, send your user to the review link in the webhook. They review and submit the PA in Develop Health. 4. **Receive the outcome:** After submission, we'll send the final outcome by webhook. Use it to update your workflow. See [statuses, outcomes, and errors](/api-reference/prior-authorization/response-handling) for response details. ## Next steps * [Create a prior authorization](/api-reference/prior-authorization/request-guide) with patient, prescription, and clinical evidence inputs. * [Explore the API reference](/api-reference/prior-authorization/post) for full request and response details. * [Test in the sandbox](/guides/testing) with simulated outcomes. # Update a prior authorization Source: https://docs.develophealth.ai/api-reference/prior-authorization/patch_item patch /prior-authorization/{id} Append evidence and/or complete external provider outreach. Additional evidence triggers re-answering of this PA using all accepted evidence. An upload alone keeps an external outreach round open until explicit completion or its configured deadline. Completion returns the PA to review after any accepted evidence finishes processing. Completion applies to this PA's current external outreach and is safe to repeat after it ends. Append evidence to an existing PA, complete outreach, or do both in one request. Use the PA ID returned at creation. ## Append evidence New evidence is added to the PA and triggers re-answering using all accepted evidence. Existing evidence is retained. Send a non-empty `evidence` array using the [clinical evidence formats](/api-reference/prior-authorization/request-guide#clinical-evidence). ```json theme={null} { "evidence": [ { "title": "Provider visit note", "date_created": "2026-10-23T12:00:00Z", "asset": { "file_url": "https://files.example.com/provider-visit-note.pdf" } } ] } ``` Or use `asset.file_content` with Base64-encoded file bytes instead of `file_url`. An evidence upload alone keeps outreach open until explicit completion or the organization's configured deadline. ## Complete outreach For a PA with current external outreach, send: ```json theme={null} { "provider_outreach": { "status": "completed" } } ``` Send only `status` inside `provider_outreach`; no outreach ID is accepted. You can include this object alongside `evidence` in the same PATCH. Status-only completion can be repeated while the PA remains eligible for updates. The PATCH cannot start outreach or change the organization's method or deadline. See [provider outreach setup](/api-reference/prior-authorization/request-guide#optional-workflows) for the creation and platform review flows. ## Response handling A `200` response contains the updated PA in the same format as [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item). Evidence processing is asynchronous: acceptance does not mean updated answers are ready. Track `data.status` through GET or [PA status-change webhooks](/api-reference/prior-authorization/webhooks). Evidence processing can return `processing`. If outreach is still active, the PA returns to `awaiting_provider_response`. Completion or deadline exhaustion returns it to `awaiting_review` after accepted evidence finishes processing. For external outreach, `data.provider_outreach` reports the current outreach status and deadline. ## API errors Updates are available before submission while awaiting review or processing provider information. This endpoint cannot replace an active DH-managed outreach flow or update a submitted or terminal PA. | HTTP status | Meaning | | - | - | | `400` | An evidence file could not be downloaded or has an unsupported format. No evidence or completion is accepted. | | `404` | The PA does not exist in the authenticated organization. | | `409` | The PA cannot accept the update, the payer's clinical form is pending, or there is no eligible external outreach to complete. | | `422` | The body has no evidence or completion, an evidence array is empty, or a field or completion status is unsupported. | See [Response handling](/api-reference/response-handling) for common authentication and validation errors. # Create a prior authorization Source: https://docs.develophealth.ai/api-reference/prior-authorization/post post /prior-authorization Create a tenant PA and arrange its requested provider outreach. Args: response: HTTP response used for creation status and headers. organization: Authenticated tenant creating the PA. data: Submitted clinical data and processing instructions. Returns: The created PA or its validation error. Create a prior authorization from patient, provider, insurance, prescription, and clinical information. Follow [Create a prior authorization](/api-reference/prior-authorization/request-guide) for a complete example and the [workflow guide](/api-reference/prior-authorization/overview) for delegated and non-delegated submission models. ## Response handling Store the returned `data.id`. A successful response means the PA was accepted, not that it was submitted to a payer or PBM. Track the same ID through [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item) or [PA webhook events](/api-reference/prior-authorization/webhooks). See [statuses, outcomes, and errors](/api-reference/prior-authorization/response-handling) for exact lifecycle states, request errors, and terminal exceptions. In a non-delegated workflow, `awaiting_review` requires your authorized reviewer to complete [PA review](/api-reference/prior-authorization/overview#what-your-application-needs-to-do). # Cancel a prior authorization Source: https://docs.develophealth.ai/api-reference/prior-authorization/post_cancel post /prior-authorization/{id}/cancel Cancel a prior authorization request. The request must not already be in a terminal state (`completed`, `failed`, or `cancelled`). Requires a `cancellation_reason` payload which is stored for analytics. ## Overview Cancel an in-progress prior authorization request. ## API errors | HTTP status | Meaning | | - | - | | `400` | The PA is already in a terminal state: `completed`, `failed`, `not_submitted`, or `cancelled`. | | `404` | The PA does not exist or is not visible to the authenticated organization. | See [Response handling](/api-reference/response-handling) for common authentication and validation errors. # Submit prior authorization feedback Source: https://docs.develophealth.ai/api-reference/prior-authorization/post_feedback post /prior-authorization/{id}/feedback Submit feedback related to a prior authorization request. The feedback is used to improve the product and is surfaced in analytics dashboards. ## Overview Submit feedback for an existing prior authorization request. Use this endpoint to attach DevelopHealth-facing notes/feedback to PA requests during or after their processing. Feedback passed to this endpoint will be surfaced in analytics dashboards, and can be used in one-off analytics queries/reports. ## API errors This endpoint returns `404` when the PA does not exist or is not visible to the authenticated organization. See [Response handling](/api-reference/response-handling) for common authentication and validation errors. # Create a prior authorization Source: https://docs.develophealth.ai/api-reference/prior-authorization/request-guide Required PA inputs, prescription quantities, and ways to send clinical evidence. Create a PA with `POST /prior-authorization`. The same endpoint supports [delegated and non-delegated workflows](/api-reference/prior-authorization/overview). Your organization's configuration determines who reviews and submits the PA. ## Example sandbox request > [accordion] View example request > > Use this synthetic request with a sandbox organization's token. It sends a > name-based prescription and clinical evidence, with a mock outcome for testing. > The provider identifier is illustrative; use your configured > sandbox test provider if your workflow requires one. > > Save this as `pa-request.json`: > > ```json theme={null} > { > "patient": { > "internal_id": "sandbox-patient-001", > "first_name": "Jamie", > "last_name": "Example", > "date_of_birth": "1990-01-15", > "gender": "female", > "address": { > "street": "123 Example Street", > "city": "San Francisco", > "state_province": "CA", > "zip_postal_code": "94107" > } > }, > "provider": { > "first_name": "Alex", > "last_name": "Example", > "npi": "1234567893", > "address": { > "street": "456 Example Avenue", > "city": "San Francisco", > "state_province": "CA", > "zip_postal_code": "94107" > } > }, > "insurance_content": { > "member_number": "SANDBOX001", > "rx_bin": "012345", > "rx_pcn": "TESTPCN", > "rx_group": "TESTGROUP", > "payer_name": "Example Health Plan", > "plan_name": "Example Pharmacy Plan" > }, > "prescription": { > "drug_name": "Metformin", > "strength": "500 mg", > "dose_form": "tablet", > "route_of_administration": "oral", > "quantity": 30, > "days_supply": 30, > "directions": "Take one tablet by mouth daily.", > "prescription_date": "2026-09-01T10:00:00Z" > }, > "evidence": [ > { > "title": "Sandbox visit note", > "date_created": "2026-09-01T10:00:00Z", > "content": "Synthetic integration test. The clinician reviewed the medication history and recorded the treatment plan." > } > ], > "mock_result": { > "result": "Approved", > "detail_code": "approval" > } > } > ``` > > ```bash theme={null} > curl https://api.develophealth.ai/prior-authorization \ > -H "Authorization: Bearer $DEVELOP_HEALTH_SANDBOX_TOKEN" \ > -H "Content-Type: application/json" \ > --data-binary @pa-request.json > ``` > > Store the returned `data.id`. To track the PA, call > [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item) > with that ID or handle `prior_authorization.status_change` webhooks. See > [sandbox testing](/guides/testing#simulate-prior-authorization-outcomes) for > denial and not-submitted scenarios. ## Required and recommended inputs | Field | Requirement | What to provide | | - | - | - | | `patient` | Required | Stable `internal_id`, first and last name, date of birth, gender, and complete address; phone and email when available | | `provider` | Required | Prescriber's first and last name, NPI, and address object; provide complete address and contact details when available | | `insurance` or `insurance_content` | At least one is required | Prefer member ID with Rx BIN, PCN, and group. See [insurance](#insurance) for alternatives | | `prescription` | Required for this workflow | Coded or name-based prescription, as described below | | `diagnoses` | Recommended | Relevant ICD-10 codes, each in an object with a `code` field | | `evidence` | Recommended | Clinical information your PA team needs to support this prescription. See [clinical evidence](#clinical-evidence) for supported formats | | `pharmacy` | Optional | Dispensing pharmacy information when available | If `diagnoses` is omitted, we'll try to extract diagnoses from the evidence you provide. If we can't extract them, they must be added during [PA review](/api-reference/prior-authorization/overview#what-your-application-needs-to-do). Incomplete clinical data can prevent submission after the API accepts a request. See [optional workflows](#optional-workflows) for resubmissions, appeals, provider outreach, and benefit verification before PA submission. ## Patient and provider data ### Addresses The patient requires a complete address with: * `street` * `city` * `state_province`, using a valid US state * `zip_postal_code`, as a string so leading zeros are preserved `street_line_2` is optional and `country` defaults to `USA`. Use the patient's current address as recorded with their insurer. The provider's address object is required, but its individual fields are optional. Send a complete address when available to help with payer matching and follow-up. ### Gender `patient.gender` is required and accepts `male`, `female`, `other`, or `not_specified`. Use `not_specified` when the information has not been provided. Send known information that matches the payer record. Missing demographics can affect matching and cause delays or inaccurate results. ### Patient identifiers Use a stable `patient.internal_id` for the same patient across BV and PA requests. Store each returned PA ID separately so you can associate webhook updates with the correct workflow. The patient ID does not deduplicate create requests. ### Provider details Send the prescribing provider's NPI. Provide the provider's phone and fax when available. The fax number is required when requesting DH-managed provider outreach. The PA create request has no top-level `entity` field for a legal entity name or tax ID. ## Insurance **Provide at least one of `insurance` (card images) or `insurance_content` (structured details).** You can send both. For `insurance_content`, prioritize the member ID and pharmacy routing codes: * **Preferred:** Member ID with Rx BIN, Rx PCN, and Rx group. * **Some Rx codes missing:** Member ID with every Rx code you have, plus payer and plan names. * **No Rx codes available:** Member ID with payer and plan names. | Field | What to send | | - | - | | `member_number` | The member ID on the card, preserved as a string | | `rx_bin` | The six-digit pharmacy routing BIN, as a string to preserve leading zeros | | `rx_pcn` | The pharmacy processor control number | | `rx_group` | The pharmacy benefit group identifier; keep it separate from `group_number` | | `payer_name` | The payer name as shown on the card, as free text | | `plan_name` | The plan name as shown on the card | | `member_name` | The member name on the card, when available | | `group_number` | The group number on the card, when available | | `client_name` | The employer or client name, when shown | ### Upload insurance cards Send each card side as a separate item in `insurance`, with the file bytes encoded as Base64 in `file_content`. Insurance-card uploads require file contents; download URLs are unsupported. Replace these placeholders with Base64-encoded files: ```json theme={null} { "insurance": [ { "file_content": "BASE64_FRONT_OF_CARD" }, { "file_content": "BASE64_BACK_OF_CARD" } ] } ``` Supported formats are JPEG/JPG, PNG, TIFF, BMP, HEIC, or a single-page PDF. Keep each decoded insurance-card image below 4 MiB (4,194,304 bytes) before Base64 encoding. Resize larger images before uploading. This size guidance applies only to decoded insurance-card images. Send each PDF card side as a single-page file. Insurance cards and [clinical evidence](#clinical-evidence) have different format rules. Use `evidence` for medical records and other supporting documents. ### Read extracted insurance data [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item) returns insurance records in `data.insurance`. Each record uses `discrete_content` for the values you supplied and `scanned_content` for values extracted from card images. ## Prescription and quantity Prefer `CodedPrescription` when you have an NDC: | Format | Drug fields | | - | - | | `CodedPrescription` | `ndc` | | `Prescription` (name-based) | `drug_name`, `strength`, `dose_form`, `route_of_administration` | Both formats also require `directions`, `quantity`, `days_supply`, and `prescription_date`. | Field | Meaning | | - | - | | `quantity` | The prescribed quantity; both PA prescription formats use an integer | | `quantity_unit_of_measure` | Available on `CodedPrescription`; accepts an NCIt code or term from subset C89510 and defaults to `C38046` (Unspecified) | | `days_supply` | How many days the prescription is expected to last | | `directions` | Administration instructions from the prescription | | `prescription_date` | When the prescription was issued, as an ISO 8601 date-time | Use the quantity and unit from the prescription when the chosen format can represent them. The name-based format has no `quantity_unit_of_measure` field, and neither format represents fractional quantities in its integer `quantity` field. For fractional quantities or ambiguous product presentations, confirm a supported mapping with Develop Health before sending the request. Do not round, assume an NDC supplies the unit, or use `days_supply` as a substitute. BV quantity examples do not define PA dispensing units. ## Clinical evidence **Use `evidence` as the primary field for clinical information.** Send chart notes, diagnoses, laboratory results, medication history, and prior treatment outcomes as text, structured JSON, or files. Include relevant dates and the information your PA team would use for the same request. Each item requires `title`, `date_created`, and either `content` or `asset`. ### Text or structured evidence An `evidence` item's `content` can be text or a JSON object. For example, this synthetic item preserves treatment dates and the recorded response: ```json theme={null} { "title": "Prior treatment history", "date_created": "2026-09-01T10:00:00Z", "content": { "medication": "Example prior therapy", "start_date": "2026-01-15", "end_date": "2026-06-15", "response": "Treatment stopped because of the adverse effects recorded in the visit note." } } ``` `date_created` is the item's creation time. If you also send `evidence.document_date`, use the clinical/source document date from a trusted record. Do not substitute upload, export, or ingestion time for that field. ### File evidence For a file, use `asset`. An asset takes exactly one of `file_content` (Base64 bytes) or `file_url` (a downloadable URL). This example shows the shape; replace the placeholder before sending: ```json theme={null} { "title": "Clinical note", "date_created": "2026-09-01T10:00:00Z", "asset": { "file_content": "BASE64_DOCUMENT_CONTENT" } } ``` Supported evidence formats are PDF, JPEG, PNG, HEIC, and HEIF. Convert Word, spreadsheet, TIFF, or BMP evidence to a supported format. The broader [insurance-card format list](#upload-insurance-cards) does not apply to clinical evidence. For URL-based evidence, the service downloads the file immediately. A signed URL must remain valid and accessible for that download; a URL requiring an interactive sign-in will not work. If it fails, correct the URL or provide Base64 content. Do not send both `asset` and `content` for the same item, or both file fields in one asset. The API also accepts `visit_notes` and `questionnaires`. See the [API reference](/api-reference/prior-authorization/post) for their formats. ## Handle missing information and review Track the PA after creation. When a non-delegated PA reaches `awaiting_review`, follow the [PA review step](/api-reference/prior-authorization/overview#what-your-application-needs-to-do). A PA waiting for provider information can remain in progress. If it stops at `not_submitted` with `more_information_required`, read the outcome detail and collect the missing information, then create a new linked request through the [resubmission path](#optional-workflows). Use the [PA response guide](/api-reference/prior-authorization/response-handling) for the exact state and outcome handling rules. ## Optional workflows > [accordion] Resubmissions and appeals > > To resubmit a PA, send a new request with the updated information. Set > `resubmission_info.previous_prior_auth_request_id` to the original PA ID and > use `resubmission_info.note` to explain what changed. The original PA must be > in a terminal state. > > For an appeal, also include `appeal_details` with the appeal letter and urgency. > The resubmission note is optional when appeal details are provided. See the > [create reference](/api-reference/prior-authorization/post) for the field formats. > > | `error.code` | HTTP status | What to do | > | - | - | - | > | `previous_pa_request_in_progress` | `409` | The referenced PA is still running. Wait for it to finish, or cancel it if it should stop, before creating the linked request. `error.existing_prior_auth_request_id` identifies it. | > | `invalid_qle_resubmission` | `400` | A quantity-limit exception must reference a PA that was approved or marked PA-not-required. Check the referenced PA and use `quantity_limit_exception_reason` only for that case. | > | `appeal_not_allowed` | `400` | The original PA was routed through the Medicare GLP-1 Bridge, which does not accept appeals. Send a new request with updated clinical information instead. | > [accordion] Provider outreach > > Pharmacy organizations can set `provider_outreach.enabled: true` to request > clinical documents from the prescriber before PA preparation continues. > For DH-managed outreach, include `provider.fax`. Use [provider outreach events](/api-reference/provider-outreach-webhooks) > to follow communications and the PA status to track the overall request. > > If your team handles provider outreach, Develop Health must enable and configure > it for your organization. Your team contacts the provider; the organization's method > and deadline govern the wait. You can omit `provider_outreach` at creation, > then click **Request Info From Provider** and **Start Outreach** in the platform > when the PA reaches review. Use the > [update endpoint](/api-reference/prior-authorization/patch_item) to send evidence > and mark outreach complete. The PATCH does not start outreach. > > | `error.code` | What to do | > | - | - | > | `provider_outreach_not_supported` | This organization is not configured as a pharmacy. Remove `provider_outreach`, or contact support if the organization configuration is incorrect. | > | `provider_outreach_fax_required` | Supply the prescriber's fax number in `provider.fax` and retry. | > | `invalid_npi` | The outreach request's provider NPI could not be validated in the NPI registry. Correct it and retry. | > | `provider_outreach_mock_result_conflict` | Send provider outreach and simulated outcomes in separate requests. Remove `mock_result` to test outreach. | > [accordion] Benefit verification before PA submission > > Set `trigger_benefit_verification.enabled: true` to check medication coverage > before proceeding with the PA. You can include alternatives in > `trigger_benefit_verification.additional_medications`. See the > [create reference](/api-reference/prior-authorization/post) for the request format. > > When this workflow stops the PA, its status is `not_submitted`. Read > `outcome.detail_code` and the benefit verification result: > > | `outcome.detail_code` | Meaning and next step | > | - | - | > | `benefit_verification_no_medication_coverage` | The prescribed medication is not covered. When configured to stop on this result, the PA ends before submission. Review the BV and consider an alternative or manual review. | > | `benefit_verification_only_alternative_medication_covered` | Only a submitted alternative is covered. Review it with the prescriber and create the appropriate request if treatment changes. | > | `benefit_verification_pa_not_required` | The medication is covered and no PA is required. Continue your workflow and review the BV for coverage and copay details. | > [accordion] Formulary alternatives > > Some configured workflows check whether a formulary alternative is required > before submitting a PA. If the PA stops with `not_submitted` and > `outcome.detail_code: "formulary_alternative_required"`, read the outcome detail > for the alternative. Review it with the prescriber and create the appropriate > request if treatment changes. # Prior authorization statuses, outcomes, and errors Source: https://docs.develophealth.ai/api-reference/prior-authorization/response-handling Track PA progress, handle creation errors, and act on the outcome. After creating a PA, save its ID and use the [status-change webhook](/api-reference/prior-authorization/webhooks) or [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item) to follow its progress. Read `data.status` first, then `data.outcome` when processing finishes. ## Lifecycle | `data.status` | Terminal | Meaning | | - | - | - | | `processing` | No | Develop Health is preparing the PA. | | `awaiting_review` | No | Answers and evidence are ready for review before submission. | | `awaiting_provider_response` | No | The provider needs to supply information or complete a review. | | `awaiting_outcome` | No | Submission is underway or the PA is waiting for a payer result or follow-up. | | `validating_outcome` | No | A received result is being checked. The PA may return to `awaiting_outcome` for follow-up. | | `completed` | Yes | Processing finished with an `Approved`, `Denied`, or `Other` outcome. | | `not_submitted` | Yes | The workflow stopped before submission. Read `outcome.detail_code` and `outcome.detail` for the reason. | | `failed` | Yes | An internal processing failure stopped the PA. Use your manual PA process and contact support with the PA ID. No stable public failure-detail code is exposed. | | `cancelled` | Yes | The request was cancelled and PA processing has stopped. | Approval and denial are normal business outcomes. A `completed` PA can also have an `Other` outcome, such as no PA being required or a duplicate request. Use the status to determine whether the PA is still running. The legacy `outcome.result: "Pending"` value is a placeholder. ### Activity and requests for information Calls, faxes, messages, and provider outreach can occur without changing the PA's status. Use `data.activity_log` and the [webhook events](/api-reference/prior-authorization/webhooks) for those updates. An individual outreach attempt can fail or expire while the PA continues. A request for more information can also be part of an ongoing PA. Only treat the request as stopped when its status is terminal. ## Request errors If [creation](/api-reference/prior-authorization/post) is rejected, read the HTTP status and `error.code`. Correct the request before trying again. If the response includes `error.existing_prior_auth_request_id`, it identifies the earlier PA associated with the error. | `error.code` | HTTP status | What to do | | - | - | - | | `evidence_file_download_failed` | `400` | An evidence file could not be downloaded. Correct the URL or provide the file as Base64 content, then retry. | | `invalid_diagnosis_codes` | `400` | Correct the invalid ICD-10-CM diagnosis codes and retry. | | `insurance_card_member_id_ocr_failure` | `400` | An insurance-card file could not be processed. Check its format and Base64 content, or provide structured insurance information, then retry. | | `unsupported_drug` | `400` | The prescription could not be resolved from the supplied NDC. Check the NDC or provide the name-based prescription format. Use your manual PA process if the drug remains unsupported. | | `other` | Varies | Read the error description. Use your manual PA process when needed and contact support if the correction is unclear. | Errors for [resubmissions, provider outreach, and optional workflows](/api-reference/prior-authorization/request-guide#optional-workflows) are documented with those features. See [sandbox testing](/guides/testing#environment-and-credentials) for `mock_result_not_allowed`, [common API errors](/api-reference/response-handling) for authentication and validation, and [rate limits](/api-reference/rate-limits) for quota and retry guidance. ## Other result codes When `data.status` is `completed` and `data.outcome.result` is `Other`, use `data.outcome.detail_code` and `data.outcome.detail` to decide what to do next. Several codes share the same action: | Code | Meaning and next step | | - | - | | `coverage_inactive` `coverage_not_yet_started` `no_pharmacy_benefits` | **Check insurance.** Coverage has expired, has not started, or does not include pharmacy benefits. Verify the patient's current pharmacy coverage before starting another PA. | | `payer_unable_to_locate_member` `payer_reported_invalid_patient_info` | **Check patient details.** The payer could not match the patient or reported mismatched information. Verify insurance details and patient demographics. | | `npi_taxonomy_ineligible` | **Check provider eligibility.** Resolve the prescriber's eligibility with the payer or use a provider with an accepted type, specialty, or credentials. | | `duplicate_request` | **Contact the plan.** The payer has already completed a PA for this patient and coverage and will not reprocess it. Call the plan to resolve the duplicate. | | `prior_auth_not_required` | **Continue without a PA.** No PA is needed for this medication. Check coverage and copay separately. | | `patient_consent_required` | **Resolve patient consent.** Consent requirements prevented communication or processing with the insurer. Resolve consent with the plan before proceeding. | | `more_information_required` | **Add clinical information.** Read the outcome detail, add the requested information or documentation, and [resubmit the PA](/api-reference/prior-authorization/request-guide#optional-workflows). | | `other` | **Review manually.** Read the outcome detail and use your manual review process. Contact support with the PA ID if the next step is unclear. | ## Stopped before submission For `data.status: "not_submitted"` with `data.outcome.detail_code: "more_information_required"`, read the outcome detail and collect the missing information. Then create a **new linked request** through the [resubmission path](/api-reference/prior-authorization/request-guide#optional-workflows). Optional [BV and formulary workflows](/api-reference/prior-authorization/request-guide#optional-workflows) can also stop a PA before submission. Their outcome codes are documented with those features. ## Retrieve errors [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item) returns `404` when the PA does not exist or is not visible to the authenticated organization. ## Unknown values Treat code lists as extensible. Preserve unknown codes in logs and route unrecognized terminal outcomes to manual review, using the outcome detail for context. An unfamiliar code alone does not mean an ongoing PA has stopped. # Prior authorization webhooks Source: https://docs.develophealth.ai/api-reference/prior-authorization/webhooks Understand when prior authorization webhooks are sent. Prior authorization webhooks notify your system about PA status or outcome updates, coverage assessments, provider outreach, and platform messages. See [Webhooks](/api-reference/webhooks) to configure an endpoint and understand the shared delivery envelope, signature verification, retries, and processing guidance. ## Webhook events | Event type | When it is sent | Payload | | - | - | - | | `prior_authorization.status_change` | A PA is created, its public status changes, or certain outcome information is updated. | [Prior authorization](/api-reference/prior-authorization/get_item) | | `prior_authorization.coverage_assessment` | A one-time coverage assessment becomes available for a PA. Opt-in per organization. | [Prior authorization](/api-reference/prior-authorization/get_item) | | `prior_authorization.provider_outreach_change` | A provider outreach attempt is created or changes state, or its outreach sequence reaches a terminal state. This event is in beta; contact support to enable it. | [Provider outreach](/api-reference/provider-outreach-webhooks) | | `prior_authorization.message` | A message is added to the PA's message thread. | [Prior authorization](/api-reference/prior-authorization/get_item) | Subscribe your webhook endpoint to the events your integration uses. Provider outreach events require the beta feature to be enabled. ## `prior_authorization.status_change` This event is sent when a PA is first created, when its public status changes, and for certain outcome updates. It does not represent every workflow step. Always inspect the current `data.status` and `data.outcome` instead of inferring a specific action from the event alone. See [PA statuses, outcomes, and errors](/api-reference/prior-authorization/response-handling) for lifecycle states, outcomes, and recommended handling. The webhook's `data` object uses the [GET /prior-authorization/](/api-reference/prior-authorization/get_item) response schema. Use that endpoint to retrieve the latest complete PA. ## `prior_authorization.coverage_assessment` This opt-in event is sent once when `data.coverage_assessment` becomes available for a PA. Contact Develop Health to enable coverage assessments for your organization. The `data` object uses the PA response schema. The assessment stays fixed after publication. Continue using `prior_authorization.status_change`, `data.status`, and `data.outcome` to track the PA's progress and result. Assessment and status webhooks are delivered independently and can arrive in either order. ## `prior_authorization.provider_outreach_change` This beta event is sent when a provider outreach attempt is created or changes state, or when its outreach sequence reaches a terminal state. It uses a dedicated provider-outreach payload rather than the PA resource payload. See [Provider outreach webhooks](/api-reference/provider-outreach-webhooks) for the payload contract, attempt and sequence states, retries, parallel channels, and transmitted content. ## `prior_authorization.message` This event is sent whenever a message is added to the PA's platform message thread. Inspect `data.message_thread` for the current thread and its messages. The `data` field contains the PA resource, not only the new message. # Provider outreach events Source: https://docs.develophealth.ai/api-reference/provider-outreach-webhooks Receive the content and lifecycle of communications sent to providers. > [!NOTE] > > **Beta:** Contact support to enable provider outreach webhooks. Breaking > changes may occur during the beta period. Provider outreach webhooks are only emitted for prior authorization requests. Provider outreach is activated when Develop Health contacts the prescribing provider to request information or action, or to communicate an outcome. The `prior_authorization.provider_outreach_change` event is emitted when a provider outreach attempt is created or changes state, or when the outreach sequence reaches a terminal state. Each event is a complete snapshot of one communication attempt, including its current state and, after the communication is rendered, the exact message content and files sent to the provider. ## Webhook body ```jsonc theme={null} { "event_id": "wh_evt_pQrStUv", "occurred_at": "2026-07-29T18:12:04Z", "title": "Prior Authorization Provider Outreach Updated", "description": "A provider outreach attempt or sequence changed state.", "event_type": "prior_authorization.provider_outreach_change", "data": { "id": "prov_outreach_aBcDeFg", "object": "provider_outreach", "outreach_sequence_id": "prov_outreach_seq_rStUvWx", "prior_authorization_id": "pa_req_hIjKlMn", "attempt_number": 1, "purpose": "document_request", "communication_method": "fax", "status": "sent", "sequence_status": "active", "provider": { "first_name": "Avery", "last_name": "Chen", "npi": "1234567890" }, "transmission": { "subject": "Prior authorization information requested", "body": "Please review the attached request and respond using the instructions provided.", "body_content_type": "text/plain", "attachments": [ { "id": "provider_outreach_attachment_xYz123", "file_name": "provider_outreach_aBcDeFg.pdf", "content_type": "application/pdf", "sha256": "ddb53b2d5bb9f21df813d4144f65b13f8d4f72d77c47b37701ba5d9344e335cf", "url": "https://files.develophealth.ai/signed/example" } ] }, "sent_at": "2026-07-29T18:12:04Z", "delivered_at": null, "opened_at": null, "processing_started_at": null, "completed_at": null, "outreach_window_ends_at": "2026-08-04T18:12:01Z", "expires_at": "2026-08-05T18:12:04Z", "created_at": "2026-07-29T18:12:01Z", "updated_at": "2026-07-29T18:12:04Z" } } ``` ### Envelope fields | Field | Type | Description | | - | - | - | | `event_id` | string | Stable ID for the event. Use it to deduplicate delivery retries. | | `occurred_at` | string | When the attempt or sequence state changed, not when the webhook was delivered. | | `title` | string | Human-readable event title. Do not use this field for program logic. | | `description` | string | Human-readable event description. Do not use this field for program logic. | | `event_type` | string | Always `prior_authorization.provider_outreach_change`. | | `data` | object | Complete snapshot of the provider outreach. | ### Data fields | Field | Type | Description | | - | - | - | | `id` | string | Stable ID for this channel attempt. A retry or parallel send through another channel has a different ID. | | `object` | string | Always `provider_outreach`. | | `outreach_sequence_id` | string | Stable ID shared by all channel attempts and retries for the same provider outreach sequence. | | `prior_authorization_id` | string | ID of the related prior authorization. | | `attempt_number` | integer | One-based retry round within the sequence. Attempts sent through multiple channels in parallel can have the same number. | | `purpose` | string | Why the provider was contacted: `document_request` or `outcome_notification`. | | `communication_method` | string | Delivery channel: `email`, `sms`, `fax`, or `dsm`. | | `status` | string | Current state of this channel attempt. See [Attempt states](#attempt-states). | | `sequence_status` | string | Current state across all attempts in the outreach sequence. See [Sequence states](#sequence-states). | | `provider` | object | Provider identity associated with the outreach. | | `provider.first_name` | string or null | Provider's first name. | | `provider.last_name` | string or null | Provider's last name. | | `provider.npi` | string or null | Provider's National Provider Identifier. | | `transmission` | object or null | Rendered content sent to the provider. This may be `null` while the outreach is `pending` or when rendering failed. | | `sent_at` | string or null | When the communication was handed to the delivery channel. | | `delivered_at` | string or null | When delivery was confirmed, if the channel supports confirmation. | | `opened_at` | string or null | When the provider first opened the secure outreach link. | | `processing_started_at` | string or null | When the provider began the requested response workflow. | | `completed_at` | string or null | When the provider completed the requested action. | | `outreach_window_ends_at` | string or null | Configured deadline after which no new attempts will be scheduled for this sequence. | | `expires_at` | string or null | When secure access for this channel attempt expires. This is independent of `outreach_window_ends_at`. | | `created_at` | string | When this outreach attempt was created. | | `updated_at` | string | When this snapshot last changed. | ### Transmission fields The `transmission` object shows what was sent, not a template name or template variables. Once an attempt reaches `sent`, the rendered transmission is immutable for that attempt ID. | Field | Type | Description | | - | - | - | | `subject` | string or null | Rendered subject or fax cover-page description. `null` for SMS. | | `body` | string or null | Rendered message body. For a fax, the exact rendered document is provided in `attachments`. | | `body_content_type` | string or null | MIME type of `body`, such as `text/plain` or `text/html`. | | `attachments` | array | Files delivered with the outreach. An empty array means no files were attached. | | `attachments[].id` | string | Stable ID for the transmitted file. | | `attachments[].file_name` | string | Filename shown to the recipient. | | `attachments[].content_type` | string | MIME type of the file. | | `attachments[].sha256` | string | Lowercase SHA-256 digest of the transmitted file. Verify downloaded bytes against this value. | | `attachments[].url` | string | Short-lived signed download URL for the exact transmitted file. | Transmission content varies by channel: | Channel | Transmission content | | - | - | | `email` | Rendered subject and body, plus any email attachments. | | `sms` | Rendered text body; `subject` is `null` and `attachments` is empty. | | `fax` | Cover-page description and the exact fax PDF in `attachments`. | | `dsm` | Rendered Direct message subject and body, plus its MIME attachments. | > [!NOTE] > > Attachment URLs expire quickly. Download required files when you receive the > webhook instead of storing the URL. Provider outreach can contain protected > health information and secure access credentials, so protect webhook payloads > and downloaded files accordingly. ## Attempts, retries, and parallel channels Each payload describes one communication attempt through one channel. When Direct Secure Messaging and fax are sent in parallel, for example, each has its own `id`, `communication_method`, status, and transmission. Both attempts share an `outreach_sequence_id` and can have the same `attempt_number`. A retry has a new attempt `id` and an incremented `attempt_number`. The outreach window is configurable for each workflow; do not assume a fixed number of days or attempts. Use `outreach_window_ends_at` to determine when Develop Health will stop scheduling new attempts. When the sequence reaches `completed` or `failed`, Develop Health emits another `prior_authorization.provider_outreach_change` event for its most recent attempt. That event has a new `event_id` and the updated `sequence_status`; the attempt's rendered transmission remains unchanged. ## Attempt states | State | Meaning | | - | - | | `pending` | The outreach attempt exists but has not been handed to a delivery channel. The transmission may not be rendered yet. | | `sent` | The delivery channel accepted the communication. The complete rendered transmission is included. | | `delivered` | The delivery channel confirmed delivery. Not every channel reports this state. | | `opened` | The provider opened the secure outreach link for the first time. | | `processing` | The provider began the requested response workflow, such as uploading documents or answering PA questions. | | `completed` | The provider completed the requested action. | | `expired` | Secure access for this attempt expired or the attempt was cancelled before completion. | | `failed` | This communication attempt could not be rendered, sent, or processed. Other attempts in the sequence may still proceed. | An attempt does not necessarily pass through every state. For example, a fax may move from `sent` directly to `completed`, because delivery and open signals are not available for every channel. Treat `completed`, `expired`, and `failed` as terminal for one attempt ID. A later retry or escalation is represented by a new attempt ID. ## Sequence states | State | Meaning | | - | - | | `active` | At least one attempt is in progress, or more attempts may be scheduled. | | `completed` | The sequence reached its success condition, such as the provider completing the requested action. | | `failed` | The configured outreach window ended or all available channels were exhausted without completing the sequence. | Attempt and sequence states are independent. For example, a fax can be `delivered` while its sequence eventually becomes `failed` because the provider did not complete the requested action. ## Processing events Webhook deliveries may be duplicated. Deduplicate delivery retries by `event_id`, and ignore state values your integration does not recognize. Return a 2xx response as soon as the event is durably accepted. Download any required attachments promptly, verify each file against its `sha256` value, then process the event asynchronously. # Quickstart Source: https://docs.develophealth.ai/api-reference/quickstart Create a sandbox benefit verification and read its simulated coverage result. This walkthrough uses synthetic patient data and a sandbox-only `mock_result`. You will create a benefit verification, retrieve it by ID, and interpret the result. You need a terminal with `curl` and access to a sandbox organization. ## 1. Get a sandbox token Ask your Develop Health contact for a [sandbox organization](/guides/testing#environment-and-credentials), then [create an API token](/api-reference/authentication) for that organization. Set `DEVELOP_HEALTH_SANDBOX_TOKEN` to the token in your terminal environment. Keep it on your server and out of source control. > [!WARNING] > > Use the sandbox organization's token. Sandbox and production use the same > base URL; the token determines the organization. Production requests reject > `mock_result`. ## 2. Create a benefit verification Save the following as `bv-request.json`. The NPI is illustrative; use your configured sandbox test provider if your workflow requires one. ```json theme={null} { "patient": { "internal_id": "sandbox-patient-001", "first_name": "Jamie", "last_name": "Example", "date_of_birth": "1990-01-15", "gender": "female", "address": { "street": "123 Example Street", "city": "San Francisco", "state_province": "CA", "zip_postal_code": "94107" } }, "provider": { "first_name": "Alex", "last_name": "Example", "npi": "1234567893", "address": { "street": "456 Example Avenue", "city": "San Francisco", "state_province": "CA", "zip_postal_code": "94107" } }, "insurance_content": { "member_number": "SANDBOX001", "rx_bin": "012345", "rx_pcn": "TESTPCN", "rx_group": "TESTGROUP", "payer_name": "Example Health Plan", "plan_name": "Example Pharmacy Plan" }, "drugs": [ { "ndc": "00169450514", "quantity": 4 } ], "preferred_processing_mode": "standard", "mock_result": { "status": "completed", "case": "drugs_covered__prior_auth_not_required__has_copay" } } ``` Submit the request: ```bash theme={null} curl https://api.develophealth.ai/benefit-verification \ -H "Authorization: Bearer $DEVELOP_HEALTH_SANDBOX_TOKEN" \ -H "Content-Type: application/json" \ --data-binary @bv-request.json ``` On success, copy the returned `data.id`. A successful response means the request was accepted. The verification result is retrieved separately. If the request is rejected, check the [response format and errors](/api-reference/response-handling) and the [BV error codes](/api-reference/medication-benefit-check/response-handling#request-errors). ## 3. Retrieve the result Set `BV_ID` to the `data.id` from the create response, then run: ```bash theme={null} curl "https://api.develophealth.ai/benefit-verification/$BV_ID" \ -H "Authorization: Bearer $DEVELOP_HEALTH_SANDBOX_TOKEN" ``` Read `data.status`. If it is `pending`, wait a few seconds and retrieve the same ID again. When it is `completed`, read `data.patient_coverage_status` and each item in `data.drugs`. For this mock scenario, each requested drug is covered, does not require prior authorization, and has a copay. Inspect these fields in each drug result: | Field | What to read | | - | - | | `coverage` | Whether the medication is covered | | `prior_authorization_required` | Whether a PA is needed | | `copay` / `copay_options` | The returned cost information, when available | These are simulated benefits for integration testing. Do not use them to make decisions about a real patient's coverage. If the status is `failed`, inspect `data.error`; if it is `cancelled`, no coverage result is expected. See [statuses and error codes](/api-reference/medication-benefit-check/response-handling) for the complete lifecycle and result handling. ## Next steps * [Create a benefit verification](/api-reference/medication-benefit-check/request-guide) with your own request shape. * [Receive and verify webhooks](/api-reference/webhooks) to process results without repeated GET requests. * [Test in the sandbox](/guides/testing) with other coverage and failure scenarios. * [Create a prior authorization](/api-reference/prior-authorization/request-guide) to try a prior authorization workflow. # Rate limits Source: https://docs.develophealth.ai/api-reference/rate-limits Understand how Develop Health API limits are scoped, measured, and communicated. Develop Health applies rate limits per organization. All credentials for the same organization share the organization's allowances. Limits protect API availability and keep accepted prior authorization and benefit verification work within recoverable processing capacity. The limits assigned to your organization may vary based on your integration and contracted workload. ## Applicable policies Limits are applied as follows: | Policy | Applies to | Quota measurement | | - | - | - | | `read-endpoint-minute` | Each GET endpoint, counted independently | Requests per minute | | `write-endpoint-minute` | Each POST, PATCH, and DELETE endpoint, counted independently | Requests per minute | | `rtbv-drug-minute` | Benefit verification creation with `preferred_processing_mode` set to `realtime` or `realtime_only` | One quota unit per submitted drug, measured per minute | | `bv-drug-24h` | Benefit verification creation in any processing mode | One quota unit per submitted drug, measured per 24-hour window | | `pa-create-24h` | Prior authorization creation | Prior authorizations per 24-hour window | Each request counts toward every applicable policy. A request is accepted only when it fits within all applicable limits, so the most restrictive current limit governs. Endpoint policies are partitioned by HTTP method and normalized route. For example, requests to `GET /prior-authorization/{id}` share one organization-level allowance regardless of the prior authorization ID. Traffic to another GET endpoint uses a different allowance. Cancellation and other control operations use their endpoint policy. They do not consume benefit verification drug or prior authorization creation quotas. ## Requests containing multiple drugs Every benefit verification drug policy uses the same quota unit: one submitted drug equals one quota unit. This applies to both `rtbv-drug-minute` and `bv-drug-24h`. A request containing three drugs requires three available quota units in every applicable benefit verification drug policy. Develop Health accepts or rejects the complete request. A rate-limited request does not create a partial set of benefit verifications or consume drug quota. ## Response headers API responses include the policies applicable to the request and their current availability. | Header | Description | | - | - | | `RateLimit-Policy` | The applicable policy limits and windows | | `RateLimit` | The remaining quota and effective window for each reported policy | | `Retry-After` | The minimum number of seconds to wait before retrying a rejected request | The fields use these parameters: | Parameter | Meaning | | - | - | | `q` | Quota allocated by the policy | | `w` | Policy window in seconds | | `r` | Quota units currently remaining | | `t` | Effective window in seconds | | `dh-unit` | Develop Health quota unit, such as `drug` | This example shows the headers for a benefit verification request with `preferred_processing_mode: "realtime"`. The quota values are illustrative: ```http theme={null} RateLimit-Policy: "write-endpoint-minute";q=30;w=60, "rtbv-drug-minute";q=20;w=60;dh-unit="drug", "bv-drug-24h";q=1000;w=86400;dh-unit="drug" RateLimit: "write-endpoint-minute";r=18;t=42, "rtbv-drug-minute";r=12;t=42, "bv-drug-24h";r=780;t=72000 ``` ## Rate-limit responses When a request exceeds any applicable policy, the API returns `429 Too Many Requests`. The response includes `Retry-After`, expressed in seconds, and identifies the policies currently preventing the request from being accepted. ```http theme={null} HTTP/1.1 429 Too Many Requests Retry-After: 42 RateLimit-Policy: "rtbv-drug-minute";q=20;w=60;dh-unit="drug" RateLimit: "rtbv-drug-minute";r=0;t=42 ``` Wait for at least the duration specified by `Retry-After` before retrying. When both `Retry-After` and a `RateLimit` effective window are present, follow `Retry-After`. Add a small amount of random jitter when scheduling concurrent retries. A request rejected with `429` does not create partial work. Retrying the complete request after the indicated delay is safe. # Response format and errors Source: https://docs.develophealth.ai/api-reference/response-handling How to interpret HTTP errors, response envelopes, and asynchronous workflow states. Develop Health APIs report whether a request was accepted separately from what happens in the workflow it creates. Integrations should answer these questions in order: 1. Did the API accept the request? 2. If it did, what is the current workflow state? 3. If the workflow stopped, which code explains what the caller should do next? Read each response at the appropriate layer: | Layer | Field | Meaning | | - | - | - | | HTTP | HTTP status code | Whether the API accepted and handled this HTTP request. | | Envelope | Top-level `status` | Whether this API response is a `success` or `error`. | | Workflow | `data.status` | The current state of an asynchronous resource, such as a benefit verification or prior authorization. | | Result | Product-specific fields in `data` | The final coverage, outcome, or failure details. | An envelope `status` of `success` means the HTTP request succeeded. It does not mean an asynchronous workflow has completed. ## Which signal to handle | Situation | Source of truth | What to do | | - | - | - | | A create request is rejected | HTTP status and top-level `error.code` | No newly accepted workflow ID was returned. Correct the request, use an existing workflow identified by the error, retry, or fall back. | | A create request is accepted | `data.id` | Store the resource ID and monitor it through webhooks or a [GET request](#monitoring-asynchronous-workflows). | | A workflow is in progress | `data.status` | Continue waiting. Do not infer completion from a placeholder result field. | | A workflow stops | Product-specific result and error fields | Use the product's status and error reference to interpret the outcome and choose the next action. | `Approved`, `Denied`, and benefit coverage results are business outcomes, not API or workflow errors. ## API errors A rejected create request does not return a newly accepted workflow ID. Do not start monitoring a new resource unless the error identifies an existing workflow to use. The product references list public codes and recommended caller actions. ### Error response formats Business errors generally use a structured envelope: ```json theme={null} { "status": "error", "error": { "title": "Unsupported Drug", "code": "unsupported_drug", "description": "The drug you submitted is not yet supported." }, "data": null } ``` Branch on `error.code`, not the human-readable `title` or `description`. Treat unknown future codes as recoverable unknown values and preserve them in logs. Request parsing, validation, and some not-found errors use a standard `detail` response instead. Validation responses contain a `detail` array whose `loc` field identifies the invalid request field. | HTTP status | Meaning | | - | - | | `401` | The JWT is missing, invalid, expired, or does not identify a valid organization. | | `422` | The path parameters or request body failed schema validation. | Endpoint pages list their additional error codes and status codes. ## Workflow errors and exceptional outcomes Workflow errors happen after a create request was accepted. Read the resource's state and result from `data` in its GET response or webhook. Each product defines its own states, outcomes, and error fields: * [Benefit verification statuses and errors](/api-reference/medication-benefit-check/response-handling) * [Prior authorization statuses, outcomes, and errors](/api-reference/prior-authorization/response-handling) Treat code enums as extensible: preserve unknown values in logs and use the product's fallback handling instead of failing to parse the response. A business outcome such as a denial is different from a failure to process the workflow. ## Monitoring asynchronous workflows After creating a benefit verification or prior authorization, poll [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) or [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item), or subscribe to the relevant [webhook](/api-reference/webhooks). Track `data.status` until it is terminal. Use this status to determine progress, even when a nested result field contains a placeholder such as `Pending`. For BV and PA status webhooks, `data` uses the same schema as `data` in the GET responses above. Provider outreach events use a dedicated payload; see [Provider outreach webhooks](/api-reference/provider-outreach-webhooks). Process notifications idempotently because a delivery can be retried. Call the same GET endpoint again when you need to confirm the current BV or PA status. A PA webhook can describe an intermediate state or a nested update; it does not necessarily mean the PA is terminal. # Receive and verify webhooks Source: https://docs.develophealth.ai/api-reference/webhooks Configure, receive, and verify webhook deliveries. Webhooks notify your system when a Develop Health resource changes. The `event_type` identifies why the webhook was sent, and `data` contains the resource's current state. Use the resource-specific guides to see when each event is sent: * [Benefit verification webhooks](/api-reference/medication-benefit-check/webhooks) * [Prior authorization webhooks](/api-reference/prior-authorization/webhooks) Webhook delivery occurs only when your endpoint is enabled and subscribed to the relevant event type. ## Set up a webhook In the application sidebar, open **Settings**, then select **Webhooks**. ![Webhooks section under Settings](https://mintcdn.com/develophealthapidocs/ZRK06bgEiIWZD9-V/images/settings_webhooks_empty.jpg?fit=max\&auto=format\&n=ZRK06bgEiIWZD9-V\&q=85\&s=9c6dc08244ab7824d5b33315dc7ada80) Select **Create webhook**, then provide: * **Name:** A name that identifies the webhook. * **URL:** The endpoint that receives notifications. * **Secret key (recommended):** An optional confidential value used to sign deliveries. Deliveries are unsigned when a secret is not configured. * **Enabled:** Leave this on to begin receiving notifications as soon as the webhook is created. Turn it off to save the configuration without sending notifications. * **Event categories:** Select **Benefit verification**, **Prior authorization**, or both. ![Create webhook form](https://mintcdn.com/develophealthapidocs/ZRK06bgEiIWZD9-V/images/settings_webhooks_create.jpg?fit=max\&auto=format\&n=ZRK06bgEiIWZD9-V\&q=85\&s=7a0ff7e17bcd9f1f86627068f2f1d170) Select **Create**. You can enable or disable the webhook later from the **Webhooks** settings section. Activation can take a moment. ### OAuth (optional) Webhooks support OAuth 2.0 client credentials. In the webhook's create or edit form: 1. Turn on **Use OAuth**. 2. Enter your **Token URL**, **Client ID**, and **Client secret**. 3. Set **Token timeout (minutes)** to your token lifetime (default: **60**). 4. Enter an **API key** only if your receiving endpoint requires one. 5. Select **Create** or **Update** to save. Use public HTTPS URLs for both endpoints. The token endpoint must accept `client_credentials` with HTTP Basic client authentication. ## Receive webhook notifications Develop Health sends an HTTP POST request to your configured URL when a subscribed event occurs. Resource events use this envelope: ```jsonc theme={null} { "title": "Prior Authorization Updated", "description": "A Prior Authorization submission status or outcome has changed.", "event_type": "prior_authorization.status_change", "data": { "id": "pa_req_aBcDeFg", "object": "prior_authorization", "status": "awaiting_outcome" // ... See GET /prior-authorization/{id} for the complete schema } } ``` The webhook's `data` object uses the same schema as `data` in the response from [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item) or [`GET /prior-authorization/{id}`](/api-reference/prior-authorization/get_item). The webhook does not include the GET response's outer envelope. Read `data.status` and the error or outcome fields as you would in that GET response. The `event_type` identifies why the webhook was sent. It does not replace the resource state or imply that the resource is terminal. Prior authorization webhook delivery may omit the large `evidence`, `visit_notes`, and `questionnaires` fields. Call `GET /prior-authorization/{id}` when you need the complete PA. Call the relevant GET endpoint above with `data.id` to check the latest BV or PA status after a webhook arrives. > [!NOTE] > > Provider outreach events use a dedicated envelope with `event_id`, > `occurred_at`, and a provider outreach object in `data`. See [Provider > outreach webhooks](/api-reference/provider-outreach-webhooks) for the full > contract. Return a 2xx status code after durably accepting a notification. Develop Health may retry a delivery after a non-2xx response. ## Verify webhook signatures When a webhook secret is configured, each POST request contains an `X-Webhook-Secret` header with a JWT signed by that secret. Verify the JWT before processing the payload. Deliveries do not include this header when no secret is configured. Install PyJWT: ```bash theme={null} pip install PyJWT ``` Verify the signature using the HS256 algorithm: ```python theme={null} import jwt def is_jwt_valid(token: str, secret: str) -> bool: try: jwt.decode(token, secret, algorithms=["HS256"]) return True except jwt.InvalidTokenError: return False webhook_secret = "" secret_key = "" is_jwt_valid(webhook_secret, secret_key) ``` For a receiver configured to verify signed deliveries, reject the request if the `X-Webhook-Secret` header is missing or signature verification fails. Do this before accepting the event or changing application state. ## Best practices * Keep the receiving endpoint highly available. * Return a 2xx response as soon as the event is durably accepted, then process it asynchronously. * Handle deliveries idempotently because retries can produce duplicates. * Tolerate new status, outcome, activity, and error values. * Log deliveries and monitor processing failures. * Use the corresponding GET endpoint when you need the latest complete resource. # Test in the sandbox Source: https://docs.develophealth.ai/guides/testing Set up sandbox access and test BV and PA outcomes with mock_result. Use a sandbox organization to test API requests and result handling. Ask your Develop Health contact or [support](mailto:support@develophealth.ai) to provision sandbox access and confirm which organization your credentials belong to. ## Environment and credentials Sandbox and production organizations use the same API base URL: ```text theme={null} https://api.develophealth.ai ``` Use an [API token](/api-reference/authentication) for the intended organization and configure its webhook destination with a signing secret. Keep sandbox and production credentials and webhook destinations separate in your application's configuration. A successful call to `/status` checks connectivity; confirm the token's organization separately. Use `mock_result` in your sandbox organization. It is not supported in production. For PA requests, `mock_result_not_allowed` means the request used production credentials. Remove `mock_result` or use your sandbox credentials. ## Start with a complete request The [BV request guide](/api-reference/medication-benefit-check/request-guide#example-sandbox-request) contains a complete synthetic BV request. The [PA request guide](/api-reference/prior-authorization/request-guide#example-sandbox-request) contains a complete synthetic PA request. Keep `mock_result` in those requests when testing simulated outcomes. Mock requests must pass validation, including required fields and valid enum values. When using an NDC, use a supported code. If a mock request is rejected, inspect its HTTP status and error before waiting for a webhook. ## Simulate benefit verification outcomes Add a `mock_result` object to a BV create request. Its case applies to every drug in that request. | Scenario | `mock_result.status` | `mock_result.case` | | - | - | - | | Covered, PA required, copay available | `completed` | `drugs_covered__prior_auth_required__has_copay` | | Covered, PA required, no copay returned | `completed` | `drugs_covered__prior_auth_required__no_copay` | | Covered, no PA required, copay available | `completed` | `drugs_covered__prior_auth_not_required__has_copay` | | Covered, no PA required, no copay returned | `completed` | `drugs_covered__prior_auth_not_required__no_copay` | | Not covered | `completed` | `drugs_not_covered__prior_auth_na__no_copay` | | Patient consent required | `failed` | `patient_consent_required` | For example, replace the BV example's `mock_result` with: ```json theme={null} { "status": "failed", "case": "patient_consent_required" } ``` BV mocks send a `benefit_verification.status_change` webhook with the simulated result to your configured endpoint. You can also retrieve the result with [`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item). Use an explicit mock result to test a specific terminal outcome. Unmocked sandbox BVs do not exercise the full production verification process. See the [create reference](/api-reference/medication-benefit-check/post) for all available cases, including reverification scenarios. ## Simulate prior authorization outcomes PA mocks use a different shape from BV mocks. Add one of these objects as the PA request's `mock_result`: ```json theme={null} { "result": "Approved", "detail_code": "approval" } ``` | Scenario | `result` | Example `detail_code` | Expected resource status | | - | - | - | - | | Approved | `Approved` | `approval` | `completed` | | Denied | `Denied` | `plan_exclusion` | `completed` | | Stopped before submission | `Not Submitted` | `more_information_required` | `not_submitted` | | Other terminal outcome | `Other` | `payer_unable_to_locate_member` | `completed` | PA mocks send a `prior_authorization.status_change` webhook with the selected outcome to your configured endpoint. They skip the manual review step. To test PA review, send a sandbox PA request without `mock_result`. Once it reaches `awaiting_review`, open its `data.url` to review and submit it in Develop Health. See the [PA create reference](/api-reference/prior-authorization/post) for the complete mock schemas and permitted detail codes. # Introduction Source: https://docs.develophealth.ai/introduction Integrate benefit verification and prior authorization with the Develop Health API. Check medication coverage, prepare prior authorizations, and track their results from your application. ## Understand the products * [Benefit verification overview](/api-reference/medication-benefit-check/overview): medication coverage, prior authorization requirements, and copay results. * [Prior authorization overview](/api-reference/prior-authorization/overview): preparation, review, submission, and payer outcomes. ## Integrate > [card] [Make your first request](/api-reference/quickstart) > > Create a benefit verification in the sandbox, retrieve it, and read a simulated > coverage result. > [card] [Create a benefit verification](/api-reference/medication-benefit-check/request-guide) > > Submit patient, insurance, and medication inputs, then retrieve coverage > results. > [card] [Create a prior authorization](/api-reference/prior-authorization/request-guide) > > Submit a request with clinical evidence and track its progress through review > and submission. Use **Guides** to build and test a workflow. Use the [**Reference**](/api-reference/response-handling) for endpoints, status and error codes, and webhook event payloads. All API requests use `https://api.develophealth.ai` with a [bearer token](/api-reference/authentication). Sandbox access uses a separate organization and token on the same base URL. Need help? Email [support@develophealth.ai](mailto:support@develophealth.ai).