---
updatedAt: 2026-05-19T13:57:37.000Z
agentTools:
  projectIndex: https://trustmarkt.readme.io/llms.txt
---

# Create Webhook

Create a new webhook for the authenticated user's company.

The webhook will receive HTTP POST requests with event data when subscribed events occur.

A unique secret key is automatically generated for signature verification. **The secret key is only returned in the response when creating** or regenerating the webhook secret, so make sure to store it securely. If you lose the secret key, you can regenerate it using the "Regenerate Webhook Secret" endpoint, but this will invalidate the old secret immediately.

**The maximum number of webhooks allowed per company is 50**. If you have reached this limit, you will need to delete existing webhooks before creating new ones.

One webhook can be subscribed to multiple events, but each event can only be subscribed to once per webhook. For example, you cannot subscribe to the "review.created" event twice on the same webhook, but you can subscribe to both "review.created" and "review.updated" on the same webhook.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Trustmarkt API",
    "version": "1.1.0",
    "description": "Die offizielle API für Trustmarkt - Zugriff auf Reviews, Benutzer und Unternehmensdaten."
  },
  "servers": [
    {
      "url": "https://api.trustmarkt.de/v1",
      "description": "Prod."
    }
  ],
  "security": [
    {
      "http": []
    }
  ],
  "paths": {
    "/webhooks": {
      "post": {
        "operationId": "webhooks.store",
        "description": "Create a new webhook for the authenticated user's company.\n\nThe webhook will receive HTTP POST requests with event data when subscribed events occur.\n\nA unique secret key is automatically generated for signature verification. **The secret key is only returned in the response when creating** or regenerating the webhook secret, so make sure to store it securely. If you lose the secret key, you can regenerate it using the \"Regenerate Webhook Secret\" endpoint, but this will invalidate the old secret immediately.\n\n**The maximum number of webhooks allowed per company is 50**. If you have reached this limit, you will need to delete existing webhooks before creating new ones.\n\nOne webhook can be subscribed to multiple events, but each event can only be subscribed to once per webhook. For example, you cannot subscribe to the \"review.created\" event twice on the same webhook, but you can subscribe to both \"review.created\" and \"review.updated\" on the same webhook.",
        "summary": "Create Webhook",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`WebhookResource`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResource"
                }
              }
            }
          },
          "400": {
            "description": "Maximum number of webhooks reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error overview."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "http": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "StoreWebhookRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A descriptive name for the webhook. This is optional and helps identify the webhook in the dashboard.",
            "examples": [
              "Zapier Integration"
            ],
            "maxLength": 255
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL where webhook payloads will be delivered. Must be a valid HTTPS URL.",
            "examples": [
              "https://hooks.zapier.com/hooks/catch/123456/abcdef/"
            ],
            "maxLength": 2048
          },
          "events": {
            "type": "array",
            "description": "An array of event types to subscribe to. Each event type must be a valid webhook event. Use the /webhooks/events endpoint to get a list of available events.",
            "items": {
              "type": "string",
              "description": "A valid webhook event type.",
              "enum": [
                "article.created",
                "article.updated",
                "article.submitted",
                "article.published",
                "article.deleted",
                "review.created",
                "review.updated",
                "review.deleted",
                "inquiry.created",
                "inquiry.updated",
                "case_study.created",
                "case_study.updated",
                "case_study.published",
                "lead.created",
                "lead.verified",
                "resource.created",
                "resource.published",
                "resource.unpublished",
                "resource.deleted"
              ],
              "examples": [
                "review.created"
              ]
            },
            "minItems": 1
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the webhook should be active immediately after creation.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "StoreWebhookRequest"
      },
      "WebhookResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the webhook.",
            "examples": [
              "gYW1KaOqEpMdeMQrlwpV"
            ]
          },
          "company_id": {
            "type": "string",
            "description": "The unique identifier of the company the webhook belongs to.",
            "examples": [
              "XZzyJn9jEB1lWdvVRx6w"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A descriptive name for the webhook.",
            "examples": [
              "Zapier Integration"
            ]
          },
          "url": {
            "type": "string",
            "description": "The URL where webhook payloads will be delivered.",
            "examples": [
              "https://hooks.zapier.com/hooks/catch/123456/abcdef/"
            ]
          },
          "secret": {
            "type": "string",
            "description": "The secret key used to sign webhook payloads. Use this to verify the authenticity of incoming webhooks. Store this securely - it will only be shown once when creating or regenerating the webhook.",
            "examples": [
              "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
            ]
          },
          "events": {
            "type": "array",
            "description": "An array of event types the webhook is subscribed to.",
            "examples": [
              [
                "review.created",
                "review.updated"
              ]
            ],
            "items": {
              "type": "string"
            }
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the webhook is currently active and will receive event notifications.",
            "examples": [
              true
            ]
          },
          "last_triggered_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "The timestamp when the webhook was last triggered, or null if it has never been triggered.",
            "examples": [
              "2024-03-15T10:30:00.000000Z"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "The timestamp when the webhook was created.",
            "examples": [
              "2024-01-15T08:00:00.000000Z"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "The timestamp when the webhook was last updated.",
            "examples": [
              "2024-03-15T10:30:00.000000Z"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "name",
          "url",
          "events",
          "is_active",
          "last_triggered_at",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookResource"
      }
    },
    "responses": {
      "AuthenticationException": {
        "description": "Unauthenticated",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "ValidationException": {
        "description": "Validation error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Errors overview."
                },
                "errors": {
                  "type": "object",
                  "description": "A detailed description of each field that failed validation.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "required": [
                "message",
                "errors"
              ]
            }
          }
        }
      },
      "AuthorizationException": {
        "description": "Authorization error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      }
    }
  }
}
```