GitHub · JSON Structure

Github Webhook Delivery Structure

A record of a webhook delivery from GitHub, including the request headers, payload, and response information.

Type: object Properties: 14 Required: 4
CodePipelinesPlatformSoftware DevelopmentSource ControlT1

GitHub Webhook Delivery is a JSON Structure definition published by GitHub, describing 14 properties, of which 4 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id guid delivered_at redelivery duration status status_code event action installation_id repository_id url request response

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://github.com/schemas/github/webhook-delivery.json",
  "name": "GitHub Webhook Delivery",
  "description": "A record of a webhook delivery from GitHub, including the request headers, payload, and response information.",
  "type": "object",
  "required": [
    "id",
    "guid",
    "event",
    "action"
  ],
  "properties": {
    "id": {
      "type": "int32",
      "description": "The unique identifier of the webhook delivery."
    },
    "guid": {
      "type": "string",
      "format": "uuid",
      "description": "The globally unique identifier for the delivery (X-GitHub-Delivery header)."
    },
    "delivered_at": {
      "type": "datetime",
      "description": "The date and time the delivery was made."
    },
    "redelivery": {
      "type": "boolean",
      "description": "Whether this delivery is a redelivery of a previous delivery."
    },
    "duration": {
      "type": "double",
      "minimum": 0,
      "description": "The time in seconds the delivery took."
    },
    "status": {
      "type": "string",
      "description": "The HTTP status description returned by the receiver."
    },
    "status_code": {
      "type": "int32",
      "minimum": 100,
      "maximum": 599,
      "description": "The HTTP status code returned by the receiver."
    },
    "event": {
      "type": "string",
      "description": "The event type that triggered the delivery (X-GitHub-Event header)."
    },
    "action": {
      "type": "string",
      "description": "The action within the event that triggered the delivery."
    },
    "installation_id": {
      "type": "integer",
      "description": "The GitHub App installation ID, if applicable."
    },
    "repository_id": {
      "type": "integer",
      "description": "The repository ID associated with the delivery."
    },
    "url": {
      "type": "uri",
      "description": "The API URL for the delivery record."
    },
    "request": {
      "$ref": "#/$defs/DeliveryRequest"
    },
    "response": {
      "$ref": "#/$defs/DeliveryResponse"
    }
  },
  "$defs": {
    "DeliveryRequest": {
      "type": "object",
      "description": "The HTTP request that was sent to the webhook receiver.",
      "properties": {
        "headers": {
          "type": "object",
          "description": "The HTTP headers sent with the request.",
          "properties": {
            "X-GitHub-Hook-ID": {
              "type": "string",
              "description": "Unique identifier for the webhook configuration."
            },
            "X-GitHub-Event": {
              "type": "string",
              "description": "The name of the event that triggered the delivery."
            },
            "X-GitHub-Delivery": {
              "type": "string",
              "format": "uuid",
              "description": "A GUID to uniquely identify the delivery."
            },
            "X-Hub-Signature-256": {
              "type": "string",
              "pattern": "^sha256=[0-9a-f]{64}$",
              "description": "HMAC-SHA256 hex digest of the payload, prefixed with sha256=."
            },
            "X-Hub-Signature": {
              "type": "string",
              "pattern": "^sha1=[0-9a-f]{40}$",
              "description": "Legacy HMAC-SHA1 hex digest of the payload, prefixed with sha1=."
            },
            "X-GitHub-Hook-Installation-Target-Type": {
              "type": "string",
              "enum": [
                "repository",
                "organization",
                "business",
                "app"
              ],
              "description": "The type of resource the webhook is installed on."
            },
            "X-GitHub-Hook-Installation-Target-ID": {
              "type": "string",
              "description": "The unique identifier of the resource the webhook is installed on."
            },
            "User-Agent": {
              "type": "string",
              "pattern": "^GitHub-Hookshot/",
              "description": "The GitHub user agent string."
            },
            "Content-Type": {
              "type": "string",
              "enum": [
                "application/json",
                "application/x-www-form-urlencoded"
              ],
              "description": "The content type of the payload."
            }
          }
        },
        "payload": {
          "type": "object",
          "description": "The JSON payload that was sent."
        }
      }
    },
    "DeliveryResponse": {
      "type": "object",
      "description": "The HTTP response received from the webhook receiver.",
      "properties": {
        "headers": {
          "type": "object",
          "description": "The HTTP response headers.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "payload": {
          "type": [
            "string",
            "null"
          ],
          "description": "The response body returned by the receiver."
        }
      }
    }
  }
}