Create an API key
On the Custom Log Integration page, click New API Key, enter a name and click Create API Key. Copy the key from the dialog. Keys start withaa_. Creating a key needs an Owner or Admin by default.
Any Agent Analytics key works for every log source, so you can reuse one from Website > Agent Analytics > Settings. A new key can take up to a minute to start working. Keep it on your server.
Send logs
Authorization: Bearer aa_your_key works in place of X-API-Key.
The body is one JSON object per request, or an array of them to send a batch:
Any other field is ignored. Send logs in the background so they don’t slow down your responses, and batch them where you can.
Which requests are kept
ChatFeatured stores only requests whoseuserAgent matches an AI crawler or search engine bot (see what gets counted). Pass the header through unchanged. Everything else, including human visits, is counted as filtered and discarded.
You can send all your traffic or filter on your side first. If you skip static assets, keep robots.txt, llms.txt and sitemaps: crawlers fetch them often.
Responses
A 200 with
"accepted":0 isn’t an error. None of the entries matched a known bot.
Check that it works
Post a test entry with a crawler user agent in the body:"accepted":1, and the visit appears in Website > Agent Analytics within a few minutes. A browser user agent returns "filtered":1 and never shows up.
Related
- Agent Analytics: reading the data
- Cloudflare, Vercel and AWS Data Firehose: ready-made log sources