---
description: >-
  Face authentication webhooks are used to communicate authentication to the
  client-server.
---

# Face authentication

### **Setting up the webhook**

To configure the default webhook URL of a query template, navigate to the **Query Templates** menu on the CAF [Trust Platform](https://trust.caf.io/) and enter the desired template and edit the **Webhook** field.

> * _Each Query Template created in the CAF_ [_Trust Platform_](https://trust.caf.io/profile-templates/profile-models) _will need a call-back URL assigned for the webhooks. This URL can be different across active templates or the same._

{% hint style="info" %}
[_<mark style="color:blue;">**Webhook Tester**</mark>_](https://webhook.site/) _and_ [_**Request Bin**_](https://requestbin.com/) _are useful tools for receiving webhook calls. You can use them to generate a webhook URL and use that URL for any Postman requests that require you to specify a webhook URL, then use the sites to inspect the content of any webhooks they received._
{% endhint %}

### **Webhook notifications**

You will receive a notification via webhook on the following event:

* **Face authentication from web onboarding**

You will be notified each time face authentication is attempted, whether it is `true` or `false`.

### Webhook response parameters

| Name                                              | Type    | Description                                                                                           |
| ------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
| tenant<mark style="color:red;">\*</mark>          | String  | Unique identifier of the tenant.                                                                      |
| onboardingId<mark style="color:red;">\*</mark>    | String  | Unique ID of the onboarding process.                                                                  |
| type<mark style="color:red;">\*</mark>            | String  | Type of webhook.                                                                                      |
| personId<mark style="color:red;">\*</mark>        | String  | Unique ID of the person undergoing authentication. (CPF)                                              |
| attemptId<mark style="color:red;">\*</mark>       | String  | Unique ID of the authentication attempt.                                                              |
| isMatch<mark style="color:red;">\*</mark>         | Boolean | Indicates whether there was a successful match between the face authentication and the person's data. |
| date<mark style="color:red;">\*</mark>            | String  | Date and time when the authentication occurred.                                                       |
| onboardingToken<mark style="color:red;">\*</mark> | String  | Token from the onboarding link.                                                                       |

#### Example webhook post:

```json
{
  "tenant": "335dbb7c-xxxx-xxxx-xxxx-c559d3e4126a",
  "onboardingId": "xxxxxx1c9ca4d60008xxxxxx",
  "type": "face_authentication",
  "personId": "00011122233",
  "attemptId": "xxxxxx509be13997f6xxxxxx",
  "isMatch": true,
  "date": "2024-04-30T13:34:09.232Z",
  "onboardingToken": "xxxxxxd44a9ce15ce0b6d2cc63xxxxxx"
}
```
