Overview
Nirvana API Overview
Our goal is to take the complexity out of insurance verification, so your team can focus on care, not coverage.
Nirvana’s API lets you verify a patient’s insurance eligibility, estimate their financial responsibility for any appointment, identify plan-level details that could lead to a denial, and recover active insurance using only basic demographic information. 🧠⚡
By normalizing complex payer data into structured, consistent JSON, Nirvana surfaces the details that matter most - to prevent denials before they happen, improve your patient conversion funnel, and confidently schedule more session knowing coverage & cost is handled by Nirvana
🔌 Endpoints
Endpoint | Description |
---|---|
POST /estimate | Real-time cost estimate & benefit details for a patient's session |
POST /discover | Find active coverage and plan-level details for a patient; knowing the patient's insurer |
POST /scan | Scan multiple payers to find any patient's active coverage |
POST /medicaid | Find active medicaid coverage & medicaid-level details for a patient |
All responses are payer-normalized and returned in clean JSON.
💡 Use Cases
- Show cost estimates at intake or appointment scheduling
- Auto-verify coverage before care is rendered
- Reduce claim denials with real-time benefit checks
- Support RCM and billing teams with complete payer data
🔐 Authentication
All requests must include your API key in the Authorization
header:
headers = {
'apikey': "yourapikey",
'Content-Type': 'application/json'
}
curl -X POST \
-H "apikey: yourapikey" \
-H "Content-Type: application/json" \
-d '{REQUEST PAYLOD}'
🔑 Creating an API Key
Get Started with Nirvana
🛠️ Using your API Key
- Contact Nirvana to set up an api key for you. The api key is required to make actual coverage calls.
- The api key should be passed in as a header as “apikey”.
- Sample curl request for your reference:
curl --location --request POST 'https://coverage-api.meetnirvana.com/v1/estimate' \
--header 'apikey: [APIKEY]' \
--header 'Content-Type: application/json' \
--data-raw '{
"payer_id": "60054",
"provider_npi": "1234567890",
"member_id": "MEMBERID",
"member_first_name": "",
"member_last_name": "",
"member_dob": "YYYY-MM-DD",
"provider_first_name": "",
"provider_last_name": "",
"provider_session_cost": "20000",
"in_network": true
}
import requests
url = "https://coverage-api.meetnirvana.com/v1/estimate"
headers = {
"apikey": "[APIKEY]",
"Content-Type": "application/json"
}
payload = {
"payer_id": "60054",
"provider_npi": "1234567890",
"member_id": "MEMBERID",
"member_first_name": "",
"member_last_name": "",
"member_dob": "YYYY-MM-DD",
"provider_first_name": "",
"provider_last_name": "",
"provider_session_cost": "20000",
"in_network": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
⚠️ Error Responses
If the Nirvana API can’t process a request, it will return an HTTP response code in the 4xx or 5xx range. The response body will include the following fields:
error
– A code indicating what went wrongmessage
– A easily-interpretable explanation of the issue
You can use the error
code to write robust error-handling logic, and refer to message
when troubleshooting or debugging.
In some cases, the response may also include an errors
array that lists multiple issues. When this happens, the error
and message
fields will still be included at the top level for convenience.
It’s possible to receive a response that contains both a result and an error, indicating a partial or best-effort response. You should check the presence of an error
field before assuming the result is fully valid.
🚫 403 Unauthorized
A 403 Forbidden
response usually means one of the following:
- Your API key is missing, expired, or incorrect
- You used an incorrect HTTP method (e.g.,
GET
to aPOST
endpoint) - Your IP address was blocked due to security filters or rate limiting
Nirvana uses layered security protections to help keep our systems safe. If you believe you're being blocked in error - contact [email protected] for review.
Please see below for a brief description of common errors responses. Errors are provided in the below response format:
Error:
code: “error category”
message: “cause of the error + next steps”
details:
validation failures:
suggested payer:
} ]
206: Partial Success – Some Values Unknown
Nirvana located the plan, but one or more values from the payer are unknown.
These responses include an unknown_fields
array.
❓ UNKNOWN_COSTSHARE
UNKNOWN_COSTSHARE
- “Unable to determine copayment or coinsurance”
- “Several values found for copayment or coinsurance”
❓ UNKNOWN_REMAININGS
UNKNOWN_REMAININGS
- “Unable to determine remaining deductible”
- “Unable to determine remaining OOP max”
- “Conflicting values found for deductible or OOP max”
❓ MISSING_FINANCIALS
MISSING_FINANCIALS
- “The payer failed to provide a valid response”
🚫 PLAN_TYPE_NOT_SUPPORTED
PLAN_TYPE_NOT_SUPPORTED
- “Nirvana does not currently support full benefit details for Medicare and Medicaid plans”
⚠️ CANNOT_CALCULATE_MEMBER_OBLIGATION
CANNOT_CALCULATE_MEMBER_OBLIGATION
- “Copayment cannot be greater than session rate”
💡 Recommended action: Check that the session cost in your request is accurate.
400: Bad Request
🚫 PAYER_NOT_SUPPORTED
PAYER_NOT_SUPPORTED
- “Payer doesn’t support programmatic coverage”
📎 Action: Refer to [Nirvana’s supported payer list]"https://calculator.meetnirvana.com/supported-insurers#C
🧩 PROVIDER_NOT_RECOGNIZED
PROVIDER_NOT_RECOGNIZED
- “Payer does not recognize the provider”
💡 Action: Use a group NPI if available, or try an alternate provider NPI. Contact payer if needed.
🔄 ERROR_RETRIEVING_COVERAGE
ERROR_RETRIEVING_COVERAGE
- “The Payer was unable to provide a response”
📨 Action: Retry or contact Nirvana support
🌀 UNKNOWN_PLAN_STATUS
UNKNOWN_PLAN_STATUS
- “Plan status is unknown”
📝 Context: Can occur due to carveouts or third-party administrators (TPAs)
404: Member Not Found
422: Unprocessable Entity
429: Too Many Requests
500: Unexpected Error
502: Payer Failure
504: Payer Timeout
🧰 Error + Alert Guidance for EHR Customers
API Status Code | Response Alerts | Response Error Code | Response Error Message | Alternative Display Message | Backend Implementation |
---|---|---|---|---|---|
200 | |||||
206 | UNKNOWN_ACCUMULATOR | “UNKNOWN_REMAININGS” | Unable to determine remaining deductible. | Show response.error.message | |
206 | UNKNOWN_ACCUMULATOR | “UNKNOWN_REMAININGS” | Unable to determine remaining oop max. | Show response.error.message | |
206 | UNKNOWN_ACCUMULATOR | “UNKNOWN_REMAININGS” | Remainings required to calculate member and payer obligations. | Show this message: “Unable to determine the deductible or the out-of-pocket max.” | |
206 | UNKNOWN_ACCUMULATOR | “UNKNOWN_REMAININGS” | Found conflicting values for {deductible or oop_maximum} and remaining_{deductible or oop_maximum} | Show this message: “Unable to determine the deductible or the out-of-pocket max.” | |
206 | UNKNOWN_COSTSHARE | “UNKNOWN_COSTSHARE” | Unable to determine copayment or coinsurance. | Show response.error.message | |
206 | UNKNOWN_COSTSHARE | “UNKNOWN_COSTSHARE” | Several values found for copayment or coinsurance. | Show response.error.message | |
206 | UNKNOWN_MEMBER_OBLIGATION | “CANNOT_CALCULATE_MEMBER_OBLIGATION” | Copayment cannot be greater than session rate. | Show this message: “The copayment is greater than the session rate. Check that the correct session rate was entered.” | |
200, 206 | EXPIRING_SOON | Show this message: “The policy is expiring soon.” | Surface response.plan_end_date to the user to show them when the policy will expire. | ||
200, 206 | THIRD_PARTY_PAYER_DETECTED | Show this message: “Third party payer detected.” | Surface response.third_party_payer and response.third_party_payer_type to the user. | ||
200, 206 | ADDITIONAL_POLICY_DETECTED | Show this message: “Coordination of benefits: Additional policy detected.” | Surface response.additional_policy to the end user (includes "insurer", “additional_policy_type”, "member_id", and “plan_type”). | ||
200 | POLICY_EXPIRED | Show this message: “This policy has expired.” | Surface response.eligibility_end_date to the user to show them when the policy expired. | ||
200, 206 | Show one of these messages: "Managed Medicaid plan type detected" or "Medicare Advantage plan type detected." | If response.plan_type is MANAGED_MEDICAID or MEDICARE_ADVANTAGE, surface response.plan_type to the user. | |||
502 | REVIEW_REQUIRED | "PAYER_FAILURE" | The payer is currently experiencing downtime. Please try again later and contact Nirvana if the error persists. | Show this message: “The payer is currently experiencing downtime. We will automatically re-try your request in one hour.” | Queue the request to be automatically retried in one hour. Most payer failures resolve within the hour, and at most by the next day. |
400 | REVIEW_REQUIRED | “UNKNOWN_PLAN_STATUS” | Plan status is unknown. | Show this message: “Unable to determine if the policy is active or covers mental health benefits at this time. Please contact the payer directly.” | |
400 | REVIEW_REQUIRED | "PAYER_NOT_SUPPORTED" | Nirvana does not support coverage requests for this payer. | Show this message: “Real time coverage checks are unavailable for this payer.” | |
400 | REVIEW_REQUIRED | "PROVIDER_NOT_RECOGNIZED" | The payer does not recognize the provider NPI. Please contact the payer to resolve. | Show this message: “The payer does not recognize the provider NPI. This may be a credentialing issue. Please try another NPI, or contact the payer to resolve.” | Prompt the user to automatically retry the request with their group practice NPI or with the individual NPI of the assigned clinician. Alternatively, you could automatically re-try these requests first, and only display the error message if the same error persists after a second attempt. |
400 | REVIEW_REQUIRED | "ERROR_RETRIEVING_COVERAGE" | Nirvana is unable to retrieve coverage information for this plan. Please confirm that the payer and member information are correct and resubmit. | Show this message: “We’re unable to retrieve coverage information for this plan. Please confirm that the payer and member information are correct.” | |
404 | REVIEW_REQUIRED | "MEMBER_NOT_FOUND" | The payer does not recognize the member. Please confirm that the payer and member information are correct and resubmit. | Show this message: “The payer does not recognize the member. Please confirm that the payer and member information are correct.” | If the error.details includes a suggested_payer, prompt the user to retry the request with the suggested payer ID. |
422 | REVIEW_REQUIRED | "INVALID_INPUT" | Invalid/Missing Patient Name | Show this message: “Missing information. Please check to make sure all data was input correctly.” | Make the required request parameters required for users to input in the interface; prompt the user to correct their entry when needed. |
500 | REVIEW_REQUIRED | "UNEXPECTED_ERROR" | Nirvana is unable to retrieve coverage information at this time. Please try again and contact Nirvana if the error persists. | Show this message: “Unable to retrieve coverage information at this time.” | Contact Nirvana if the error persists. |
429 | REVIEW_REQUIRED | "TOO_MANY_REQUESTS" | Nirvana is experiencing a high volume of requests. Please try again later. | Show this message: “We are experiencing a high volume of requests. Please try again later.” | Limit the amount of simultaneous requests that can be made per minute per API key (50 requests/min). |
200, 206 | DEMOGRAPHICS_MISMATCH | Show this message: "We detected different demographic details. Please confirm with the patient and update." | Display the "response.demographics" to the user for their review. |
Updated 14 days ago