# Get WhatsApp sync status

> Get the current sync status for a sender's WhatsApp coexistence account. Only available for senders connected in coexistence mode (WhatsApp Business App + Cloud API).

`GET https://api.zavu.dev/v1/senders/{senderId}/whatsapp-sync`

Get the current sync status for a sender's WhatsApp coexistence account. Only available for senders connected in coexistence mode (WhatsApp Business App + Cloud API).

## Parameters

- `senderId` (path, string, required)

## Responses

### 200

Sync status.

- `sync` (object, required): WhatsApp coexistence sync status.
  - `isCoexistence` (boolean, required): Whether the account is in coexistence mode.
  - `status` (string, required): WhatsApp account status. One of: `pending_verification`, `pending_registration`, `active`, `disconnected`, `error`.
  - `history` (object, required): History sync status details.
    - `status` (string, required): Status of WhatsApp message history sync. One of: `not_requested`, `pending`, `syncing`, `completed`, `rejected`.
    - `canSync` (boolean, required): Whether history sync can be initiated.
    - `requestedAt` (string<date-time>, nullable): When the sync was last requested.
    - `completedAt` (string<date-time>, nullable): When the sync was completed.
  - `contacts` (object, required): Contacts sync status details.
    - `status` (string, required): Status of WhatsApp contacts sync. One of: `not_requested`, `pending`, `syncing`, `completed`.
    - `canSync` (boolean, required): Whether contacts sync can be initiated.
    - `requestedAt` (string<date-time>, nullable): When the sync was last requested.

### 400

Sender does not have a WhatsApp Business Account connected or is not in coexistence mode.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Sender not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/senders/sender_abc123/whatsapp-sync" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.senders.whatsappSync.retrieve("sender_abc123");

console.log(result);
```
