API reference

Projects

Workspace projects, for server code.

List projects#

get/projects

The API key's workspace projects with their public keys and environment labels, oldest first. Archived projects are left out.

Auth: server API key.

curl "https://tughq.com/api/v1/projects" \
  -H "Authorization: Bearer $TUG_API_KEY"

200 response · JSON

{
  "projects": [
    {
      "id": "5b0c7f9e-2d41-4c8a-9a6e-3f1d2b7c8e90",
      "name": "Shipcart",
      "slug": "shipcart",
      "publicKey": "phk_live_3kV9xQmR2pT8wYc1Ld5NbA",
      "allowedOrigin": "https://app.shipcart.example",
      "environment": "production",
      "createdAt": "2026-11-01T09:00:00.000Z"
    }
  ]
}

Errors: server_key_required (401), invalid_api_key (401), internal_error (500), service_unavailable (503).

  • 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