API reference
API introduction
Base URL, request format and every endpoint, generated from the OpenAPI document.
Base URL#
Text
https://tughq.com/api/v1This reference is generated from the same description as /openapi.json (OpenAPI 3.1). Load it into Postman, Insomnia or a client generator.
Requests and responses#
- JSON in and out. A
text/plainbody holding JSON is accepted too: that is whattug.jssends, to skip the CORS preflight. - Every response, errors included, has CORS headers and a
Request-Id. - Bodies are limited to 1 MB.
propertiesandtraitsare limited to 32 KB and 5 levels deep. - A batch of events is all or nothing. If one is invalid, the error names it (for example
events[3].occurredAt) and none are stored.
Authentication is covered in Authentication, error handling in Errors.
Endpoints#
Ingestion
Events and traits, from browsers or servers.
Decisions
Approved messages for a user and surface, and what happened to them.
Data subject requests
GDPR and CCPA erasure, export and suppression. Server API key only.