---
title: "CreateWebhook"
method: POST
path: "/registry/{registry_ref}/webhooks"
tags: ["Webhooks"]
---

# CreateWebhook

`POST /registry/{registry_ref}/webhooks`

Returns Webhook Details

## Path parameters

- `registry_ref` string, required

## Request body

- WebhookRequest
  - `identifier` string, required
  - `name` string, required
  - `description` string
  - `url` string, required
  - `enabled` boolean, required
  - `insecure` boolean, required
  - `secretIdentifier` string
  - `secretSpacePath` string
  - `secretSpaceId` integer
  - `triggers` Trigger[]
  - `extraHeaders` ExtraHeader[]
    - `key` string, required
    - `value` string, required
    - `masked` boolean

## Response `201`

response for create, get and update webhook

- object
  - `status` 'SUCCESS' | 'FAILURE' | 'ERROR', required — Indicates if the request was successful or not
  - `data` Webhook, required — Harness Regstries Webhook
    - `version` integer
    - `identifier` string, required
    - `name` string, required
    - `description` string
    - `url` string, required
    - `createdAt` string
    - `createdBy` integer
    - `modifiedAt` string
    - `enabled` boolean, required
    - `internal` boolean
    - `secretIdentifier` string
    - `secretSpacePath` string
    - `secretSpaceId` integer
    - `insecure` boolean, required
    - `triggers` Trigger[]
    - `latestExecutionResult` 'SUCCESS' | 'RETRIABLE_ERROR' | 'FATAL_ERROR' — refers to webhook execution
    - `extraHeaders` ExtraHeader[]
      - `key` string, required
      - `value` string, required
      - `masked` boolean

## Other responses

- `400` — Bad request
- `401` — Unauthenticated
- `403` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.net/harness/apis/harness-artifact-registry-api.md) · [All operations](https://skmtc.net/harness/apis/harness-artifact-registry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/harness/harness-artifact-registry-api/revisions/e315ed26a2f1/schema)
