ProvidersBuilt-in providers
Vapi webhooks
Receive and verify Vapi webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-vapi-signature and run a task for each Vapi event, filtered on event.message.type.
webhooks.vapi() verifies the HMAC-SHA256 signature Vapi sends in x-vapi-signature on every request.
import { , } from "@trigger.dev/sdk";
export const vapi = ..define({
: "vapi",
: .vapi(),
});
export const vapiEvents = ({
id: "vapi-events",
: vapi,
: async ({ }) => {
.();
},
});To run a subscriber only for some events, add a filter on event.message.type.
| Setting | Value |
|---|---|
| Source | webhooks.vapi() |
| Verification | HMAC-SHA256 in x-vapi-signature |
| Credential | Secret you generate on Trigger.dev and add to a Vapi HMAC credential |
| Event type | event.message.type |
| Vapi docs | Vapi webhook docs |
Set up Vapi
- Start
trigger devor deploy, then copy the endpoint's Webhook URL from the Webhooks page. - Choose Generate secret on the Trigger.dev endpoint and copy the value.
- In the Vapi Dashboard, open Integrations > Server Configuration and choose Add Custom Credential. Choose HMAC and set:
- Secret Key: the secret you generated
- Algorithm: SHA256
- Signature Header:
x-vapi-signature - Timestamp Header: leave empty
- Payload Format: the request body only, with no timestamp
- Set the webhook URL as the server URL on your assistant, phone number or Server Configuration, and attach the credential by its
credentialId. Vapi only sends the credential when the server URL comes from your saved configuration, not from an API request. - Send a test event from Vapi, or use the endpoint's Test tab, and check the endpoint's Deliveries tab. See Verify the connection if nothing arrives.
Was this page helpful?
Last updated
Edit on GitHub