Webhook Types

Webhooks allow pushing information from Administrate to an external system when certain events occur. This is useful for integrations which require near-realtime notifications.

The following example fetches the first page of all available automatic Webhook Types on Events:

Example

query webhookTypes {
  webhookTypes(
    filters: [
      { field: trigger, operation: eq, value: "automatic" }
      { field: name, operation: like, value: "%event%"}
    ]
  ) {
    edges {
      node {
        id
        name
        description
      }
    }
  }
}

The response will contain the id of each available hook, which is needed for setting up the webhook:

{
  "data": {
    "webhookTypes": {
      "edges": [
        {
          "node": {
            "id": "V2ViaG9va1R5cGU6ZXZlbnRfY2FuY2VsbGVk",
            "name": "Event Cancelled",
            "description": "A webhook will be triggered when an Event has been cancelled"
          }
        },
        {
          "node": {
            "id": "V2ViaG9va1R5cGU6ZXZlbnRfY3JlYXRlZA==",
            "name": "Event Created",
            "description": "A webhook will be triggered when an Event has been created"
          }
        },
        {
          "node": {
            "id": "V2ViaG9va1R5cGU6ZXZlbnRfcHVibGlzaGVk",
            "name": "Event Published",
            "description": "A webhook will be triggered when an Event has been set to the active status"
          }
        },
        {
          "node": {
            "id": "V2ViaG9va1R5cGU6ZXZlbnRfdXBkYXRlZA==",
            "name": "Event Updated",
            "description": "A webhook will be triggered when an Event has been updated"
          }
        },
        {
          "node": {
            "id": "V2ViaG9va1R5cGU6ZXZlbnRfZGVsZXRlZA==",
            "name": "Event Deleted",
            "description": "A webhook will be triggered when an Event has been deleted"
          }
        }
      ]
    }
  }
}