Send Agent EventsPOST /agent-events

Send Agent Events

Send request metadata to Hardal so AI Visibility can analyze AI agent, crawler, and bot traffic.

curl -X POST "https://analytics.yourdomain.com/agent-events" \
  -H "Content-Type: application/json" \
  -H "tenant-id: YOUR_TENANT_ID" \
  -d '{
  "path": "/pricing",
  "ip": "66.249.66.1",
  "userAgent": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
  "eventTime": "2026-04-29T15:12:17.836Z",
  "sourceId": "YOUR_SOURCE_ID"
}'
{
  "success": true,
  "data": {
    "accepted": 42,
    "events": [
      {
        "eventId": "123e4567-e89b-12d3-a456-426614174000",
        "sourceId": "YOUR_SOURCE_ID"
      }
    ]
  },
  "timestamp": "2024-12-25T10:00:00Z",
  "path": "/agent-events",
  "requestId": "example_string"
}
POST
/agent-events
POST
Base URLstring

Target server for requests. Edit to use your own host.

Content-Typestring
Required

The media type of the request body

Options: application/json
header
tenant-idstring
Required

Your Tenant ID from Setup in the Dashboard.

pathstring
Required

Requested path on the website.

Min length: 1 • Max length: 2048
ipstring
Required

IP address from the original incoming request.

Min length: 1 • Max length: 45
userAgentstring
Required

Raw User-Agent header from the request.

Min length: 1 • Max length: 1024
eventTimestring
Required

Request time in ISO 8601 format.

Format: date-time
sourceIdstring
Required

Your Source ID from Setup in the Dashboard.

Min length: 1 • Max length: 128
Request Preview
Response

Response will appear here after sending the request

Headers

tenant-idstring
Required

Your Tenant ID from Setup in the Dashboard.

Example:
YOUR_TENANT_ID

Body

application/json
pathstring
Required

Requested path on the website.

Example:
/pricing
ipstring
Required

IP address from the original incoming request.

Example:
66.249.66.1
userAgentstring
Required

Raw User-Agent header from the request.

Example:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
eventTimestring
Required

Request time in ISO 8601 format.

Example:
2026-04-29T15:12:17.836Z
sourceIdstring
Required

Your Source ID from Setup in the Dashboard.

Example:
YOUR_SOURCE_ID

Responses

Send request metadata

Send request metadata to the agent-events endpoint so Hardal can classify AI agent, search bot, and crawler traffic. The reference and live playground below are generated from the API spec. An accepted crawler returns 202; a request filtered by the user-agent or IP checks returns an empty 204.