Войти в ЛК
PUT/api/v1/external/webhook/{id}

Update a webhook

🔒 Bearer Token

Path Parameters

idinteger (int64)required

Webhook ID

Пример: 1001

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 PUT \
  'http://dev-backend-1.guestme.space/api/v1/external/webhook/1001' \
  -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"
  ]
}