Skip to content
Home » Configuring Webhooks

Configuring Webhooks

On some plans, TrackSSL supports webhook notifications. You’ll receive notifications via an HTTP POST to an end point of your choosing. There are 4 event types that your end point will receive:

  • added
    When a new certificate is added to your TrackSSL account.
  • expiring
    When a certificate reaches an expiration threshold for which you’ve enabled notifications.
  • change
    When a change to a certificate is detected, such as at reissuance.
  • test
    When you manually send a test notice to your endpoint.

Sample payloads for each type are detailed below. Your end point should expect a JSON payload with content-type of application/json and a user-agent containing TrackSSL and a version number.

Each notification contains a type key representing one of the events above, a text key representing a human-readable description, and a payload key with a machine-readable JSON payload that varies by type.

Certificate Added

{
  "type": "added",
  "text": "The certificate on example.com now being monitored.",
  "payload": {
    "hostname": "example.com",
    "url": "https://app.trackssl.com/domains/1234567"
  }
}

Certificate Expiring

{
  "type": "expiring",
  "text": "The certificate on example.com expires on 2022-10-25 23:59:59 UTC",
  "payload": {
    "hostname": "example.com",
    "expires_at": "2022-10-25T23:59:59.000Z",
    "days_remaining": 95,
    "url": "https://app.trackssl.com/domains/1234567"
  }
}

Certificate Change

{
  "type": "change",
  "text": "A change in the certificate at example.com has been detected.",
  "payload": {
    "hostname": "example.com",
    "issuer": "Amazon",
    "start_date": "2022-02-22T00:00:00.000Z",
    "end_date": "2022-12-07T23:59:59.000Z",
    "valid_cname": true,
    "url": "https://app.trackssl.com/domains/1234567"
  }
}

Test

{
  "type": "test",
  "text": "Test notification from TrackSSL",
  "payload": {
    "hostname": "example.com",
    "expires_at": "2022-06-20T15:43:59.551Z",
    "days_remaining": 7,
    "url": "https://trackssl.com/domains/XXXXXX"
  }
}