> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Repo Web Hook

Creates a new webhook on the specified repository.

Example:

```
$ curl -X POST -u credentials -H 'Content-Type: application/json'
  https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks
  -d '
    {
      "description": "Webhook Description",
      "url": "https://example.com/",
      "active": true,
      "events": [
        "repo:push",
        "issue:created",
        "issue:updated"
      ]
    }'
```

Note that this call requires the webhook scope, as well as any scope
that applies to the events that the webhook subscribes to. In the
example above that means: `webhook`, `repository` and `issue`.

Also note that the `url` must properly resolve and cannot be an
internal, non-routed address.

<Note>
  External Documentation

  To learn more, visit the [Bitbucket documentation](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-hooks-post).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                              |
  | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  | Active         | Select to activate this webhook.                                                                                                         |
  | Description    | A user-defined description of the webhook.                                                                                               |
  | Events         | The events this webhook is subscribed to.                                                                                                |
  | Repo Slug      | This can either be the repository slug or the UUID of the repository,<br />surrounded by curly-braces, for example: `{repository UUID}`. |
  | URL            | The URL events get delivered to.                                                                                                         |
  | Workspace Slug | This can either be the workspace ID (slug) or the workspace UUID<br />surrounded by curly-braces, for example: `{workspace UUID}`.       |
</div>

## Example Output

```json theme={"dark"}
{
	"active": false,
	"created_at": "date-time",
	"description": "A user-defined description of the webhook.",
	"events": [
		"string"
	],
	"subject": {
		"type": "string"
	},
	"subject_type": "The type of entity, which is `repository` in the case of webhook subscriptions on repositories.",
	"type": "string",
	"url": "The URL events get delivered to.",
	"uuid": "The webhook's id"
}
```

## Workflow Library Example

[Create Repo Web Hook with Bitbucket and Send Results Via Email](https://library.blinkops.com/workflows/create-repo-web-hook-with-bitbucket-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/create-repo-web-hook-with-bitbucket-and-send-results-via-email/canvas" />
</div>
