# Sincronizar chats e mensagens

`POST /chat/sync`

Pasta: **Chats**

## Autenticação

```http
token: {{token}}
```

## Descrição

# Sincronizar chats e mensagens

Retorna chats e mensagens atualizados desde um timestamp, útil para sincronização incremental de painéis.

## Endpoint

``` http
POST {{baseUrl}}/chat/sync
```

## Autenticação

``` http
token: {{token}}
```

## Corpo

``` json
{
  "since": "2026-01-01T00:00:00Z",
  "limit": 50
}
```

## Resposta

``` json
{
  "success": true,
  "serverTime": "2026-01-01T12:00:00Z",
  "chats": [],
  "messages": [],
  "contacts": []
}
```

## Observações

`since` deve estar em RFC3339. `limit` padrão é validado pelo servidor.

## Corpo (exemplo)

```json
{
  "since": "2026-01-01T00:00:00Z",
  "limit": 50
}
```

## cURL

```bash
curl -X POST "{{baseUrl}}/chat/sync" \
  -H "token: {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "since": "2026-01-01T00:00:00Z",
  "limit": 50
}'
```

---

[Índice da pasta](./index.md) · [Índice geral](../index.md) · [UI](https://gozap.dev/docs?op=chats/sincronizar-chats-e-mensagens)
