---
title: "Update webhook (name, url, events, active)"
method: PATCH
path: "/api/workspaces/{workspaceId}/webhooks/{webhookId}"
tags: ["Webhooks"]
---

# Update webhook (name, url, events, active)

`PATCH /api/workspaces/{workspaceId}/webhooks/{webhookId}`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/webhooks/{webhookId}`
- Auth: API key in cookie `hiveship_access`

## Path parameters

- `webhookId` string, required

## Request body

- object
  - `name` string
  - `url` string, uri
  - `events` string[]
  - `active` boolean

## Response `200`

Updated webhook (secret not included)

- object
  - `success` boolean, required
  - `data` object, required
    - `id` string, cuid, required
    - `name` string, required
    - `url` string, uri, required
    - `events` string[], required
    - `active` boolean, required
    - `lastSuccessAt` string, date-time, nullable, required
    - `lastFailureAt` string, date-time, nullable, required
    - `consecutiveFailureCount` integer, required
    - `disabledAt` string, date-time, nullable, required
    - `disabledReason` string, nullable, required
    - `workspaceId` string, cuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Validation error
- `403`: Requires workspace OWNER or ADMIN
- `404`: Webhook not found

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
