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

# API Reference Overview

> Complete API reference for API Dental REST endpoints with authentication, base URLs, error handling, and endpoint details.

## Base URLs

| Protocol | URL |
| - | - |
| **REST** | `https://wg.api.dental/rest` |
| **GraphQL** | `https://graphql.api.dental/gql` |
| **GraphQL Playground** | [https://graphql.api.dental/](https://graphql.api.dental/) |

## Authentication

All API requests require authentication via one of two methods:

```bash theme={null}
# Header authentication (recommended)
X-Token-API: your-api-key

# Bearer token authentication
Authorization: Bearer your-api-key
```

## REST Endpoints

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/Eligibility` | Request eligibility verification |
| `POST` | `/ClearCoverage` | Request ClearCoverage eligibility |
| `GET` | `/Payer` | List all supported payers |

## GraphQL Operations

| Type | Operation | Description |
| - | - | - |
| Mutation | `api_RequestEligibility` | Request eligibility verification |
| Mutation | `eligibility_ClearCoverage` | Request ClearCoverage eligibility |
| Query | `api_PayerList` | List all supported payers |

## Error Codes

### API Dental Errors

These errors are returned by the API Dental gateway before reaching upstream services:

| Status | Error | Description |
| - | - | - |
| 401 | Unauthorized | Invalid or missing API key |
| 402 | Payment Required | No active subscription or payment method |
| 403 | Forbidden | API key is disabled |
| 429 | Rate Limited | Monthly API request limit exceeded |
| 500 | Internal Error | Billing data sync error |

### Upstream Payer Errors

When the upstream payer service returns an error, the response includes full error details:

```json theme={null}
{
  "error": {
    "statusCode": 400,
    "message": "Invalid payer ID",
    "upstream": {
      "message": "Invalid payer ID: INVALID_PAYER, please check https://developers.onederful.co/ for valid payer IDs",
      "code": "invalid_payer_id",
      "primaryReason": "Invalid payer ID"
    }
  }
}
```

| Field | Type | Description |
| - | - | - |
| `error.statusCode` | integer | HTTP status code from the upstream service |
| `error.message` | string | Human-readable error summary |
| `error.upstream` | object/string | Full error response body from the payer service |

### SDK Error Classes (TypeScript)

| Status Code | Error Type |
| - | - |
| 400 | `BadRequestError` |
| 401 | `AuthenticationError` |
| 403 | `PermissionDeniedError` |
| 404 | `NotFoundError` |
| 422 | `UnprocessableEntityError` |
| 429 | `RateLimitError` |
| >= 500 | `InternalServerError` |
| N/A | `APIConnectionError` |

## Rate Limiting

Rate limits are enforced per-plan on a monthly basis. When you exceed your limit, requests return a `429` status:

```json theme={null}
{
  "error": {
    "statusCode": 429,
    "message": "Rate Limit Exceeded: You have exceeded your monthly API request limit. Please upgrade your plan at https://api.dental/pricing"
  }
}
```

<Tip>
  Monitor your usage in the [Dashboard](https://api.dental/dashboard) to stay within your plan limits. Upgrade your plan at any time for higher limits.
</Tip>

## OpenAPI Specification

Download the full OpenAPI specification for code generation or API exploration tools:

[Download OpenAPI Spec](https://cdn.api.dental/openapi-defs/api-dental-openapi-spec-0.2.yaml)
