Record AI fetch
POST
/api/sites/{id}/ingest/ai-fetch
const url = 'https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ingest/ai-fetch';const options = { method: 'POST', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"bytes_served":1,"content_type":"example","hostname":"example","path":"example","response_ms":1,"status_code":1,"user_agent":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ingest/ai-fetch \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "bytes_served": 1, "content_type": "example", "hostname": "example", "path": "example", "response_ms": 1, "status_code": 1, "user_agent": "example" }'Accepts a server-side AI crawler fetch record for a site. The user agent must match a known AI bot. Intended for edge or log-forwarded fetch analytics.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
bytes_served
integer
content_type
string
hostname
string
path
required
string
response_ms
integer
status_code
required
integer
user_agent
required
string
Example generated
{ "bytes_served": 1, "content_type": "example", "hostname": "example", "path": "example", "response_ms": 1, "status_code": 1, "user_agent": "example"}Responses
Section titled “ Responses ”Accepted