An authorised server can use an Owner session or the organisation API credential. Admin and Member sessions cannot retrieve it. Store it on the receiving server. Without organisations, the webhook signing secret is only the owning credential’s
KEY_SECRET part. In either mode pass the webhook signing secret as keySecret to the Node verifier.
NOT OFFERED → do this instead · number call.bookings has no account field or per-number secret. After signature verification, look up number in your own tenant table. It is the business to number inbound and from number outbound.
YOU CAN CHANGE · number Set delivery destinations per number. Pre-call settings can be scoped to an agent or number. Keep the delivery destination and your signature-verification secret separate.
SCOPE · operation Verify X-Nixflex-Signature (t=<timestamp>,v1=<hex>) with HMAC-SHA256 over timestamp + ”.” + the original raw request body. Compare the digest in constant time and enforce a freshness policy before trusting the payload.
Read the compact AI rules
Build an HTTPS receiver that verifies Nixflex events, saves them durably and handles repeated delivery without repeating business actions.
Verification: Exact raw body ·
Acceptance: Durable save before 2xx ·
Recovery: Authenticated call reads
The important part
- Verify the signature before parsing or executing any business action.
- Deduplicate call events by trusted account, event name and call ID; SMS needs its separate identity rules.
- Delivery may be delayed or missed. An unsigned reachability test cannot prove signed-event delivery.
1. VerifyCheck the unchanged request bytes.
2. StoreUse an atomic dedupe constraint.
3. AcknowledgeReturn 2xx after durable acceptance.
4. ProcessRetry from your queue and reconcile.
Choose the task
Prerequisites
KeepNIXFLEX_API_KEY private on the server. Raw HTTP base URL: https://api.nixflex.com/v1. Node and Python SDK base URL: https://api.nixflex.com. The SDK adds /v1. Use owned identifiers; SDK and CLI examples need the documented minimum versions. With organisations enabled, use the stable organisation webhook signing secret. The organisation API credential on your server or a human Owner can retrieve it. Rotating the API key leaves that secret valid. Without organisations, use only the owning credential’s KEY_SECRET part. Rotation changes that verifier secret. Never pass the full KEY_ID:KEY_SECRET or a key ID to the verifier.
1. Read the configured destination
2. Configure an HTTPS receiver
Save the intended number webhook through its PUT integration route. Read the supported payload fields and event type. Record only the data your application needs; do not put API credentials in the URL or event logs.3. Verify exact request bytes
Before JSON parsing, verifyX-Nixflex-Signature as HMAC-SHA256 over the timestamp, a dot, and the exact raw body. Reject missing, malformed, stale or invalid signatures. Use the helper below with an application-chosen five-minute tolerance and a synchronised server clock.
The receiver must preserve raw bytes before its JSON middleware changes them. secret is your signing credential, not the full KEY_ID:KEY_SECRET authentication string. This helper checks authenticity and age; durable replay protection is still required.
4. Store and acknowledge
After verification, atomically store/deduplicate the event and queue durable processing before returning a prompt 2xx. For call events, use(account, event, call_id) within each receiver, taking account identity from trusted configuration. Call ID alone would incorrectly merge started, completed and booking events. A separate check and insert can race: use a unique constraint and transaction. Quarantine a null identifier needed for deduplication. Legacy started/completed retries can contain fresher fields, so update projections deliberately without repeating business actions.
SMS booking events have no call_id or universal event ID. Store the verified delivery under a separate SMS path; a trusted-account plus raw-body digest can suppress exact queue redeliveries, but it is not a universal booking-action ID. Protect business actions separately using the confirmed booking operation and your own records. Do not deduplicate only by booking UID: later moves and cancellations can affect the same booking.
5. Reconcile delayed results
Read current call or message state when necessary. For missed booking events, use GET call booking results: only ready has a result, and none requires complete empty evidence. processing, deleted and unavailable must not be mapped to zero bookings. A completed call event is not a guarantee analysis and recording are already available. Fetch recording access from its authenticated endpoint. Delivery retries and eventual failures mean events are not an exactly-once or guaranteed-delivery channel.Event and callback contracts
sms.booking describes an actual booking action, not a general sms.received or sms.delivered contract. Call bookings is an array of recorded appointment actions, empty when none; reconcile booking identity plus action rather than parsing a transcript for appointment state.
Example signed call event
The business payload is flat, without a nestedcall wrapper. This illustrative private-access payload uses fictional identifiers. The signature is computed at delivery over the exact transmitted bytes; it cannot be copied from this formatted example.
started_at and ended_at are ISO timestamps. duration_seconds is rounded from the stored millisecond duration. Tolerate additional fields and missing optional data. In private-access mode, recording_url is null and recording metadata is added; it is not a delivered MP3 URL.
Save call_id and request current recording access immediately before playback. Honour expires_at. Changing a projection to null does not revoke previously issued links or make an existing public storage bucket private; old access needs its own storage policy and expiry handling.
Use verification before event parsing
Your framework must supplyrawBody as the unchanged bytes received on the wire. Configure a suitable request-body limit before buffering; the example focuses on verification order.
Node receiver boundary
call.bookings requires signing material and retries instead of sending unsigned. Reject or quarantine any unverified delivery without business side effects. The dashboard’s unsigned reachability test can receive a refusal from this strict receiver; keep any separate reachability handler isolated from business processing.
Before rollout, use an approved test call to receive a genuinely signed event, verify it with the privately provisioned secret, process a duplicate without repeating work, and request private playback. This is a manual acceptance check, not something the dashboard’s unsigned test proves.
Delivery timing and retries
The queued path defaults to five attempts. Completed calls andcall.bookings normally start with a 60-second queue delay; SMS booking events use five seconds, and started calls request about two seconds. Retry backoff is 5, 5, 5 and 60 minutes. These are queue settings, not delivery deadlines; retention, recovery, account closure and missing data can stop or delay work.
Queued 2xx and 3xx responses count as delivered. Avoid redirects: they are not followed as successful forwarding. Network failures, 408, 429 and 5xx are retryable; other 4xx are treated as permanent. The transport helper can also retry a transport failure once. Return a prompt 2xx only after validated work is durably saved, and reconcile missed events through the call API.
The signature timestamp describes delivery, not call start. Compare it with the receiver’s current clock; an old call can legitimately produce a newly signed late event.
Errors and limits
Next steps
Booking object
Bothcall.completed.bookings[] and the booking property of sms.booking use the same public object. All keys shown below are present.
Google creation and move include actual end time; cancellation includes the looked-up interval and person. Older or upstream omissions remain null. An already-existing booking lookup is not a new public mutation event, so it must not trigger a second booking-created automation. The payload does not confirm email or SMS delivery.