> 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/caf-api-pt-br/api-core/webhooks/profile.md).

# Perfil

Os webhooks de perfil são usados para comunicar atualizações de status do perfil entre o cliente e o servidor.

Você receberá uma notificação via webhook sempre que o status do perfil mudar, já que o modelo de consulta responsável pela criação do perfil tem um webhook de perfil configurado.

### **Configurando o webhook**

Para configurar a URL do webhook de perfil de um modelo de consulta, navegue até o **Modelos de Consulta** menu no CAF [Trust Platform](https://trust.caf.io/) e selecione o modelo desejado e edite o **Webhook de perfil** campo.

> * *Cada Modelo de Consulta criado no CAF* [*Trust Platform*](https://trust.caf.io/profile-templates/profile-models) *precisará de uma URL de callback atribuída para o webhook de perfil. Essa URL pode ser diferente entre os modelos ativos ou ser a mesma.*
> * *A URL configurada deve estar pronta para receber uma requisição POST após a execução de um serviço do CAF.*

### Parâmetros de resposta do webhook

| Nome                                             | Tipo                 | Descrição                                                             |
| ------------------------------------------------ | -------------------- | --------------------------------------------------------------------- |
| profileId<mark style="color:vermelho;">\*</mark> | cadeia de caracteres | Identificador do perfil                                               |
| tipo<mark style="color:vermelho;">\*</mark>      | cadeia de caracteres | Tipo de perfil atualizado (PF ou PJ)                                  |
| status<mark style="color:vermelho;">\*</mark>    | cadeia de caracteres | Novo status do perfil                                                 |
| updatedAt<mark style="color:vermelho;">\*</mark> | cadeia de caracteres | Data em que o perfil foi atualizado                                   |
| cpf                                              | cadeia de caracteres | Cadastro nacional de pessoa física, se for um perfil de pessoa física |
| cnpj                                             | cadeia de caracteres | Cadastro Nacional da Pessoa Jurídica, se for um perfil de empresa     |

#### Exemplo de envio do webhook:

```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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
