> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Update webhook
> Updates an existing webhook subscription.
Behavior:
- At least one of url, status, or event_types must be provided.
- Updating status changes whether the webhook is active, paused, failing, or archived.
- Updating event_types replaces the subscribed event list.
- Updating url checks that no other webhook for the company already uses the new URL.
- Updating url also verifies the new callback URL using the same verification used during registration: a single request is performed to the new URL via POST — the exact same delivery mechanism (HMAC-signed with X-Webhook-Signature/X-Webhook-Timestamp headers, JSON body shaped like WebhookEventDTO, data payload of type WebhookUrlVerificationDataDTO) used for every subsequent event.
- This verification event is signed with the webhook's current stored secret (unchanged by this call).
- Verification succeeds only if the callback accepts the request without a 4xx/5xx response and without a DNS, TLS, timeout, or other connection error; there are no retries.
- If URL verification fails, the webhook is not updated.
- For security, secret is returned only during registration and secret rotation.
- In update responses, secret is intentionally sanitized and returned as null.
## OpenAPI
````json PATCH /api/webhooks-management/webhooks/{id}
{
"openapi": "3.0.1",
"info": {
"title": "Product Catalog API",
"version": "1.0.0",
"x-source-versions": {
"upc": "1.0.3",
"webhooks": "1.0.0"
}
},
"servers": [
{
"url": "https://api.mapp.com"
}
],
"security": [
{
"Keycloak": []
}
],
"tags": [
{
"name": "Variant Data Bulk Operations",
"description": "Endpoints for variant data bulk operations"
},
{
"name": "Variant Data Operations",
"description": "Endpoints for variant data operations"
},
{
"name": "Catalog Metadata Operations",
"description": "Endpoints for catalog metadata operations"
},
{
"name": "Product Data Operations",
"description": "Endpoints for product data operations"
},
{
"name": "Webhooks Management",
"description": "Manage webhook subscriptions. See Register webhook for delivery headers and signature verification."
}
],
"paths": {
"/api/webhooks-management/webhooks/{id}": {
"patch": {
"tags": [
"Webhooks Management"
],
"summary": "Update webhook",
"description": "Updates an existing webhook subscription.
Behavior:
- At least one of url, status, or event_types must be provided.
- Updating status changes whether the webhook is active, paused, failing, or archived.
- Updating event_types replaces the subscribed event list.
- Updating url checks that no other webhook for the company already uses the new URL.
- Updating url also verifies the new callback URL using the same verification used during registration: a single request is performed to the new URL via POST — the exact same delivery mechanism (HMAC-signed with X-Webhook-Signature/X-Webhook-Timestamp headers, JSON body shaped like WebhookEventDTO, data payload of type WebhookUrlVerificationDataDTO) used for every subsequent event.
- This verification event is signed with the webhook's current stored secret (unchanged by this call).
- Verification succeeds only if the callback accepts the request without a 4xx/5xx response and without a DNS, TLS, timeout, or other connection error; there are no retries.
- If URL verification fails, the webhook is not updated.
- For security, secret is returned only during registration and secret rotation.
- In update responses, secret is intentionally sanitized and returned as null.",
"operationId": "update",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Webhook subscription identifier.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookUpdateRequestDTO"
}
}
},
"required": true
},
"responses": {
"422": {
"description": "New callback URL verification failed. The webhook is not updated.",
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "Verification request timed out after 3000ms. Please ensure the endpoint responds quickly."
}
}
},
"200": {
"description": "Webhook updated successfully. Returns the updated webhook subscription.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookSubscriptionDTO"
},
"example": {
"id": 1,
"creatorId": 300,
"url": "https://api.yoursite.com/webhook",
"eventTypes": [
"variant.added"
],
"status": "PAUSED",
"secret": null,
"createdAt": "2026-01-27T16:05:00Z",
"updatedAt": "2026-01-27T16:10:00Z",
"failuresCount": 0
}
}
}
},
"404": {
"description": "Webhook subscription was not found for this company.",
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "Webhook not found"
}
}
},
"400": {
"description": "Invalid update request.
Returned when:
- The request body is empty.
- status is unsupported.
- event_types is empty when provided.
- Another webhook already uses the requested URL.",
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "Unsupported status: disabled"
}
}
}
}
}
}
},
"components": {
"schemas": {
"WebhookUpdateRequestDTO": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "New URL",
"nullable": true,
"example": "https://example.com/webhook"
},
"status": {
"type": "string",
"description": "New status",
"nullable": true,
"example": "paused",
"enum": [
"active",
"paused"
]
},
"event_types": {
"maxItems": 2147483647,
"minItems": 1,
"type": "array",
"description": "New event types",
"nullable": true,
"example": [
"variant.added"
],
"items": {
"maxLength": 2147483647,
"minLength": 1,
"type": "string",
"description": "New event types",
"nullable": true,
"example": "[\"variant.added\"]",
"enum": [
"variant.added",
"variant.updated",
"variant.upserted",
"variant.deleted",
"variant.processing.failed",
"webhook.url.verification"
]
}
}
},
"description": "Update webhook request; provide status and/or event_types and/or url"
},
"WebhookSubscriptionDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"creatorId": {
"type": "integer",
"format": "int64"
},
"url": {
"type": "string"
},
"eventTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
},
"secret": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"failuresCount": {
"type": "integer",
"format": "int64"
},
"firstFailureAt": {
"type": "string",
"format": "date-time"
},
"lastFailureAt": {
"type": "string",
"format": "date-time"
},
"lastSuccessAt": {
"type": "string",
"format": "date-time"
}
}
}
},
"securitySchemes": {
"Keycloak": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}
````