GitHub v3 REST API

Delete an organization webhook

delete
http://HOSTNAME/api/v3/orgs/{org}/hooks/{hook_id}

Path Parameters

orgstringrequired
hook_idintegerrequired

Response

Response

delete/orgs/{org}/hooks/{hook_id}
 

Get a webhook configuration for an organization

Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use “Get an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:read permission.

get
http://HOSTNAME/api/v3/orgs/{org}/hooks/{hook_id}/config

Path Parameters

orgstringrequired
hook_idintegerrequired

Response

200 application/json

Response

Webhook Configuration

Configuration object of the webhook

urlstring(uri)

The URL to which the payloads will be delivered.

Example:https://example.com/webhook

content_typestring

The media type used to serialize the payloads. Supported values include json and form. The default is form.

Example:"json"

secretstring

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

Example:"********"

insecure_sslOne Of
Variant 1string

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"

get/orgs/{org}/hooks/{hook_id}/config
 
200 application/json

Update a webhook configuration for an organization

Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use “Update an organization webhook .”

Access tokens must have the admin:org_hook scope, and GitHub Apps must have the organization_hooks:write permission.

patch
http://HOSTNAME/api/v3/orgs/{org}/hooks/{hook_id}/config

Path Parameters

orgstringrequired
hook_idintegerrequired

Body

application/json
* Additional properties are NOT allowed.
urlstring(uri)

The URL to which the payloads will be delivered.

Example:https://example.com/webhook

content_typestring

The media type used to serialize the payloads. Supported values include json and form. The default is form.

Example:"json"

secretstring

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

Example:"********"

insecure_sslOne Of
Variant 1string

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"

Response

200 application/json

Response

Webhook Configuration

Configuration object of the webhook

urlstring(uri)

The URL to which the payloads will be delivered.

Example:https://example.com/webhook

content_typestring

The media type used to serialize the payloads. Supported values include json and form. The default is form.

Example:"json"

secretstring

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

Example:"********"

insecure_sslOne Of
Variant 1string

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"

patch/orgs/{org}/hooks/{hook_id}/config

Body

{ "content_type": "json", "insecure_ssl": "0", "secret": "********", "url": "https://example.com/webhook" }
 
200 application/json

Ping an organization webhook

This will trigger a ping event to be sent to the hook.

post
http://HOSTNAME/api/v3/orgs/{org}/hooks/{hook_id}/pings

Path Parameters

orgstringrequired
hook_idintegerrequired

Response

Response

post/orgs/{org}/hooks/{hook_id}/pings
 

List app installations for an organization

Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read scope to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/installations

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

total_countintegerrequired
installationsarray[object]required

Installation

Show Child Parameters
get/orgs/{org}/installations
 
200 application/json