> ## 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.
# Rotate webhook secret
> Rotates the signing secret for an existing webhook subscription and returns the active new secret.
Behavior:
- Use this when rotating credentials on the receiving system.
- If request body contains secret, that value is stored as the new signing secret.
- If request body is omitted or secret is blank, a secure secret is generated.
- The rotated secret is returned in the response body.
- Future webhook deliveries are signed with the new secret.
- Clients should update their signature verification configuration after rotation.
## OpenAPI
````json POST /api/webhooks-management/webhooks/{id}/rotate-secret
{
"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}/rotate-secret": {
"post": {
"tags": [
"Webhooks Management"
],
"summary": "Rotate webhook secret",
"description": "Rotates the signing secret for an existing webhook subscription and returns the active new secret.
Behavior:
- Use this when rotating credentials on the receiving system.
- If request body contains secret, that value is stored as the new signing secret.
- If request body is omitted or secret is blank, a secure secret is generated.
- The rotated secret is returned in the response body.
- Future webhook deliveries are signed with the new secret.
- Clients should update their signature verification configuration after rotation.",
"operationId": "rotateSecret",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Webhook subscription identifier.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SecretRotateRequestDTO"
}
}
}
},
"responses": {
"200": {
"description": "Webhook secret rotated successfully. Returns the rotated secret.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SecretRotateResponseDTO"
},
"example": {
"id": 1,
"secret": "whsec_77af8290bc0192",
"updated_at": "2026-01-27T16:05:00Z"
}
}
}
},
"404": {
"description": "Webhook subscription was not found for this company.",
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "Webhook not found"
}
}
}
}
}
}
},
"components": {
"schemas": {
"SecretRotateRequestDTO": {
"type": "object",
"properties": {
"secret": {
"type": "string",
"description": "New signing secret to store for the webhook. If omitted or blank, a secure secret is generated.",
"nullable": true,
"example": "whsec_77af8290bc0192"
}
},
"description": "Optional request body for rotating a webhook signing secret."
},
"SecretRotateResponseDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"secret": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"securitySchemes": {
"Keycloak": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}
````