Integrate using Generic WebHooks V2

We have introduced new Generic Hook V2 which offers more flexibility for users.


How to enable Generic Hook V2 for a service:

Click on 'Services and Integrations' in the Hub Config section. 

Once here, you will need to select the "Services & Integrations" option on the side menu.

Click the arrow on the right.

file-0lCB8uslU9.png

You will then see these options appear. Click on the 3 dots to the right to reveal the drop-down menu and choose the Edit option.

file-AZwIK7XEse.png

Under Edit services, you will see new V2 integrations section which includes "Generic Hook v2".

Select "Generic Hook v2" integration and save changes.

After saving changes, the link will be visible below the name of the service in "Services & Integrations" screen:

file-jmLg5AnOCi.png

Please note that your link may be slightly different and you should always refer to "Services & Integrations" section when adding a new integration in one of the supported 3'rd party services

With this new hook StatusHub will expect the following request:

Method: POST

URL: As provided by UI

Content-Type: application/json


POST data schema for incidents:

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": ["incident"],
      "description": "Indicate it is an incident."
    },
    "id": {
      "type": "string",
      "description": "Identified that is unique for each incident and same for every update of that incident."
    },
    "title": {
      "type": "string",
      "description": "Incident title. Can be different in each update but current incident title visible on Hub Page and in notifications will be taken from last published update."
    },
    "description": {
      "type": "string",
      "description": "Body of incident update."
    },
    "start_time": {
      "type": "string",
      "description": "ISO8601 formatted UTC timestamp of when the even has occurred. Important if successful delivering of webhook is delayed for any reason.",
      "pattern": "^202[0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]Z$"
    },
    "state": {
      "type": "string",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ],
      "description": "Incident state. 'resolved' has special meaning and rules: It can't be the first update and has to be a last one since it will resolve(close) the incident. It will also set service statuses to 'up' for that incident."
    },
    "status": {
      "type": "string",
      "enum": [
        "down",
        "degraded",
        "up"
      ],
      "description": "Status of service."
    },
    "silent": {
      "type": "boolean",
      "description": "If set to true, creates incident update that does not sent notifications to subscribers."
    },
    "draft": {
      "type": "boolean",
      "description": "If set to true, creates incident update as a draft. IMPORTANT: first non-draft update will automatically also publish all previous updates that were a drafts. But those previous updates will not result in separate notifications."
    }
  },
  "required": [
    "title",
    "description",
    "start_time",
    "state",
    "status"
  ],
  "additionalProperties": true
}

Incident data example (minimal):

{
  "title": "Generic Hook V2 usage example",
  "description": "Incident body\n<br>With second line of text.",
  "start_time": "2024-08-01T11:31:50Z",
  "state": "monitoring",
  "status": "down"
}

Incident data example (full):

{
  "id": "my-incident-unique-id",
  "title": "Generic Hook V2 usage example",
  "description": "Incident body\n<br>With second line of text.",
  "start_time": "2024-08-01T11:31:50Z",
  "state": "monitoring",
  "status": "down",
  "type": "incident",
  "silent": true,
  "draft": true
}

POST data schema for maintenance:

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": ["maintenance"],
      "description": "Indicate it is a maintenance."
    },
    "id": {
      "type": "string",
      "description": "Identified that is unique for each maintenance."
    },
    "title": {
      "type": "string",
      "description": "Maintenance title."
    },
    "description": {
      "type": "string",
      "description": "Body of maintenance."
    },
    "start_time": {
      "type": "string",
      "description": "ISO8601 formatted UTC timestamp of when the even has occurred. Important if successful delivering of webhook is delayed for any reason.",
      "pattern": "^202[0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]Z$"
    },
    "end_time": {
      "type": "string",
      "description": "ISO8601 formatted UTC timestamp of when the even maintenance is scheduled to end.",
      "pattern": "^202[0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]Z$"
    },
    "status": {
      "type": "string",
      "enum": [
        "down",
        "degraded",
        "up"
      ],
      "description": "Status of service."
    },
    "silent": {
      "type": "boolean",
      "description": "If set to true, creates maintenance that does not sent notifications to subscribers."
    },
    "draft": {
      "type": "boolean",
      "description": "If set to true, creates maintenance as a draft."
    }
  },
  "required": [
    "title",
    "description",
    "start_time",
    "end_time",
    "status",
    "type"
  ],
  "additionalProperties": true
}

Maintenance data example (minimal):

{
  "title": "Generic Hook V2 usage example",
  "description": "Maintenance body\n<br>With second line of text.",
  "start_time": "2024-08-01T12:00:00Z",
  "end_time": "2024-08-02T22:00:00Z",
  "status": "down",
  "type": "maintenance"
}

Maintenance data example (full):

{
  "id": "my-maintenance-unique-id",
  "title": "Generic Hook V2 usage example",
  "description": "Maintenance body\n<br>With second line of text.",
  "start_time": "2024-08-01T12:00:00Z",
  "end_time": "2024-08-02T22:00:00Z",
  "status": "down",
  "type": "maintenance"
  "silent": true,
  "draft": true
}

Please feel free to contact support with any questions.

Still need help? Contact Us Contact Us