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

# Perfil

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 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/caf-api-pt-br/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.
