Reference

REFERENCE

API reference

Send payments, goals and crawler visits from your own backend.

All endpoints accept and return JSON and authenticate with your website API key as a bearer token. Keep the key on your server.

Authorization: Bearer YOUR_API_KEY

Payments

POST /api/v1/payments records a payment or refund from any provider. Sending the same transaction_id again does not create a duplicate.

FieldTypeNotes
transaction_idstringRequired. Your unique ID for the payment.
amountnumberRequired. Major units, for example 29.99.
currencystringISO code. Defaults to the website currency.
visitor_idstringValue of the ml_vid cookie, for attribution.
emailstringUsed to match returning customers.
refundedbooleanRecords a refund against the payment.
renewalbooleanMarks a recurring renewal.
curl -X POST https://analytics.5h3ll.site/api/v1/payments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transaction_id":"order_1001","amount":29.99,"currency":"USD","visitor_id":"VISITOR_ID"}'

Response: { "ok": true, "attributed": true, "visitor_id": "..." }

Goals

POST /api/v1/goals with visitor_id and name. See Goals.

Crawls

POST /api/v1/crawls reports one crawler request. The body is limited to 16 KB.

curl -X POST https://analytics.5h3ll.site/api/v1/crawls \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hits":[{"user_agent":"Mozilla/5.0 (compatible; GPTBot/1.1)","ip":"20.171.206.1","url":"https://example.com/pricing","status":200}]}'

Errors

StatusMeaning
400A required field is missing or invalid.
401The API key is missing or wrong.
429You are over the allowance or sending too quickly.

Something missing or wrong? Open a support ticket.