> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-api/core-api/webhooks/profile.md).

# 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"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-api/core-api/webhooks/profile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
