Approve or deny visitors using feature hooks
Approve or deny visitor entry in real-time using synchronous webhooks. When a visitor signs in we will provide you the context of that sign-in and the identity of the visitor so that your app can determine whether to allow or deny entry.
Here are a few ways to leverage synchronous webhooks:
- Only allow visitors to enter the building after an authenticated biometric scan
- Verify a visitor's identity using facial recognition during the sign-in flow
- Deny entry by pinging a real-time database of known bad actors, criminal records, or government watchlist
- Only allow entry to visitors that have uploaded proof of vaccination from a passport app
Using synchronous webhooks, your app will run during the sign-in flow. Envoy will hold the sign-in flow from completing until a response from your service is received. Your app will need to return a response (approve or manual review) which will let Envoy know how to complete the visitor sign-in flow.
Respond quickly. If Envoy can't reach your endpoint, or the request errors or times out, the visitor is held for manual review.
Configure the sync webhooks
- Add feature hooks by creating a new app in Envoy's Dev Dashboard
- Check the box "From Envoy's dashboard" to display, feature hooks in the Dev Dashboard
-
- Under Feature hooks, provide the endpoint URL that you want the callback to be POSTed to
- Under Trigger, choose the type of screening you want for each validation URL

Screening events
Feature hooks are different from event hooks such as entry_sign_in or invite_created. Event hooks are notifications sent after something has happened, and your response only sets the status of the job in the visitor log. Feature hooks run during the flow, and your HTTP status is the screening result.
| Event | Sent when | payload.type |
|---|---|---|
entry_screen_requested | A visitor signs in | entries |
invite_screen_requested | A visitor is invited, or the invite changes | invites |
employee_entry_screen_requested | An employee signs in (Workplace flows) | entries |
employee_invite_screen_requested | An employee is invited (Workplace flows) | invites |
The request
Envoy POSTs JSON to your endpoint. The request is signed with an X-Envoy-Signature header: a base64 HMAC-SHA256 of the raw request body, keyed by your app's client secret.
{
"meta": {
"event": "entry_screen_requested",
"plugin_id": "<app-id>",
"install_id": "<installation-id>",
"config": {},
"job": {
"id": "<job-id>",
"name": "entry_screen_requested",
"identifier": "vr:entry:<entry-id>"
},
"auth": {},
"company": {},
"location": {}
},
"payload": {
"id": "<entry-id>",
"type": "entries",
"attributes": {},
"relationships": {},
"visitor-profile-id": "<profile-id>"
}
}meta
event: the screening event name.config: the installation's configuration, meaning what the admin entered during setup plus anything your setup endpoints returned. Always an object, empty if nothing was set. You may also seemeta.envwith the same values; it is deprecated, so readconfig.auth:nullwhen the installation has no authorized scopes.location: always present for screening events.
payload
The payload is a JSON:API resource object (id, type, attributes, relationships) with dasherized keys. Next to those you may also see:
| Field | Description |
|---|---|
visitor-profile-id | The visitor's profile in the company's visitor directory. See Visitor profile ID. |
changed-fields | On a re-screen of an invite, the fields that changed. See Re-screening. |
previous-approval | The visitor's most recent prior approval, when there is one, so you can carry a previous decision forward. |
current-session-reports | Screening reports already recorded for this visit, so you can tell whether the visitor was already flagged. |
For invite photos, use attributes.photo-url. Invites do not include thumbnails; entries do. Photo URLs are presigned and expire after one hour, so download the image during the request instead of storing the link.
Visitor profile ID
visitor-profile-id identifies the visitor's profile in the company's visitor directory. It stays the same for the same person across visits, while the invite or entry id changes every visit.
- Within a company, a visit is matched to an existing profile by the same email address, or by the same name together with the same phone number. Companies that collect ID documents can also match on the document number. A visitor with no match gets a new profile.
- It is included whenever the visit is linked to a profile. It is not guaranteed on every payload, so treat it as optional.
- Admins can merge duplicate profiles, so a visitor's profile ID can change after a merge. Don't assume it never changes.
Re-screening
An invite is screened again when any of these change: full name, email, host, expected arrival time, flow, pre-registration completion, or a custom sign-in field value. Photo changes and the phone column do not trigger a re-screen; a phone number collected as a custom sign-in field does.
On a re-screen, payload["changed-fields"] lists what changed as dasherized keys, for example ["full-name", "email"]. Custom fields appear under their field label. It is not present on the first screen of an invite, or on entry screens.
Respond to the webhook request
Your HTTP status is the screening result. Always return a JSON body, even an empty object.
| Status | Result |
|---|---|
200, 201 | Approved. |
412 | Held for manual review. Include a message, and optionally screener details. |
400 | Ignored. Your app did not screen this visitor, and the visitor is not held. |
| Anything else, including timeouts | Held for manual review. |
Automatically approving a visitor
To approve the user return an HTTP 200. If you’re using the nodeSDK you can use this method:
res.send({})
If you return a 200, the user will be automatically approved and allowed entry.
Requiring a user to be manually approved
To require the user to be approved manually return HTTP 412. If you’re using the nodeSDK you can use the following method:
res.sendFailed('REPLACE_WITH_YOUR_APP_NAME: this user is not allowed in.')
You can provide an optional message in the `res.SendFailed method which will be displayed to the admin in the visitor log.
If you return a 412, the admin will have to manually approve or deny the user. The visitor will see a message on the iPad letting them know what someone will be with them shortly.
Notifications are not automatically sent to an admin if a visitor must be manually reviewed. We recommend creating your own notification to alert the administrator to take action.
Updated 8 days ago

