# API playground

> Send a real request to the PayCaptain API from your browser, with every field checked against the rules before it goes.

> **Must** The playground calls the live API. A POST creates or changes real records in your payroll. Use a test company if you have one.

The playground is an interactive page for people. It checks a request against the field rules in the browser, then sends it to the live API through this site. Agents and applications should call https://api.paycaptain.com directly from a server instead.

## How the playground handles your key

Your API key is typed into this page and sent, with your request, through this site to `api.paycaptain.com`. It is never saved in your browser, never put in a URL and never logged. Close the tab and it is gone.

The playground is for people trying the API. Your own application must still keep its key in a secrets manager and call the API from its server. See [Trust and security](https://developer.paycaptain.com/trust#api-keys).

## What gets checked before you send

For POST requests the body is checked as you type, against the same rules published on the [field pages](https://developer.paycaptain.com/fields/employee): required fields, types, formats, allowed values and patterns, plus the single-record [business rules](https://developer.paycaptain.com/rules) such as date order. Each problem links to the field it concerns.

You can still send a record that fails, to see how the API responds. Your application must not: it has to validate first.
