Skip to content

Update a webhook

Request

Updates an existing webhook (URL, events, headers, auth).

Use this endpoint to:

  • Change the target URL
  • Add/remove subscribed event types
  • Update authentication headers
  • Reactivate a suspended webhook (update it with the corrected URL)
Security
bearerAuth
Path
hookIdintegerrequired

ID of the webhook to update.

Example:42
Bodyapplication/jsonrequired
urlstring or null, (uri)

New target URL.

Example:"https://new-portail.example.com/webhook"
originesArray of strings or null

Updated list of event types (replaces the current list entirely).

Example:
[ "CUSTOMER_CREATE", "PRODUCT_UPDATE", "PRODUCT_DELETE" ]
headersobject or null

Updated custom headers (replaces entirely).

Example:
{ "X-Api-Key": "new-secret" }
auth_idinteger or null

Updated webhook auth configuration ID.

formatstring or null

Updated format identifier.

curl -i -X PUT \
  https://api-doc.immo-facile.com/_mock/openapi/hooks/42 \
  -H 'Authorization: Bearer <YOUR_opaque_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://new-portail.example.com/webhook",
    "origines": [
      "CUSTOMER_CREATE",
      "PRODUCT_UPDATE",
      "PRODUCT_DELETE"
    ],
    "headers": {
      "X-Api-Key": "new-secret"
    }
  }'

Responses

Webhook updated

Bodyapplication/json
dataobject(WebhookResponse)

A registered webhook subscription.

Response
{ "data": { "id": 42, "url": "https://portail.example.com/webhook", "headers": {}, "authId": 0, "format": "string", "origines": [] } }