Trigger Email Sync
Email
Trigger Email Sync
Force an on-demand synchronization of the workspace’s connected mailbox
POST
Trigger Email Sync
Request
LeadLex continuously synchronizes connected Gmail and Office 365 mailboxes in the background. This endpoint lets you enqueue an immediate sync when you need fresh data (for example, just before running an outreach report).Headers
Optional UUID used to deduplicate retried sync requests within 24 hours.
Body Parameters
incremental (default) fetches only messages newer than the last successful sync. full rebuilds the entire mailbox index and may take several minutes.Optional provider override:
gmail or microsoft. When omitted, all connected providers are synced.Response
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID headers. Jobs typically complete within 10 seconds for incremental mode; long-running full syncs are reported via the email.sync.completed webhook event.
Example Response
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing write:email permission, or no mailbox connected |
| 409 | sync_in_progress | A full sync is already running; wait for it to finish before starting another |
| 429 | rate_limited | Too many sync requests; on-demand sync is capped at 6 per hour per workspace |