Войти в ЛК
POST/api/v1/external/webhook

Create a new webhook

🔒 Bearer Token

Request Body

application/jsonrequired
idinteger (int64)

Webhook ID

urlstringrequired

Webhook request URL

Пример: https://example.com/webhook

tokenstring

Token for webhook request

authorizationHeaderPrefixstring

Authorization header prefix

Пример: Bearer

eventsstring[]

Set of event types to subscribe

entitiesstring[]

Set of entity types to subscribe

Responses

curl -X POST \
  'http://dev-backend-1.guestme.space/api/v1/external/webhook' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "url": "https://example.com/webhook",
    "token": "string",
    "authorizationHeaderPrefix": "Bearer",
    "events": [
      "CREATE"
    ],
    "entities": [
      "RESTAURANT"
    ]
  }'
Response
{
  "id": 0,
  "url": "https://example.com/webhook",
  "token": "string",
  "authorizationHeaderPrefix": "Bearer",
  "events": [
    "CREATE"
  ],
  "entities": [
    "RESTAURANT"
  ]
}