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

# Keys, Minor ID and environments

|                 | Test                                                                                                                                                                                                     | Production                                                   |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **Host**        | `https://test-api.rebateright.com.au`                                                                                                                                                                    | `https://api.rebateright.com.au`                             |
| **Key**         | Your Test API Key                                                                                                                                                                                        | Your API Key                                                 |
| **Data**        | Prepared test patients and providers, listed in [Integration test data](/test-data). Before your first test claim, read [Claiming in the test environment](/test-data#claiming-in-the-test-environment). | Live Medicare, DVA and AIR: real patients and real providers |
| **Cost**        | Included in every plan and in the free trial. Requests here never count against your plan.                                                                                                               | Billed per your agreement for API usage in this environment. |
| **Typical use** | Development, quality assurance, integration tests and demonstrations                                                                                                                                     | Go-live, pilots with real patients, production workflows     |

[Getting Started](https://app.rebateright.com.au/start) in the RebateRight app gives you 3 credentials: a Minor ID, an API Key and a Test API Key. Each key works only on its own host. A key sent to the other environment's host gets `401` with the text `Unauthorized access.` The Minor ID is the same in both environments.

A clinic that claims or uses the AIR also registers its Minor ID with Services Australia, as [Minor ID and the HW027 form](/minor-id) sets out.

## Required headers

Send both headers on every request:

| Header       | Value                                            |
| ------------ | ------------------------------------------------ |
| `x-api-key`  | The API Key for the host you send the request to |
| `x-minor-id` | The Minor ID of the clinic the request is for    |

Most endpoints return `400` with the text `Missing required header: x-minor-id` when the Minor ID is absent. The rest ignore the header, so sending both headers on every request always works.

## Many clinics

A vendor whose software serves many clinics uses one API Key, and one Test API Key, for all of them. Each clinic has its own Minor ID, and each request sends the Minor ID of the clinic it is for. RebateRight issues a Minor ID for each clinic on request, as [Minor ID and the HW027 form](/minor-id) sets out.

## The web app

The [web app](https://app.rebateright.com.au) needs no code. Save your Minor ID and API Key in **Connection Settings**, and you can use the app immediately. The app sends both credentials for you.

## The explorer and code samples

The explorer and the code samples on these pages use the test host by default, so use your Test API Key with them. Requests you send from the explorer pass through Fern on their way to the API. Fern is the platform that hosts these docs. Use the explorer with the test host and test data only. Your own software sends its requests to the API directly.