TugusDeveloper Docs
API Reference

Send event

POST
/collect/{api_key}

Sends a server-to-server event. No Authorization header required — the property-specific API key is part of the URL. PII fields inside user (email, phone, first name) are hashed with SHA-256 server-side before forwarding.

Path Parameters

api_key*string

Property-specific API key (dashboard under Properties → Script).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/collect/th_YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "event": "purchase",    "order_id": "ORD-2024-001",    "value": 99.8,    "currency": "EUR",    "user": {      "email": "kunde@example.com"    },    "client_id": "optional_if_available"  }'
{  "ok": true,  "event_id": "a3f8b2c1-d4e5-f6a7-b8c9-d0e1f2a3b4c5"}
Empty
Empty
Empty