---
title: "Enable/disable webhook"
method: POST
path: "/api/settings/webhooks/{webhookId}/{action}"
tags: ["webhooks"]
---

# Enable/disable webhook

`POST /api/settings/webhooks/{webhookId}/{action}`

## Path parameters

- `webhookId` string, required
- `action` 'enable' | 'disable', required

## Response `200`

Updated webhook

- object
  - `webhook` object, required — Webhook
    - `id` string, required
    - `url` string, uri
    - `job` object
      - `dockerImage` string
      - `spaceId` string
      - `environment` object, required
      - `arguments` string[]
      - `command` string[]
      - `flavor` 'cpu-basic' | 'cpu-upgrade' | 'cpu-performance' | 'cpu-xl' | 'sprx8' | 'zero-a10g' | 't4-small' | 't4-medium' | 'l4x1' | 'l4x4' | 'l40sx1' | 'l40sx4' | 'l40sx8' | 'a10g-small' | 'a10g-large' | 'a10g-largex2' | 'a10g-largex4' | 'a100-large' | 'a100x4' | 'a100x8' | 'h200' | 'h200x2' | 'h200x4' | 'h200x8' | 'rtx-pro-6000' | 'rtx-pro-6000x2' | 'rtx-pro-6000x4' | 'rtx-pro-6000x8' | 'inf2x6', required
      - `timeoutSeconds` integer, nullable, required
      - `labels` object — Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.
      - `secrets` string[]
    - `jobSourceId` string
    - `disabled` union, required
      - boolean
      - 'suspended-after-failure'
    - `watched` object[], required
      - `name` string, required
      - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'user' | 'org', required
      - `avatarUrl` string
    - `hasSecret` boolean, required — Whether the webhook has a secret (the secret itself is never returned)
    - `domains` string[], required
    - `lastTriggerAt` string, date-time

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/8443210055e0/schema)
