---
title: "Create a global webhook"
method: POST
path: "/admin/hooks"
tags: ["enterprise-admin"]
---

# Create a global webhook

`POST /admin/hooks`

## Request body

- object
  - `name` string, required — Must be passed as "web".
  - `config` object, required — Key/value pairs to provide settings for this webhook.
    - `url` string, required — The URL to which the payloads will be delivered.
    - `content_type` string — The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
    - `secret` string — If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.5/webhooks/event-payloads/#delivery-headers) header.
    - `insecure_ssl` string — 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.**
  - `events` string[] — The [events](https://docs.github.com/enterprise-server@3.5/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.
  - `active` boolean — Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.

## Response `201`

Response

- GlobalHook
  - `type` string
  - `id` integer
  - `name` string
  - `active` boolean
  - `events` string[]
  - `config` object
    - `url` string
    - `content_type` string
    - `insecure_ssl` string
    - `secret` string
  - `updated_at` string
  - `created_at` string
  - `url` string
  - `ping_url` string

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-4.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-4/versions/ee6c7a46328e/schema)
