How-to guidemonitoring8–10 minGetting started

Getting Started with the TG2G Event API

Learn the core payload format, severity mapping, and best practices for sending alerts into TG2G.

SRELast updated 2025-11-26
event-apialertsincidentswebhook
Share:

Prerequisites

  • A Tech Guys 2 Go account with access to the portal.
  • An Event API key created in **Portal → Settings → API**.
  • The ability to make outbound HTTPS requests from your environment.

Event API endpoint and headers

The Event API accepts JSON payloads over HTTPS. Use the following endpoint and headers: - **Endpoint:** `https://ingest.techguys2go.com/api/webhook/ingest` - **Auth header:** `X-TG2G-Api-Key: <YOUR_EVENT_API_KEY>` - **Content-Type:** `application/json`

Minimal curl example
curl -X POST "https://ingest.techguys2go.com/api/webhook/ingest" \
-H "X-TG2G-Api-Key: $TG2G_EVENT_KEY" \
-H "Content-Type: application/json" \
-d '{
                        "summary": "Example alert from my app",
                        "severity": "high",
                        "labels": {
                          "service": "billing-api",
                          "env": "prod"
                        },
                        "details": "Error rate above 5% over 5 minutes"
                      }'

Payload structure and recommended fields

The Event API is intentionally simple. At minimum you should send:

  • summary – a short, human-readable description of the problem
  • severity – one of low, medium, high, or critical

We strongly recommend including labels to make routing and grouping easier:

  • labels.service – the logical service, e.g. checkout-api
  • labels.env – e.g. prod, staging, dev
  • labels.region – if you run multi-region

Linking events to entities and runbooks

You can optionally attach an event to a specific entity and/or runbook. This is useful when you want incidents to show up on a particular service card and to pre-load the most relevant remediation steps. - `entityId` — the ID of an entity from **Portal → Entities** - `runbookId` — the ID of a runbook from **Portal → Runbooks**

Event with entity and runbook
{
  "summary": "K8s prod API 5xx spike",
  "severity": "critical",
  "labels": {
    "service": "api",
    "env": "prod",
    "region": "us-east-1"
  },
  "details": "5xx spiking since 12:03 UTC, ingress timeouts",
  "entityId": "ent_prod_api_01",
  "runbookId": "rb_k8s_ingress_timeouts"
}

How severity affects escalation

  • `low` – tracked in the portal, no paging by default.
  • `medium` – surfaced to SREs; may page depending on your routing rules.
  • `high` – treated as a significant incident for in-scope entities.
  • `critical` – handled as a top-priority production incident with aggressive escalation.