# API playground

> Try the MetricRaven API from your browser: pick an endpoint, fill the parameters, send it with your key and see the response.

Source: https://metricraven.com/docs/api-playground  
Markdown: https://metricraven.com/docs/api-playground.md  
Section: API reference

Pick an endpoint, set its parameters and send it with an [account token](https://metricraven.com/docs/api-authentication) (`mr_…`) or a website's secret key (`ana_sec_…`). Signed in, you can also read reports for your own websites without a key. Every request goes to `/api/v1` on this site and returns live data.

> **Interactive:** the request form runs on the [web version of this page](https://metricraven.com/docs/api-playground). Every endpoint, its credentials and scopes are listed in the [API overview](https://metricraven.com/docs/api-overview).

## Which key to use

- **Account token**: reports, settings and account endpoints across your websites. Add the website ID; the token's scopes (read, visitors, write) decide what it can do. Team members and your email preferences act as you, so they need a token, never the secret key.
- **Site secret key**: one website, including server tracking (events, payments, identify, crawlers) and deleting a person's data.
- **Signed in**: read-only requests with your dashboard session. Writes always need a key and an explicit confirmation.

## Keeping your key safe

- The key is kept in memory, or in this tab's sessionStorage if you tick *Keep for this tab*. It is sent only as an Authorization header and never added to the page URL or the code samples.
- Don't share your screen or hand over the tab while a key is entered. Use Clear when you're done.
- Prefer a read-only token for exploring; revoke it in Settings → API & MCP if it may have leaked.
