Webhooks
Last updated
Last updated
Nami provides a variety of data generated by use of our platform that can be sent via webhook to your servers or a third-party platform.
See for everything Nami supports.
The webhook payload will always have the following fields:
created_date
ISO 8601 format time field for when the event was created
event_type
the hierarchial event type
id
unique id for the event
user_id
Nami's unique user ID associated with the event
Additional data will be available based on the event_type
. Take a look at the for more details.
A full JSON schema for all event payloads is also available .
Nami sends events as a UTF-8 encoded JSON body with a header nami-signature
that allows for validation.
Nami expects your application will return a 2xx status code upon a successful webhook receipt. If we receive any other status code, we will continue to retry sending the message. The retry logic has exponential backoff and some randomness. On average it will continue to retry once an hour for up to 24-hours before it stops trying to send a particular payload.
Give your webhook a name.
Select an option for the User Login Event Filter.
Select 'Wait for user to login before delivering' if your app has accounts with external identifiers and you are using webhooks to update CRM state for logged in users. With this option, Nami will wait until an external id is set before delivering the webhook, ensuring that the webhook data always matches your CRM. Nami will continue retrying the webhook at minimum once a day until the user signs in.
Select 'Deliver all events immediately' if your app doesn't have accounts or if you want a record of all users regardless of signed in state.
Fill out the URL to use for your webhook endpoint.
Webhook URLs must be HTTPS
Select the switch to Enable Integration and Add New Integration. This creates and turns the integration on so that Nami starts sending data to your webhook.
Click the Webhook card under 'My Integrations' to view your newly created integration.
Use Caution When Rotating the Signing Secret
If you are validating the nami signature
on the receiving end of a webhook, be aware that rotating the Signing Secret may break your webhook integration.
Be sure to update the Signing Secret on the receiving end of your webhook immediately after rotating.
We provide a couple of options that you may use to both secure your webhook endpoint and validate that the data you are receiving is coming from Nami.
Nami hashes the payload of all data sent with HMAC-SHA-256 and a shared secret that is available in the webhook setup page. The result of this hash is added as nami-signature
to the header of the request. You can validate that the signature is correct on your end after receiving the data.
The following code sample can be used to receive a webhook, validate the signature, and respond to the webhook as either successful or failed.
Nami webhooks come from a fixed IP address so you may explicitly allow traffic from our servers. You can retrieve the current list of IPs to add to your allow list from this endpoint and then look at the array for the key "webhook_outbound_ips"
.
Navigate to and click on Webhook.
Select events you would like your webhook to subscribe to. See for details.
Reveal and Copy the "Signing Secret". Use this value to validate the data. You can also use the "Rotate" button to periodically create a new signing secret.