> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.usebridge.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.usebridge.com/_mcp/server.

# Create ProviderEligibility

POST https://app.usebridge.com/api/provider-eligibility
Content-Type: application/json

Reference: https://docs.usebridge.com/api/api-reference/provider-eligibility/create-provider-eligibility

## Authentication

- `X-API-Key` header (required) — API Key authentication via header

## Servers

- `https://app.usebridge.com` (Production, default)
- `https://app.usebridge.xyz` (Sandbox)

## Request

### Body (application/json)

This endpoint expects a ProviderEligibilityCreateV1Request.

- `dateOfService` (datetime, required) — Full ISO8601 timestamp, including timezone
- `serviceTypeId` (string, required)
- `location` (ProviderEligibilityCreateV1RequestLocation, required)
- `payerId` (string, required)

## Response

### 200

- `id` (string, required)
- `validatedAt` (datetime, required) — Timestamp this was executed
- `dateOfService` (datetime, required)
- `serviceTypeId` (string, required)
- `location` (ProviderEligibilityCreateV1ResponseLocation, required)
- `payerId` (string, required)
- `status` (enum, required) — The eligibility status of this check. Note, the patient may be eligible on a location/payer-basis, but providers are not available. Use a combination of this _and_ the `providers` array to determine next steps.
  - Allowed values: `ELIGIBLE`, `INELIGIBLE`
- `providers` (list of ProviderEligibilityCreateV1ResponseProvider, required)

## Types

### ProviderEligibilityCreateV1RequestLocation

- `state` (enum, required) — 2 letter US state code
  - Allowed values: `AL`, `AK`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DE`, `DC`, `FL`, `GA`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MI`, `MN`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`
- `line1` (string, optional)
- `line2` (string, optional)
- `city` (string, optional)
- `postalCode` (string, optional)
- `country` (enum, optional)
  - Allowed values: `US`

### ProviderEligibilityCreateV1ResponseLocation

- `state` (enum, required) — 2 letter US state code
  - Allowed values: `AL`, `AK`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DE`, `DC`, `FL`, `GA`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MI`, `MN`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`
- `line1` (string, optional)
- `line2` (string, optional)
- `city` (string, optional)
- `postalCode` (string, optional)
- `country` (enum, optional)
  - Allowed values: `US`

### ProviderEligibilityCreateV1ResponseProvider

- `id` (string, required)
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `MD`, `NP`, `DO`, `ND`, `AP`, `OT`, `LCSW`, `LMFT`, `LPC`, `PSYCH`, `RN`, `CN`, `CWC`, `CM`, `PA`, `RDN`, `PT`
- `npi` (string, required)
- `externalId` (string, optional)
- `providerEligibilityEnabled` (boolean, optional)
- `serviceEligibilityEnabled` (boolean, optional)

## Examples

**Request**

```json
{
  "dateOfService": "2024-01-15T09:30:00Z",
  "serviceTypeId": "serviceTypeId",
  "location": {
    "state": "AL"
  },
  "payerId": "payerId"
}
```

**Response**

```json
{
  "id": "id",
  "validatedAt": "2024-01-15T09:30:00Z",
  "dateOfService": "2024-01-15T09:30:00Z",
  "serviceTypeId": "serviceTypeId",
  "location": {
    "state": "AL",
    "line1": "line1",
    "line2": "line2",
    "city": "city",
    "postalCode": "postalCode",
    "country": "US"
  },
  "payerId": "payerId",
  "status": "ELIGIBLE",
  "providers": [
    {
      "id": "id",
      "name": "name",
      "type": "MD",
      "npi": "npi",
      "externalId": "externalId",
      "providerEligibilityEnabled": true,
      "serviceEligibilityEnabled": true
    },
    {
      "id": "id",
      "name": "name",
      "type": "MD",
      "npi": "npi",
      "externalId": "externalId",
      "providerEligibilityEnabled": true,
      "serviceEligibilityEnabled": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://app.usebridge.com/api/provider-eligibility"

payload = {
    "dateOfService": "2024-01-15T09:30:00Z",
    "serviceTypeId": "serviceTypeId",
    "location": { "state": "AL" },
    "payerId": "payerId"
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.usebridge.com/api/provider-eligibility';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"dateOfService":"2024-01-15T09:30:00Z","serviceTypeId":"serviceTypeId","location":{"state":"AL"},"payerId":"payerId"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.usebridge.com/api/provider-eligibility"

	payload := strings.NewReader("{\n  \"dateOfService\": \"2024-01-15T09:30:00Z\",\n  \"serviceTypeId\": \"serviceTypeId\",\n  \"location\": {\n    \"state\": \"AL\"\n  },\n  \"payerId\": \"payerId\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.usebridge.com/api/provider-eligibility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"dateOfService\": \"2024-01-15T09:30:00Z\",\n  \"serviceTypeId\": \"serviceTypeId\",\n  \"location\": {\n    \"state\": \"AL\"\n  },\n  \"payerId\": \"payerId\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.usebridge.com/api/provider-eligibility")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"dateOfService\": \"2024-01-15T09:30:00Z\",\n  \"serviceTypeId\": \"serviceTypeId\",\n  \"location\": {\n    \"state\": \"AL\"\n  },\n  \"payerId\": \"payerId\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.usebridge.com/api/provider-eligibility', [
  'body' => '{
  "dateOfService": "2024-01-15T09:30:00Z",
  "serviceTypeId": "serviceTypeId",
  "location": {
    "state": "AL"
  },
  "payerId": "payerId"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.usebridge.com/api/provider-eligibility");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"dateOfService\": \"2024-01-15T09:30:00Z\",\n  \"serviceTypeId\": \"serviceTypeId\",\n  \"location\": {\n    \"state\": \"AL\"\n  },\n  \"payerId\": \"payerId\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "dateOfService": "2024-01-15T09:30:00Z",
  "serviceTypeId": "serviceTypeId",
  "location": ["state": "AL"],
  "payerId": "payerId"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.usebridge.com/api/provider-eligibility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```