# Test API functions

Early access
This is an experimental, early-access capability.
It may not be available for your organization yet, and its behavior may change before general availability.

You can use Replay in Reunite to send requests to your API functions while you work in the editor.
This helps you verify routing, request data, and responses without leaving your project workspace.

## Open Replay

Replay is available in the preview area of the editor.
If the Replay tab is already open, select it.
If it is closed, open a new preview tab and select **Replay**.

You can also use the keyboard shortcut to open Replay:

- macOS: `⌃ Ctrl` + `⌥ Opt` + `Y`
- Windows: `Ctrl` + `Alt` + `Y`


## Test an API function

To test an API function in Reunite:

1. Open an API function file in the editor.
2. Open the **Replay** tab.
3. Confirm that Replay loaded the request that matches the file you opened.
4. Add any path, query, header, or body values you want to test.
5. Send the request and review the response.


If the active file is not an API function, Replay prompts you to open one first.

Replay automatically opens the request that matches the API function file you selected in the editor.

## Before you test

If you do not have an API function yet, see [Create API functions](/docs/realm/customization/api-functions/create-api-functions).

If Replay does not open the request you expect, check that your file is set up as an API function and follows your project routing rules.

To learn more about file naming, routing rules, custom API function folders, and request handling, see the [API functions reference](/docs/realm/customization/api-functions/api-functions-reference).

## View logs while testing

Replay includes a **Logs** panel at the bottom of the tab.
Use it to review output generated while testing your API functions.

In the **Logs** panel you can:

- expand or collapse the panel
- clear the current logs
- copy the current logs


If your API function writes to `console`, the **Logs** pane helps you inspect that output while you test requests.
To learn more about debugging API functions, see [API functions reference](/docs/realm/customization/api-functions/api-functions-reference#debug-code-with-console).

## Resources

- **[API functions](/docs/realm/customization/api-functions)** - Learn when to use API functions in your project
- **[API functions reference](/docs/realm/customization/api-functions/api-functions-reference)** - Review routing rules, context helpers, authorization, and limitations
- **[Create API functions](/docs/realm/customization/api-functions/create-api-functions)** - Follow a step-by-step tutorial for building API functions
- **[Environment variables](/docs/realm/reunite/project/env-variables)** - Store secrets and other configuration values used by your API functions
- **[Use the editor](/docs/realm/reunite/project/use-editor)** - Work with files, branches, and commits in Reunite
- **[Keyboard shortcuts](/docs/realm/reunite/project/keyboard-shortcuts)** - Navigate the editor faster with built-in shortcuts