> For the complete documentation index, see [llms.txt](https://docs.fortics.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortics.com.br/chat-center-api-reference/reference/contacts.md).

# Contacts

## Buscar contatos similares

> Pesquisa contatos similares conforme critérios enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"ValidationError":{"description":"Erro de validação.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ValidationErrorResponse":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/v4/contacts/merge/similar":{"get":{"tags":["Contacts"],"summary":"Buscar contatos similares","description":"Pesquisa contatos similares conforme critérios enviados.","operationId":"getV4ContactsMergeSimilar","parameters":[{"in":"query","name":"contact_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"per_page","schema":{"type":"number","minimum":1}},{"in":"query","name":"page","schema":{"type":"number","minimum":1}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"422":{"$ref":"#/components/responses/ValidationError"}}}}}}
```

## Vincular contatos (merge)

> Processa a solicitação de vincular contatos e retorna o resultado.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/merge/link":{"post":{"tags":["Contacts"],"summary":"Vincular contatos (merge)","description":"Processa a solicitação de vincular contatos e retorna o resultado.","operationId":"postV4ContactsMergeLink","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar contatos relacionados

> Retorna contatos relacionados conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/related":{"get":{"tags":["Contacts"],"summary":"Listar contatos relacionados","description":"Retorna contatos relacionados conforme filtros enviados.","operationId":"getV4ContactsRelated","parameters":[{"in":"query","name":"contact_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Desvincular contato

> Processa a solicitação de desvincular contato e retorna o resultado.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/unmerge":{"post":{"tags":["Contacts"],"summary":"Desvincular contato","description":"Processa a solicitação de desvincular contato e retorna o resultado.","operationId":"postV4ContactsUnmerge","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar mídias do contato

> Retorna mídias do contato conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/agent/historic/medias":{"get":{"tags":["Contacts"],"summary":"Listar mídias do contato","description":"Retorna mídias do contato conforme filtros enviados.","operationId":"getV4ContactsHistoricMedias","parameters":[{"in":"query","name":"contact_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["sounds","files","images","videos"]}},{"in":"query","name":"limit","schema":{"type":"number","minimum":5,"maximum":50}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar grupos de contatos

> Retorna grupos de contatos conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups":{"get":{"tags":["Contacts"],"summary":"Listar grupos de contatos","description":"Retorna grupos de contatos conforme filtros enviados.","operationId":"getV4ContactsGroups","responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Criar grupo de contatos

> Cria grupo de contatos com os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups":{"post":{"tags":["Contacts"],"summary":"Criar grupo de contatos","description":"Cria grupo de contatos com os dados enviados.","operationId":"postV4ContactsGroups","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Detalhar grupo de contatos

> Recupera os dados de grupo de contatos identificado no caminho.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups/{id}":{"get":{"tags":["Contacts"],"summary":"Detalhar grupo de contatos","description":"Recupera os dados de grupo de contatos identificado no caminho.","operationId":"getV4ContactsGroupsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Atualizar grupo de contatos

> Atualiza grupo de contatos conforme os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups/{id}":{"put":{"tags":["Contacts"],"summary":"Atualizar grupo de contatos","description":"Atualiza grupo de contatos conforme os dados enviados.","operationId":"putV4ContactsGroupsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Remover grupo de contatos

> Remove grupo de contatos identificado no caminho.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups/{id}":{"delete":{"tags":["Contacts"],"summary":"Remover grupo de contatos","description":"Remove grupo de contatos identificado no caminho.","operationId":"deleteV4ContactsGroupsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar grupos do contato

> Retorna grupos do contato conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/groups/contact/{contact_id}":{"get":{"tags":["Contacts"],"summary":"Listar grupos do contato","description":"Retorna grupos do contato conforme filtros enviados.","operationId":"getV4ContactsGroupsByContact","parameters":[{"in":"path","name":"contact_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar campos adicionais de contato

> Retorna campos adicionais de contato conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/fields":{"get":{"tags":["Contacts"],"summary":"Listar campos adicionais de contato","description":"Retorna campos adicionais de contato conforme filtros enviados.","operationId":"getV4ContactsFields","responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Criar campo adicional de contato

> Cria campo adicional de contato com os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/fields":{"post":{"tags":["Contacts"],"summary":"Criar campo adicional de contato","description":"Cria campo adicional de contato com os dados enviados.","operationId":"postV4ContactsFields","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Atualizar campo adicional de contato

> Atualiza campo adicional de contato conforme os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/fields/{id}":{"put":{"tags":["Contacts"],"summary":"Atualizar campo adicional de contato","description":"Atualiza campo adicional de contato conforme os dados enviados.","operationId":"putV4ContactsFieldsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Remover campo adicional de contato

> Remove campo adicional de contato identificado no caminho.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/fields/{id}":{"delete":{"tags":["Contacts"],"summary":"Remover campo adicional de contato","description":"Remove campo adicional de contato identificado no caminho.","operationId":"deleteV4ContactsFieldsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Pesquisar contatos

> Processa a solicitação de pesquisar contatos e retorna o resultado.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/search":{"get":{"tags":["Contacts"],"summary":"Pesquisar contatos","description":"Processa a solicitação de pesquisar contatos e retorna o resultado.","operationId":"getV4ContactsSearch","parameters":[{"in":"query","name":"query","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string","enum":[true,false,"1","0"]}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Contatos recentes

> Processa a solicitação de contatos recentes e retorna o resultado.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/recents":{"get":{"tags":["Contacts"],"summary":"Contatos recentes","description":"Processa a solicitação de contatos recentes e retorna o resultado.","operationId":"getV4ContactsRecents","parameters":[{"in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Listar contatos

> Retorna contatos conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts":{"get":{"tags":["Contacts"],"summary":"Listar contatos","description":"Retorna contatos conforme filtros enviados.","operationId":"getV4Contacts","parameters":[{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"email","schema":{"type":"string"}},{"in":"query","name":"platform","schema":{"type":"string"}},{"in":"query","name":"platform_id","schema":{"type":"string"}},{"in":"query","name":"start_created_at","schema":{"type":"string","format":"date"}},{"in":"query","name":"end_created_at","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at","schema":{"type":"string","format":"date"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Criar contato

> Cria contato com os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"schemas":{"ContactsAPIRequest":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"number":{"type":"integer"},"group":{"type":"array","items":{"type":"string"}},"groups":{"type":"array","items":{"type":"string"}},"Whatsapp":{"type":"string"},"Instagram":{"type":"string"},"Telegram":{"type":"string"},"Messenger":{"type":"string"},"InstagramDirect":{"type":"string"},"GoogleChat":{"type":"string"},"ChatWeb":{"type":"string"},"Email":{"type":"string"},"MercadoLivre":{"type":"string"},"WhatsappBusiness":{"type":"string"},"Signal":{"type":"string"},"SMS":{"type":"string"},"ddi":{"type":"integer"},"default_language":{"type":"string"},"final_number":{"type":"integer"},"opt_in":{"type":"string"},"optin_gupshup":{"type":"boolean"}}},"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"boolean"},"code":{"type":"string"}}}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"PreconditionFailed":{"description":"Pré-condição falhou.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServerError":{"description":"Erro interno.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/contacts":{"post":{"tags":["Contacts"],"summary":"Criar contato","description":"Cria contato com os dados enviados.","operationId":"postV4Contacts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsAPIRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/GenericSuccess"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Detalhar contato

> Recupera os dados de contato identificado no caminho.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"NotFound":{"description":"Não encontrado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"boolean"},"code":{"type":"string"}}}}},"paths":{"/v4/contacts/{id}":{"get":{"tags":["Contacts"],"summary":"Detalhar contato","description":"Recupera os dados de contato identificado no caminho.","operationId":"getV4ContactsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## Atualizar contato

> Atualiza os dados cadastrais do contato.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"schemas":{"ContactsAPIRequest":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"number":{"type":"integer"},"group":{"type":"array","items":{"type":"string"}},"groups":{"type":"array","items":{"type":"string"}},"Whatsapp":{"type":"string"},"Instagram":{"type":"string"},"Telegram":{"type":"string"},"Messenger":{"type":"string"},"InstagramDirect":{"type":"string"},"GoogleChat":{"type":"string"},"ChatWeb":{"type":"string"},"Email":{"type":"string"},"MercadoLivre":{"type":"string"},"WhatsappBusiness":{"type":"string"},"Signal":{"type":"string"},"SMS":{"type":"string"},"ddi":{"type":"integer"},"default_language":{"type":"string"},"final_number":{"type":"integer"},"opt_in":{"type":"string"},"optin_gupshup":{"type":"boolean"}}},"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ValidationErrorResponse":{"type":"object","properties":{"status":{"type":"boolean"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"ValidationError":{"description":"Erro de validação.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"paths":{"/v4/contacts/{id}":{"put":{"tags":["Contacts"],"summary":"Atualizar contato","description":"Atualiza os dados cadastrais do contato.","operationId":"putV4ContactsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsAPIRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"422":{"$ref":"#/components/responses/ValidationError"}}}}}}
```

## Remover contato

> Remove contato identificado no caminho.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true}}},"paths":{"/v4/contacts/{id}":{"delete":{"tags":["Contacts"],"summary":"Remover contato","description":"Remove contato identificado no caminho.","operationId":"deleteV4ContactsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"}}}}}}
```

## Salvar anotação do contato

> Processa a solicitação de salvar anotação do contato e retorna o resultado.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"schemas":{"ContactAnnotationRequest":{"type":"object","required":["_id","agent_id"],"properties":{"_id":{"type":"string"},"observation":{"type":"string","nullable":true},"agent_id":{"type":"string"}}},"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"boolean"},"code":{"type":"string"}}}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"NotFound":{"description":"Não encontrado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v4/contacts/annotation":{"post":{"tags":["Contacts"],"summary":"Salvar anotação do contato","description":"Processa a solicitação de salvar anotação do contato e retorna o resultado.","operationId":"postV4ContactsAnnotation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactAnnotationRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## Atualizar campos adicionais do contato

> Atualiza campos adicionais do contato conforme os dados enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"BadRequest":{"description":"Requisição inválida.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"boolean"},"code":{"type":"string"}}}}},"paths":{"/v4/contacts/update_fields/{id}":{"put":{"tags":["Contacts"],"summary":"Atualizar campos adicionais do contato","description":"Atualiza campos adicionais do contato conforme os dados enviados.","operationId":"putV4ContactsUpdateFields","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"400":{"$ref":"#/components/responses/BadRequest"}}}}}}
```

## Listar atendimentos do contato

> Retorna atendimentos do contato conforme filtros enviados.

```json
{"openapi":"3.0.3","info":{"title":"API v4 - Fortics SZ4","version":"4.0"},"servers":[{"url":"/api","description":"Base da API"}],"security":[{"JwtAuth":[]}],"components":{"securitySchemes":{"JwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token JWT no header Authorization."}},"responses":{"GenericSuccess":{"description":"Sucesso.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"NotFound":{"description":"Não encontrado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"GenericSuccessResponse":{"type":"object","additionalProperties":true},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"boolean"},"code":{"type":"string"}}}}},"paths":{"/v4/contacts/{id}/attendances":{"get":{"tags":["Contacts"],"summary":"Listar atendimentos do contato","description":"Retorna atendimentos do contato conforme filtros enviados.","operationId":"getV4ContactsAttendances","parameters":[{"in":"query","name":"platform","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GenericSuccess"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


---

# 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.fortics.com.br/chat-center-api-reference/reference/contacts.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.
