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

# POST /api/ping

> Confirm script installation and update last_ping_at timestamp.

Called automatically by `script.js` on every page load. Updates the `last_ping_at` timestamp on the website, which drives the installation badge in the dashboard.

## Request

```bash theme={null}
POST https://openhermit.com/api/ping
Content-Type: application/json
```

```json theme={null}
{
  "api_key": "YOUR_API_KEY",
  "page_url": "https://yoursite.com/contact",
  "script_version": "1.0.0"
}
```

| Field            | Type   | Required | Description                              |
| ---------------- | ------ | -------- | ---------------------------------------- |
| `api_key`        | string | Yes      | Your website's API key                   |
| `page_url`       | string | No       | The URL of the page the script loaded on |
| `script_version` | string | No       | Version of the script running            |

## Response

```json theme={null}
{
  "ok": true,
  "page_url": "https://yoursite.com/contact"
}
```

## CORS

This endpoint accepts cross-origin requests (`Access-Control-Allow-Origin: *`). It is designed to be called from any domain by the client script.
