Skip to content

Generic Webhook

Send TSDProxy status alerts to any HTTP endpoint that accepts JSON. This works with custom scripts, automation platforms (n8n, Zapier, Home Assistant), or any service that ingests JSON webhooks.

Configuration

/config/tsdproxy.yaml
webhooks:
  - url: "https://example.com/webhook"
    type: generic
    events:
      - Running
      - Stopped
      - Error

Omit type entirely — generic is the default when no type is specified.

JSON Payload

TSDProxy sends a POST request with Content-Type: application/json:

{
  "proxy": "myapp",
  "status": "Running",
  "previous_status": "Starting",
  "timestamp": "2026-05-15T10:00:00Z",
  "message": "Proxy 'myapp' status changed from Starting to Running"
}
FieldTypeDescription
proxystringProxy hostname
statusstringCurrent status (e.g., Running, Error)
previous_statusstringPrevious status
timestampstringUTC timestamp in RFC 3339 format
messagestringHuman-readable status change description

With Custom Headers

/config/tsdproxy.yaml
webhooks:
  - url: "https://example.com/webhook"
    headers:
      Authorization: "Bearer your-token"
      X-Custom-Header: "custom-value"
    events:
      - Error

Custom headers are applied after Content-Type, so you can override it if your endpoint expects a different content type.

Examples

Home Assistant

Send events to a REST sensor or automation trigger:

/config/tsdproxy.yaml
webhooks:
  - url: "https://homeassistant.local:8123/api/webhook/tsdproxy"
    type: generic
    headers:
      Authorization: "Bearer long-lived-access-token"

n8n

Use the Webhook node to receive TSDProxy events:

/config/tsdproxy.yaml
webhooks:
  - url: "https://n8n.example.com/webhook/tsdproxy"
    type: generic

Custom Script

Point the webhook at any HTTP server:

/config/tsdproxy.yaml
webhooks:
  - url: "http://localhost:3000/tsdproxy-events"
    type: generic

Notes

  • Default type. If you omit type, TSDProxy sends generic JSON. You only need type: generic for clarity.
  • Response handling. TSDProxy considers the webhook successful when the response status is below 300. Any status code 300 or above triggers a retry (up to 3 attempts with exponential backoff).
  • Timeout. Each request has a 10-second timeout. If your endpoint is slow, consider putting a queue in front of it.
Last updated on