---
description: >-
  Profile webhooks are used to communicate profile status updates to the
  client-server.
---

# Profile

You will receive a notification via webhook whenever the profile status changes since the query template responsible for profile creation has a profile webhook set up.

### **Setting up the webhook**

To configure the profile 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 **Profile 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 profile webhook. This URL can be different across active templates or the same._
> * _The configured URL must be ready to expect a POST request following a CAF service execution._

### Webhook response parameters

| Name                                        | Type   | Description                                                      |
| ------------------------------------------- | ------ | ---------------------------------------------------------------- |
| profileId<mark style="color:red;">\*</mark> | string | Profile identifier                                               |
| type<mark style="color:red;">\*</mark>      | string | Type of updated profile (PF or PJ)                               |
| status<mark style="color:red;">\*</mark>    | string | New profile status                                               |
| updatedAt<mark style="color:red;">\*</mark> | string | Date when profile was updated                                    |
| cpf                                         | string | Individual person national registry, if it is individual profile |
| cnpj                                        | string | National Register of Legal entity, if it is company profile      |

#### Example webhook post:

```json
{
  "profileId": "6021a21b3811c35ecb8dea20",
  "type": "PF",
  "status": "REPROVED",
  "updatedAt": "2023-01-24T12:10:21.311Z",
  "cpf": "00011122233"
}
```
