Skip to content

List subscribable webhook types

GET
/hook_events/{subject_type}

Returns a paginated list of all valid webhook events for the specified entity. The team and user webhooks are deprecated, and you should use workspace instead. For more information, see the announcement.

This is public data that does not require any scopes or authentication.

NOTE: The example response is a truncated response object for the workspace subject_type. We return the same structure for the other subject_type objects.

subject_type
required
string
Allowed values: repository workspace

A resource or subject type.

A paginated list of webhook types available to subscribe on.

Media type application/json
Paginated Hook Events

A paginated list of webhook types available to subscribe on.

object
size

Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.

integer
page

Page number of the current results. This is an optional element that is not provided in all responses.

integer
>= 1
pagelen

Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.

integer
>= 1
next

Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.

string format: uri
previous

Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.

string format: uri
values
Array<object>
0 unique items
Hook Event

An event, associated with a resource or subject type.

object
event

The event identifier.

string
Allowed values: issue:comment_created issue:created issue:updated pipeline:span_created project:updated pullrequest:approved pullrequest:changes_request_created pullrequest:changes_request_removed pullrequest:comment_created pullrequest:comment_deleted pullrequest:comment_reopened pullrequest:comment_resolved pullrequest:comment_updated pullrequest:created pullrequest:fulfilled pullrequest:push pullrequest:rejected pullrequest:unapproved pullrequest:updated repo:commit_comment_created repo:commit_status_created repo:commit_status_updated repo:created repo:deleted repo:fork repo:imported repo:push repo:transfer repo:updated
category

The category this event belongs to.

string
label

Summary of the webhook event type.

string
description

More detailed description of the webhook event type.

string
Examples
Example response
{
"page": 1,
"pagelen": 30,
"size": 4,
"values": [
{
"category": "Repository",
"description": "Whenever a repository push occurs",
"event": "repo:push",
"label": "Push"
},
{
"category": "Repository",
"description": "Whenever a repository fork occurs",
"event": "repo:fork",
"label": "Fork"
},
{
"category": "Repository",
"description": "Whenever a repository import occurs",
"event": "repo:imported",
"label": "Import"
},
{
"category": "Pull Request",
"label": "Approved",
"description": "When someone has approved a pull request",
"event": "pullrequest:approved"
}
]
}

If an invalid {subject_type} value was specified.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}