> ## 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. # Register webhook > Registers a webhook callback URL for the company.

Behavior:
- Checks whether another webhook with the same URL already exists for this company.
- If a duplicate exists, registration is rejected and no new webhook is created.
- If no duplicate exists, verifies the callback URL before saving.
- The callback URL must use HTTPS and include a valid hostname.
- Verification works by performing request to the callback URL via POST — the exact same delivery mechanism (HMAC-signed with X-Webhook-Signature/X-Webhook-Timestamp headers, JSON body in the same event format) used for every subsequent event.
- The verification event has event_type webhook.url.verification and a message in its data field, e.g. {"message":"This is webhook url verification request"}. It is signed with the secret being stored for this webhook.
- Verification is a single delivery attempt with no retries; it succeeds only if the callback accepts the request without a 4xx/5xx response and without a DNS, TLS, timeout, or other connection error.
- If verification fails, the webhook is not created.
- On success, the webhook is created as ACTIVE with failures_count set to 0.
- If secret is not provided, a secure secret is generated and stored for signature verification.

Delivered callback payload:
- After registration, matching events are sent to the callback URL as JSON payloads.
- Each payload contains id, event_type, api_version, created_at, company_id, event_id, and data.
- The event_type field identifies the notification and determines the contents of data:
- variant.added: A variant was added.
- variant.updated: An existing variant was updated.
- variant.upserted: A variant was created or updated.
- variant.deleted: A variant was deleted.
- variant.processing.failed: A variant could not be processed; data.error contains the error code and message.
- webhook.url.verification: A verification message checks that the callback URL accepts deliveries.
- Use event_type to interpret data. See Send a test webhook event for the payload structure and examples.
- Event id is stable across retries, so receivers can use it for deduplication.

Status lifecycle:
- New webhooks are created as ACTIVE.
- Events are delivered only to operational webhooks: ACTIVE and FAILING.
- PAUSED and ARCHIVED webhooks do not receive events.
- If delivery fails after all retry attempts, an ACTIVE webhook becomes FAILING.
- While FAILING, delivery continues for matching events and the failure counter is incremented on each failed delivery.
- A successful delivery resets failure counters and moves a FAILING webhook back to ACTIVE.
- Persistent failures automatically move a webhook to ARCHIVED when auto-archive is enabled.
- Current auto-archive defaults are 100 consecutive failures or failures lasting 48 hours.
- Use the update endpoint to manually pause or reactivate a webhook by changing status. ### Webhook delivery headers Notifications, including webhook.url.verification, are sent as HTTP POST requests with an application/json body to the registered receiver URL. Each delivery includes these headers: - **X-Webhook-Timestamp**: Unix timestamp in seconds for the current delivery attempt. Example: 1769529900. This is the delivery time; the payload's created_at records when the event occurred. A retry can have a new delivery timestamp and signature. - **X-Webhook-Signature**: Signature in the format t=timestamp,v1=signature. t matches X-Webhook-Timestamp. v1 is the 64-character lowercase hexadecimal HMAC-SHA256 of the UTF-8 string timestamp + "." + rawRequestBody, using the subscription's secret encoded as UTF-8 as the key. Example delivery headers (the signature is illustrative): - X-Webhook-Timestamp: 1769529900 - X-Webhook-Signature: t=1769529900,v1=8f2c1a4e9b6d7f0032a5c8e1d4b9f670a3e2c5d8b1f496007ead32c6f5b89014 To verify a delivery, check that both timestamp values match, recompute the signature using the original JSON body without parsing or reformatting it, and compare it with v1 using a constant-time comparison. Reject timestamps outside an acceptable clock-skew window (for example, five minutes) to limit replay attacks. Deduplicate notifications using the payload's id, which remains unchanged across retries. These headers are sent to your receiver; they are not required on calls to this management API. ## OpenAPI ````json POST /api/webhooks-management/webhooks { "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": { "post": { "tags": [ "Webhooks Management" ], "summary": "Register webhook", "description": "Registers a webhook callback URL for the company.

Behavior:
- Checks whether another webhook with the same URL already exists for this company.
- If a duplicate exists, registration is rejected and no new webhook is created.
- If no duplicate exists, verifies the callback URL before saving.
- The callback URL must use HTTPS and include a valid hostname.
- Verification works by performing request to the callback URL via POST — the exact same delivery mechanism (HMAC-signed with X-Webhook-Signature/X-Webhook-Timestamp headers, JSON body in the same event format) used for every subsequent event.
- The verification event has event_type webhook.url.verification and a message in its data field, e.g. {\"message\":\"This is webhook url verification request\"}. It is signed with the secret being stored for this webhook.
- Verification is a single delivery attempt with no retries; it succeeds only if the callback accepts the request without a 4xx/5xx response and without a DNS, TLS, timeout, or other connection error.
- If verification fails, the webhook is not created.
- On success, the webhook is created as ACTIVE with failures_count set to 0.
- If secret is not provided, a secure secret is generated and stored for signature verification.

Delivered callback payload:
- After registration, matching events are sent to the callback URL as JSON payloads.
- Each payload contains id, event_type, api_version, created_at, company_id, event_id, and data.
- The event_type field identifies the notification and determines the contents of data:
- variant.added: A variant was added.
- variant.updated: An existing variant was updated.
- variant.upserted: A variant was created or updated.
- variant.deleted: A variant was deleted.
- variant.processing.failed: A variant could not be processed; data.error contains the error code and message.
- webhook.url.verification: A verification message checks that the callback URL accepts deliveries.
- Use event_type to interpret data. See Send a test webhook event for the payload structure and examples.
- Event id is stable across retries, so receivers can use it for deduplication.

Status lifecycle:
- New webhooks are created as ACTIVE.
- Events are delivered only to operational webhooks: ACTIVE and FAILING.
- PAUSED and ARCHIVED webhooks do not receive events.
- If delivery fails after all retry attempts, an ACTIVE webhook becomes FAILING.
- While FAILING, delivery continues for matching events and the failure counter is incremented on each failed delivery.
- A successful delivery resets failure counters and moves a FAILING webhook back to ACTIVE.
- Persistent failures automatically move a webhook to ARCHIVED when auto-archive is enabled.
- Current auto-archive defaults are 100 consecutive failures or failures lasting 48 hours.
- Use the update endpoint to manually pause or reactivate a webhook by changing status.\n\n### Webhook delivery headers\n\nNotifications, including webhook.url.verification, are sent as HTTP POST requests with an\napplication/json body to the registered receiver URL. Each delivery includes these headers:\n\n- **X-Webhook-Timestamp**: Unix timestamp in seconds for the current delivery attempt.\n Example: 1769529900. This is the delivery time; the payload's created_at records when\n the event occurred. A retry can have a new delivery timestamp and signature.\n- **X-Webhook-Signature**: Signature in the format t=timestamp,v1=signature.\n t matches X-Webhook-Timestamp. v1 is the 64-character lowercase hexadecimal\n HMAC-SHA256 of the UTF-8 string timestamp + \".\" + rawRequestBody, using the\n subscription's secret encoded as UTF-8 as the key.\n\nExample delivery headers (the signature is illustrative):\n\n- X-Webhook-Timestamp: 1769529900\n- X-Webhook-Signature: t=1769529900,v1=8f2c1a4e9b6d7f0032a5c8e1d4b9f670a3e2c5d8b1f496007ead32c6f5b89014\n\nTo verify a delivery, check that both timestamp values match, recompute the signature using\nthe original JSON body without parsing or reformatting it, and compare it with v1 using\na constant-time comparison. Reject timestamps outside an acceptable clock-skew window\n(for example, five minutes) to limit replay attacks. Deduplicate notifications using the\npayload's id, which remains unchanged across retries.\n\nThese headers are sent to your receiver; they are not required on calls to this management API.\n", "operationId": "register", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookRegisterRequestDTO" } } }, "required": true }, "responses": { "400": { "description": "Invalid request.

Returned when:
- Validation fails.
- event_types is empty.
- The URL format is invalid.
- A webhook with the same URL already exists for this company.", "content": { "text/plain": { "example": "Webhook with URL 'https://api.yoursite.com/webhook' already exists for this company and workspace" } } }, "201": { "description": "Webhook registered successfully. Returns the created 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": "ACTIVE", "secret": "whsec_77af8290bc0192", "createdAt": "2026-01-27T16:05:00Z", "updatedAt": "2026-01-27T16:05:00Z", "failuresCount": 0 } } } }, "422": { "description": "Callback URL verification failed. The webhook is not created.

Possible causes:
- Non-HTTPS URL.
- Private or unresolvable host.
- TLS error.
- Timeout or connection failure.
- 4xx/5xx callback response.
- Any non-2xx verification response.", "content": { "text/plain": { "example": "Only HTTPS URLs are supported. Please use https:// scheme." } } } } } } }, "components": { "schemas": { "WebhookRegisterRequestDTO": { "required": [ "event_types", "url" ], "type": "object", "properties": { "url": { "pattern": "^https?://.+", "type": "string", "description": "Target URL to receive webhook events", "example": "https://api.yoursite.com/webhook" }, "secret": { "type": "string", "description": "Optional secret for signing payloads, if not provided a secure secret will be generated", "nullable": true, "example": "whsec_77af8290bc...0192" }, "event_types": { "type": "array", "description": "Event types to subscribe to", "example": [ "variant.added", "variant.processing.failed" ], "items": { "type": "string", "description": "Event types to subscribe to", "example": "[\"variant.added\",\"variant.processing.failed\"]", "enum": [ "variant.added", "variant.updated", "variant.upserted", "variant.deleted", "variant.processing.failed", "webhook.url.verification" ] } } }, "description": "Register webhook request" }, "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" } } } } ````