---
title: "Pull All Leads"
method: POST
path: "/integrations/crm-sync/leads/pull"
tags: ["Integrations"]
---

# Pull All Leads

`POST /integrations/crm-sync/leads/pull`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/integrations/crm-sync/leads/pull`
- Auth: HTTP bearer

Pull Salesforce Leads into graph8.

A body carrying only `connection_id` runs the org's SAVED `pull.leads`
settings rather than pulling everything. Any other field overrides those
settings for this run only.

`enrich_from_graph8` SPENDS ENRICHMENT CREDIT when on. Omit it to take the
app's default rather than turning a spend on by accident.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- PullAllLeadsRequest: Pull Salesforce Leads into graph8. Sending none of the optional fields runs the org's SAVED `pull.leads` settings; sending any of them overrides those settings for this one run. That is the app's behaviour and it is worth knowing, because an empty body here is not "pull everything" - it is "pull what I configured".
  - `connection_id` string, required: Which CRM connection to pull from.
  - `list_id` integer, nullable: graph8 audience to land the leads in.
  - `enrich_from_graph8` boolean, nullable: Fill missing fields from the graph8 index as rows arrive. This SPENDS ENRICHMENT CREDIT when on. Omit to take the app's default rather than turning a spend on by accident.
  - `source_mode` 'all_leads' | 'campaigns', nullable: `campaigns` restricts the pull to `campaign_ids`. Omit for the saved setting.
  - `campaign_ids` string[], nullable: Salesforce Campaign ids to pull members of.
  - `include_converted` boolean, nullable: Include leads Salesforce has already converted to a Contact.
  - `suppress_from_optouts` boolean, nullable: Skip leads that appear on an opt-out list.
  - `limit` integer, nullable: Ceiling on records pulled.
  - `chunk_size` integer, nullable: Records per batch.
  - `max_parallel` integer, nullable: Concurrent batches.

## Response `202`

Successful Response

- ApiResponseSyncJobResponse
  - `data` SyncJobResponse, required: A bulk job, or its status. Open-shaped - the payload carries per-provider progress detail that differs between CRMs and grows with them.
    - `job_id` string, nullable
    - `status` string, nullable
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
