---
title: "Webhook"
url: "https://kiwi.arashsheyda.me/apis/git-hub-v3-rest-api-1/versions/4cb06d26-20a0-409c-8492-8406889b7eb4/schemas/hook"
---

> Full API specification: https://kiwi.arashsheyda.me/apis/git-hub-v3-rest-api-1/versions/4cb06d26-20a0-409c-8492-8406889b7eb4.md

# Webhook

Webhooks for repositories.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: GitHub v3 REST API
  version: 1.1.4
servers:
  - url: "{protocol}://{hostname}/api/v3"
    variables:
      hostname:
        description: Self-hosted Enterprise Server or Enterprise Cloud hostname
        default: HOSTNAME
      protocol:
        description: Self-hosted Enterprise Server or Enterprise Cloud protocol
        default: http
components:
  schemas:
    webhook-config-url:
      type: string
      description: The URL to which the payloads will be delivered.
      example: https://example.com/webhook
      format: uri
    webhook-config-insecure-ssl:
      oneOf:
        - type: string
          description: Determines whether the SSL certificate of the host for `url` will
            be verified when delivering payloads. Supported values include `0`
            (verification is performed) and `1` (verification is not performed).
            The default is `0`. **We strongly recommend not setting this to `1`
            as you are subject to man-in-the-middle and other attacks.**
          example: '"0"'
        - type: number
    webhook-config-content-type:
      type: string
      description: The media type used to serialize the payloads. Supported values
        include `json` and `form`. The default is `form`.
      example: '"json"'
    webhook-config-secret:
      type: string
      description: If provided, the `secret` will be used as the `key` to generate the
        HMAC hex digest value for [delivery signature
        headers](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#delivery-headers).
      example: '"********"'
    hook-response:
      title: Hook Response
      type: object
      properties:
        code:
          type: integer
          nullable: true
        status:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      required:
        - code
        - status
        - message
    hook:
      title: Webhook
      description: Webhooks for repositories.
      type: object
      properties:
        type:
          type: string
        id:
          description: Unique identifier of the webhook.
          example: 42
          type: integer
        name:
          description: The name of a valid service, use 'web' for a webhook.
          example: web
          type: string
        active:
          description: Determines whether the hook is actually triggered on pushes.
          type: boolean
          example: true
        events:
          description: "Determines what events the hook is triggered for. Default:
            ['push']."
          type: array
          items:
            type: string
          example:
            - push
            - pull_request
        config:
          type: object
          properties:
            email:
              type: string
              example: '"foo@bar.com"'
            password:
              type: string
              example: '"foo"'
            room:
              type: string
              example: '"roomer"'
            subdomain:
              type: string
              example: '"foo"'
            url:
              $ref: "#/components/schemas/webhook-config-url"
            insecure_ssl:
              $ref: "#/components/schemas/webhook-config-insecure-ssl"
            content_type:
              $ref: "#/components/schemas/webhook-config-content-type"
            digest:
              type: string
              example: '"sha256"'
            secret:
              $ref: "#/components/schemas/webhook-config-secret"
            token:
              type: string
              example: '"abc"'
        updated_at:
          type: string
          format: date-time
          example: 2011-09-06T20:39:23Z
        created_at:
          type: string
          format: date-time
          example: 2011-09-06T17:26:27Z
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/hooks/1
        test_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/hooks/1/test
        ping_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/hooks/1/pings
        last_response:
          $ref: "#/components/schemas/hook-response"
      required:
        - id
        - url
        - type
        - name
        - active
        - events
        - config
        - ping_url
        - created_at
        - updated_at
        - last_response
        - test_url
```
