API reference

API introduction

Base URL, request format and every endpoint, generated from the OpenAPI document.

Base URL#

Text

https://tughq.com/api/v1

This 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/plain body holding JSON is accepted too: that is what tug.js sends, to skip the CORS preflight.
  • Every response, errors included, has CORS headers and a Request-Id.
  • Bodies are limited to 1 MB. properties and traits are 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#

  • PageOverviewGet started
  • PageQuick startGet started
  • PageConceptsGet started
  • PageScript tag (tug.js)Install
  • PageReactInstall
  • PageNode and serverInstall
  • PageIdentity verificationGuides
  • PageCounting and holdoutsGuides
  • PagePostHogGuides
  • PageEnvironmentsGuides
  • PageData requestsGuides
  • PageOperator consoleGuides