X-Webhook-Source header
Stop your own API writes from being echoed back to you as outbound webhook events.
If your system both writes to Centerfy through the API and subscribes to outbound webhooks, every change you make would come straight back as an event, and a naive integration would write it again. The X-Webhook-Source header breaks that loop.
How it works
- Give your outbound webhook subscription a Source label, for example
my-crm(in Settings → API & Webhooks → Webhooks, or thesourcefield of Create an outbound webhook). - Send the same label on your API requests:
curl -X PATCH "https://api.centerfy.ai/webhooks/inbound/contacts/{id}" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "X-Webhook-Source: my-crm" \
-H "Content-Type: application/json" \
-d '{ "name": "Jane Doe" }'
- Changes tagged with
my-crmare not delivered to webhooks whose Source ismy-crm. Every other subscriber still receives them.
The header is optional everywhere and ignored by endpoints that don’t produce outbound events.
With the Node SDK pass it once in defaultHeaders:
const centerfy = new CenterfyClient({
apiKey: process.env.CENTERFY_API_KEY!,
defaultHeaders: { "X-Webhook-Source": "my-crm" },
});