---
title: "Changes to Create a webhook for a repository"
method: POST
path: "/repositories/{workspace}/{repo_slug}/hooks"
---

# Changes to Create a webhook for a repository

`POST /repositories/{workspace}/{repo_slug}/hooks`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 2 of 15 revisions.

- **2026-10-03** `869214428f35`: 2 breaking, 6 info
- **2026-07-13** `d344164ecb11`: 2 warning

## Changes

- **2026-10-03** `869214428f35`: 2 breaking, 6 info
  - added the new path request parameter `repo_slug`
  - added the new path request parameter `workspace`
  - api operation id `create_repository_hook` was added
  - added the optional property `allOf[subschema #2: Webhook Subscription]/links` to the response with the `201` status
  - the response optional property `allOf[subschema #2: Webhook Subscription]/created_at` became read-only for the status `201`
  - the response optional property `allOf[subschema #2: Webhook Subscription]/secret_set` became read-only for the status `201`
  - the response optional property `allOf[subschema #2: Webhook Subscription]/subject_type` became read-only for the status `201`
  - the response optional property `allOf[subschema #2: Webhook Subscription]/uuid` became read-only for the status `201`
- **2026-07-13** `d344164ecb11`: 2 warning
  - added the new `pipeline:span_created` enum value to the `allOf[subschema #2: Webhook Subscription]/events/items/` response property for the response status `201`
  - added the new `pullrequest:push` enum value to the `allOf[subschema #2: Webhook Subscription]/events/items/` response property for the response status `201`

---

[Operation](https://skmtc.dev/atlassian/apis/bitbucket-api/docs/repositories/:workspace/:repo_slug/hooks/post.md) - [API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [Page](https://skmtc.dev/atlassian/apis/bitbucket-api/changes/repositories/:workspace/:repo_slug/hooks/post)
