Add a webhook to a project
Adds a webhook to a specified project.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body required
Section titled “ Request Body required ”object
The URL to send the request to
Example
http://example.com/hookName of the hook
Description of the hook
Trigger hook on push events
Trigger hook on issues events
Trigger hook on confidential issues events
Trigger hook on merge request events
Trigger hook on tag push events
Trigger hook on note (comment) events
Trigger hook on confidential note (comment) events
Trigger hook on job events
Trigger hook on pipeline events
Trigger hook on wiki events
Trigger hook on deployment events
Trigger hook on feature flag events
Trigger hook on release events
Trigger hook on milestone events
Trigger hook on emoji events
Trigger hook on project access token expiry events
Trigger hook on deploy token expiry events
Do SSL verification when triggering the hook
Secret token to validate received payloads; this will not be returned in the response
HMAC signing token used to compute the webhook-signature header. Must be in whsec_
Trigger hook on specified branch only
Custom template for the request payload
Filter push events by branch. Possible values are wildcard (default), regex, and all_branches
Trigger hook on vulnerability events
URL variables for interpolation
object
Name of the variable
Example
tokenValue of the variable
Example
123Custom headers
object
Name of the header
Example
X-Custom-HeaderValue of the header
Example
valueResponses
Section titled “ Responses ”Created
object
object
object
Whether a secret token is configured
Whether an HMAC signing token is configured
Example
{ "id": 1, "url": "https://webhook.site", "name": "Hook name", "description": "Hook description", "created_at": "2012-05-28T04:42:42-07:00", "organization_id": 1, "alert_status": ":executable", "disabled_until": "2012-05-28T04:42:42-07:00", "url_variables": [ { "token": "secr3t" } ], "push_events_branch_filter": "my-branch-*", "branch_filter_strategy": "wildcard", "custom_webhook_template": "{\"event\":\"{{object_kind}}\"}", "custom_headers": [ { "X-Custom-Header": "value" } ], "token_present": false, "signing_token_present": false, "project_id": 1}Validation error
Not found
Unprocessable entity