GitHub v3 REST API

Update a global webhook

Parameters that are not provided will be overwritten with the default value or removed if no default exists.

patch
{protocol}://{hostname}/api/v3/admin/hooks/{hook_id}

Path Parameters

hook_idintegerrequired

Headers

acceptstringrequired

This API is under preview and subject to change.

Default:application/vnd.github.superpro-preview+json

Body

application/json
configobject

Key/value pairs to provide settings for this webhook.

Show Child Parameters
eventsarray[string]

The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.

activeboolean

Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.

Default:true

Response

200 application/json

Response

global-hook-2

typestring
idinteger
namestring
activeboolean
eventsarray[string]
configobject
Show Child Parameters
updated_atstring
created_atstring
urlstring
ping_urlstring
patch/admin/hooks/{hook_id}

Body

{ "events": [ "organization" ], "config": { "url": "https://example.com/webhook" } }
 
200 application/json

Delete a global webhook

delete
{protocol}://{hostname}/api/v3/admin/hooks/{hook_id}

Path Parameters

hook_idintegerrequired

Headers

acceptstringrequired

This API is under preview and subject to change.

Default:application/vnd.github.superpro-preview+json

Response

204

Response

delete/admin/hooks/{hook_id}
 
204

Ping a global webhook

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

post
{protocol}://{hostname}/api/v3/admin/hooks/{hook_id}/pings

Path Parameters

hook_idintegerrequired

Headers

acceptstringrequired

This API is under preview and subject to change.

Default:application/vnd.github.superpro-preview+json

Response

204

Response

post/admin/hooks/{hook_id}/pings
 
204

List public keys

get
{protocol}://{hostname}/api/v3/admin/keys

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

directionstring

One of asc (ascending) or desc (descending).

Allowed values:ascdesc

Default:desc

sortstring

Allowed values:createdupdatedaccessed

Default:created

sincestring

Only show public keys accessed after the given time.

Response

200 application/json

Response

idintegerrequired
keystringrequired
user_idinteger | nullrequired
repository_idinteger | nullrequired
urlstringrequired
titlestringrequired
read_onlybooleanrequired
verifiedbooleanrequired
created_atstring(date-time)required
last_usedstring | null(date-time)required
get/admin/keys
 
200 application/json

Delete a public key

delete
{protocol}://{hostname}/api/v3/admin/keys/{key_ids}

Path Parameters

key_idsstringrequired

Response

204

Response

delete/admin/keys/{key_ids}
 
204