# grant.imap_sync_completed

Source: https://developer.nylas.com/docs/reference/notifications/grants/grant-imap_sync_completed/

Sent when a grant is created for an IMAP account and the initial historic sync completes.

> The notification code `25012` is shared with `grant.created`. Use the `type` field, not `code`, for routing webhook payloads.

## data.object fields

- `grant_id` (string) **(required)** - Unique identifier for the grant whose sync completed.
- `code` (integer) - Nylas notification code.
- `integration_id` (string) - Identifier for the connector (integration) associated with this grant.
- `provider` (string) **(required)** (imap) - Email provider for this grant.
- `type` (string) (grant.imap_sync_completed) - Notification trigger type echoed within the data object.

## Example payload

```json
{
  "specversion": "1.0",
  "type": "grant.imap_sync_completed",
  "source": "/imap/emails/historic",
  "id": "<WEBHOOK_ID>",
  "time": 1705315800,
  "data": {
    "application_id": "<NYLAS_APPLICATION_ID>",
    "object": {
      "grant_id": "<NYLAS_GRANT_ID>",
      "code": 25012,
      "integration_id": "<INTEGRATION_ID>",
      "provider": "imap",
      "type": "grant.imap_sync_completed"
    }
  },
  "webhook_delivery_attempt": 1
}
```
