---
title: "Create a new webhook endpoint"
method: POST
path: "/api/v1/webhook-endpoints"
tags: ["Webhook endpoints"]
---

# Create a new webhook endpoint

`POST /api/v1/webhook-endpoints`

## Request

- Base URL: `https://api.sudomock.com`
- URL: `https://api.sudomock.com/api/v1/webhook-endpoints`
- Auth: API key in header `x-api-key`

Create an endpoint. The signing secret is returned in FULL here, once.

## Request body

- WebhookEndpointCreateRequest: Create a webhook endpoint.
  - `url` string, required: https endpoint URL
  - `description` string, nullable: Optional label that helps you recognize this endpoint.
  - `event_types` string[]: Subscribed event types; empty = all events (wildcard).
  - `event_naming` 'legacy' | 'current', nullable: Which spelling of the photo-mockup events this endpoint receives: 'current' (photo_mockup.*, photo_mockup_render.*) or 'legacy' (2d_mockup.*, 2d_render.*). The payload's kind follows. Omit it and the endpoint is pinned to the spelling event_types is written in: the family names for a list that subscribes to them, otherwise 'legacy', the spelling this contract publishes.

## Response `201`

Successful Response

- WebhookEndpointSecretResponse: Returned ONLY by create + rotate-secret: the FULL plaintext secret. Overrides the masked `secret` field with the real value (shown once).
  - `id` string, required: Unique identifier for the webhook endpoint.
  - `url` string, required: The https URL that receives this endpoint's events.
  - `secret` string, required: FULL signing secret. Shown only once.
  - `description` string, nullable: Your label for this endpoint.
  - `event_types` string[]: Event types this endpoint receives; an empty list means every event.
  - `enabled` boolean, required: Whether this endpoint currently receives events.
  - `event_naming` string: The event-name spelling this endpoint is pinned to: 'legacy' or 'current'.
  - `created_at` string, date-time, required: Time the endpoint was created.
  - `updated_at` string, date-time, nullable: Time the endpoint was last updated.

---

[API](https://skmtc.dev/sudomock/apis/sudomock-api.md) · [All operations](https://skmtc.dev/sudomock/apis/sudomock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sudomock/apis/sudomock-api/revisions/c1cc24006c60?raw)
