> ## 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).

## Parameters

| 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, 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 surrounded by curly-braces, for example: `{workspace UUID}`. |

## 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"
}
```
