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: 11111111-1111-4111-8111-111111111111" \
  -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": "22222222-2222-4222-8222-222222222222"
}'
{
  "success": true,
  "data": {
    "accepted": 1,
    "events": [
      {
        "eventId": "44444444-4444-4444-8444-444444444444",
        "sourceId": "22222222-2222-4222-8222-222222222222"
      }
    ]
  },
  "timestamp": "2026-10-22T09:00:00.000Z",
  "path": "/agent-events",
  "requestId": "example-request-id"
}
curl -i -X POST "https://analytics.yourdomain.com/agent-events" \
  -H "Content-Type: application/json" \
  -H "tenant-id: 11111111-1111-4111-8111-111111111111" \
  -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": "22222222-2222-4222-8222-222222222222"
}'
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 (UUID) from Setup in the Dashboard.

Format: uuid
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 (UUID) from Setup in the Dashboard.

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

Response will appear here after sending the request

Headers

tenant-idstring
Required

Your Tenant ID (UUID) from Setup in the Dashboard.

Example:
11111111-1111-4111-8111-111111111111

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 (UUID) from Setup in the Dashboard.

Example:
22222222-2222-4222-8222-222222222222

Responses

Send request metadata

Send the original request's metadata to your first-party /agent-events endpoint. Replace the sample Tenant ID and Source ID with the UUIDs from Setup in the Dashboard, and use the original request's path, IP address, User-Agent, and time.

Headers

Send Content-Type: application/json and your tenant-id. Session and consent headers from Send Events are not used by this endpoint.

Check the result

  • 202 Accepted: one event accepted for processing (accepted: 1).
  • 204 No Content: request filtered; the body is empty. Do not parse it as JSON.
  • 400 Bad Request: check the required fields, UUIDs, and error details.