# Update a webhook endpoint

> PATCH /v1/webhook-endpoints/{endpoint_id} — Change the URL (re-verified with a signed test event first), the subscribed event types, or enable/disable delivery…

Page: https://getbioflow.com/docs/api-reference/updateWebhookEndpoint

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}



## PATCH /v1/webhook-endpoints/{endpoint_id}

Change the URL (re-verified with a signed test event first), the subscribed event types, or enable/disable delivery. Re-enabling resets the consecutive-failure counter; missed events can then be re-queued with Replay failed deliveries.

Requires scope: webhooks:write. Plan entitlement: public_api (Creator and Pro).

```json
{
  "servers": [
    {
      "url": "https://app.getbioflow.com"
    }
  ],
  "paths": {
    "/v1/webhook-endpoints/{endpoint_id}": {
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Update a webhook endpoint",
        "description": "Change the URL (re-verified with a signed test event first), the subscribed event types, or enable/disable delivery. Re-enabling resets the consecutive-failure counter; missed events can then be re-queued with Replay failed deliveries.\n\nRequires scope: webhooks:write. Plan entitlement: public_api (Creator and Pro).",
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-scopes": [
          "webhooks:write"
        ],
        "x-entitlement": "public_api",
        "x-meter-cost": 1,
        "x-idempotent": false,
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Endpoint ID from List webhook endpoints"
            },
            "required": true,
            "description": "Endpoint ID from List webhook endpoints"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated endpoint",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              },
              "RateLimit-Policy": {
                "description": "IETF draft-11 rate-limit policy (structured field).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "IETF draft-11 rate-limit state (structured field).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed (invalid_request)",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (invalid_api_key)",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Denied: insufficient_scope, feature_not_enabled, or test_key_read_only",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited: rate_limited (per-key burst) or quota_exhausted (monthly)",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected failure (internal_error)",
            "headers": {
              "X-Request-Id": {
                "description": "Unique request identifier — quote it in support requests.",
                "schema": {
                  "type": "string",
                  "example": "req_01abc"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UpdateWebhookEndpointRequest": {
        "type": "object",
        "properties": {
          "url": {
            "description": "New URL — re-verified with a signed test event first",
            "type": "string",
            "format": "uri"
          },
          "event_types": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "contact.created",
                "page.published",
                "sale.paid",
                "sale.refunded"
              ],
              "description": "A subscribable event type"
            }
          },
          "enabled": {
            "description": "true re-enables a disabled endpoint (and resets its failure count); false disables it",
            "type": "boolean"
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable opaque endpoint ID"
          },
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED"
            ]
          },
          "disabled_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "contact.created",
                "page.published",
                "sale.paid",
                "sale.refunded"
              ],
              "description": "A subscribable event type"
            }
          },
          "consecutive_failures": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "While set, the pre-rotation secret still signs deliveries (second signature)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "url",
          "status",
          "disabled_reason",
          "event_types",
          "consecutive_failures",
          "last_success_at",
          "last_failure_at",
          "previous_secret_expires_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false,
        "description": "A webhook endpoint. The whsec_ signing secret is returned ONLY by Create and Rotate secret — never here."
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Docs URL, https://getbioflow.com/docs/api/errors/<code>"
          },
          "title": {
            "type": "string",
            "description": "Human summary — never parse"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "HTTP status, mirrored in the body"
          },
          "detail": {
            "description": "Human detail — never parse",
            "type": "string"
          },
          "instance": {
            "type": "string",
            "example": "urn:request:req_01abc"
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_request",
              "invalid_api_key",
              "insufficient_scope",
              "feature_not_enabled",
              "test_key_read_only",
              "resource_not_found",
              "stale_snapshot",
              "endorsements_unconfirmed",
              "idempotency_in_progress",
              "idempotency_key_reused",
              "endpoint_verification_failed",
              "endpoint_limit_reached",
              "rate_limited",
              "quota_exhausted",
              "internal_error",
              "query_timeout"
            ],
            "description": "The stable machine-readable code — branch on this"
          },
          "request_id": {
            "type": "string",
            "example": "req_01abc"
          },
          "errors": {
            "description": "Field-level validation errors (400 only)",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "pointer": {
                  "type": "string",
                  "example": "/title"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "pointer",
                "code",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "instance",
          "code",
          "request_id"
        ],
        "additionalProperties": false,
        "description": "RFC 9457 problem details"
      }
    }
  }
}
```
