---
title: "Make your first request"
description: "Confirm a Test API key and read the Affinity account."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs-staging.affinityrx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Make your first request

This procedure uses a Test API key on a trusted server.
Sign up at [Affinity for Platforms](https://platform.affinityrx.com) to start in Test mode immediately.
Affinity approval is required only when your platform is ready for Live access.

> **Keep API keys on the server**
>
> Do not put an API key in browser code, a mobile application, source control, or logs.

## Before you start

You need:

- Bun, Node.js, or another HTTP client
- a Test API key from the Affinity platform dashboard
- access to the practice that you will use for development

## Send the request

1. **Store the key**

   Set `AFFINITY_API_KEY` in your server environment. Do not pass the key as a command argument.
2. **Read the account**

   Send this request from the trusted server.

```bash
curl --request GET \
  --url https://api.affinityrx.com/v1/account \
  --header "Authorization: Bearer $AFFINITY_API_KEY" \
  --header "Affinity-Version: 2026-09-28"
```
3. **Check the mode**

   Confirm that the response reports Test mode before you send synthetic patient data.

The API returns the account that owns the API key. It also returns the mode and access available to that key.

## Next steps

- Read [Authentication](/guides/authentication/) before you add the key to an application.
- Read [Build a headless integration](/guides/choose-an-integration/) before you build a prescribing workflow.
- Read [Manage practice Live access](/guides/test-and-live-mode/#manage-practice-live-access) when your platform is approved for Live mode.
- Open the [API reference](/api/) to inspect the current response schema.

Source: https://docs-staging.affinityrx.com/guides/quickstart/index.mdx
