> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pesarc.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Ping

> Confirm an API key works and see which account it is scoped to.

A simple authenticated smoke test. Use it to verify a key during setup and in
health checks.

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer sk_live_…`
</ParamField>

## Response

<ResponseField name="ok" type="boolean">Always `true` on success.</ResponseField>
<ResponseField name="account" type="string">The account id the key is scoped to.</ResponseField>
<ResponseField name="live" type="boolean">Whether the key is a live key.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://pesarc.xyz/api/v1/ping \
    -H "Authorization: Bearer sk_live_xxx"
  ```

  ```ts TypeScript theme={null}
  const res = await fetch("https://pesarc.xyz/api/v1/ping", {
    headers: { Authorization: `Bearer ${process.env.PESARC_SECRET_KEY}` },
  });
  const data = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "ok": true, "account": "acct_9f2c", "live": true }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "type": "authentication_error",
      "message": "Missing API key. Send Authorization: Bearer sk_live_…"
    }
  }
  ```
</ResponseExample>
