> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.goextrovert.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Prospects

> Starts a paid import of prospects into a prospect list of a campaign. The charge is per prospect retrieved, not per prospect added: each retrieved prospect costs 1 credit, including prospects that end up not added (already in prospects, invalid, or over Prospect Capacity). The response comes as soon as the import is accepted, with three ids: the import, the campaign and the list (the new list when `listName` was given).

The start is refused, and nothing is created or charged:
- `400`: The request is refused: its query as the preview refuses it (named by its path such as `query.filters[0].values` and, where known, its field and op), a campaign that is not a Prospects campaign (`TARGET_USER`), a list of another campaign, a count above the Prospect Capacity left or the search schema's `limits.resultCeiling`, a balance that does not cover the cost, or a cost that could exceed `maxCreditsSpend`.
- `403`: The caller cannot update the campaign, the plan is inactive or cannot spend credits, or the `idempotencyKey` belongs to another workspace, user or API key.
- `404`: The campaign or the list does not exist.
- `409`: Another import of the campaign owner is still running; wait until it ends, then start again.

One `idempotencyKey` names one purchase: a retry with the same key returns the original purchase with `replayed: true`; its `campaignId` and `listId` may differ from this request; nothing new is started or charged. After a timeout, a network error, a 5xx or a 408, retry with the same key, since the purchase may already exist under it; after a 429, wait for `Retry-After` and retry with the same key. A 403 saying the `idempotencyKey` belongs to another workspace, user or API key means the key already names a purchase made by another caller: it is not proof that nothing was bought, so retry only with the same API key or user that made it. Any other 4xx means no purchase was created, and a new purchase takes a new key. The result — prospects added and credits charged — is not part of this response; it can be read by the import id once the import ends.



## OpenAPI

````yaml https://api.goextrovert.com/client/v2/docs-json post /client/v2/lead-finder/imports
openapi: 3.1.0
info:
  title: Extrovert Client API
  description: >-
    Public API for Extrovert platform integration. Use your API key for
    authentication.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.goextrovert.com/
    description: API Server
security: []
tags: []
paths:
  /client/v2/lead-finder/imports:
    post:
      tags:
        - Lead Finder
      summary: Import Prospects
      description: >-
        Starts a paid import of prospects into a prospect list of a campaign.
        The charge is per prospect retrieved, not per prospect added: each
        retrieved prospect costs 1 credit, including prospects that end up not
        added (already in prospects, invalid, or over Prospect Capacity). The
        response comes as soon as the import is accepted, with three ids: the
        import, the campaign and the list (the new list when `listName` was
        given).


        The start is refused, and nothing is created or charged:

        - `400`: The request is refused: its query as the preview refuses it
        (named by its path such as `query.filters[0].values` and, where known,
        its field and op), a campaign that is not a Prospects campaign
        (`TARGET_USER`), a list of another campaign, a count above the Prospect
        Capacity left or the search schema's `limits.resultCeiling`, a balance
        that does not cover the cost, or a cost that could exceed
        `maxCreditsSpend`.

        - `403`: The caller cannot update the campaign, the plan is inactive or
        cannot spend credits, or the `idempotencyKey` belongs to another
        workspace, user or API key.

        - `404`: The campaign or the list does not exist.

        - `409`: Another import of the campaign owner is still running; wait
        until it ends, then start again.


        One `idempotencyKey` names one purchase: a retry with the same key
        returns the original purchase with `replayed: true`; its `campaignId`
        and `listId` may differ from this request; nothing new is started or
        charged. After a timeout, a network error, a 5xx or a 408, retry with
        the same key, since the purchase may already exist under it; after a
        429, wait for `Retry-After` and retry with the same key. A 403 saying
        the `idempotencyKey` belongs to another workspace, user or API key means
        the key already names a purchase made by another caller: it is not proof
        that nothing was bought, so retry only with the same API key or user
        that made it. Any other 4xx means no purchase was created, and a new
        purchase takes a new key. The result — prospects added and credits
        charged — is not part of this response; it can be read by the import id
        once the import ends.
      operationId: LeadFinderClientApiController_importProspects
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportProspectsRequestDto'
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportProspectsResponseDto'
        '400':
          description: >-
            The request is refused: its query as the preview refuses it (named
            by its path such as `query.filters[0].values` and, where known, its
            field and op), a campaign that is not a Prospects campaign
            (`TARGET_USER`), a list of another campaign, a count above the
            Prospect Capacity left or the search schema's
            `limits.resultCeiling`, a balance that does not cover the cost, or a
            cost that could exceed `maxCreditsSpend`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
        '403':
          description: >-
            The caller cannot update the campaign, the plan is inactive or
            cannot spend credits, or the `idempotencyKey` belongs to another
            workspace, user or API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
        '404':
          description: The campaign or the list does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
        '409':
          description: >-
            Another import of the campaign owner is still running; wait until it
            ends, then start again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    ImportProspectsRequestDto:
      type: object
      properties:
        mode:
          type: string
          enum:
            - FILTERS
            - SELECTED
          description: >-
            `FILTERS` requests the first `count` of `query` matches, not the
            next page of unimported people; `SELECTED` uses distinct preview
            `providerIds`. Selected IDs not returned by the provider are
            skipped, so delivery is not guaranteed.
        schemaVersion:
          type: string
          minLength: 1
          description: >-
            The `version` the search schema currently reports, e.g. `people.v1`.
            Any other value is refused.
          examples:
            - people.v1
        query:
          type: object
          description: >-
            `FILTERS` only: the people-search query, the flat list of conditions
            `{"filters":[…]}` in the grammar Get Lead Finder Search Schema
            publishes — the same query the preview took. Omit for `SELECTED`: it
            does not select or exclude people, although a supplied query still
            must pass the gateway’s input validation. A key the grammar does not
            accept is refused, naming it; no key is dropped silently.
          examples:
            - filters:
                - field: contact.titleLatest
                  op: any.include
                  mode: SMART
                  values:
                    - head of sales
                    - sales director
                - field: contact.seniority
                  op: any.include
                  values:
                    - director
                    - head
                    - vp
                - field: contact.location
                  op: any.include
                  values:
                    - Germany
                - field: account.industries
                  op: any.include
                  mode: SMART
                  values:
                    - software development
                - field: account.employeeSize
                  op: range
                  ranges:
                    - start: 51
                      end: 500
          properties:
            filters:
              type: array
              items:
                allOf:
                  - type: object
                    properties:
                      field:
                        type: string
                        description: >-
                          The field the condition filters on: a `field` the
                          search schema lists, e.g. `contact.seniority`.
                        examples:
                          - contact.seniority
                          - account.employeeSize
                      op:
                        type: string
                        description: >-
                          The operation: one of the `ops` the search schema
                          lists for that field, e.g. `any.include` or `range`.
                          `all.include`: requires every supplied value to match
                          using the selected match mode; a value containing
                          spaces remains one value.
                        examples:
                          - any.include
                          - range
                    required:
                      - field
                      - op
                    additionalProperties: {}
                    description: >-
                      One condition: `field`, `op` and the payload keys of the
                      field's `control` (for example `mode` and `values`,
                      `values`, `ranges`, `start`/`end`, `min`/`max`, `rows`). A
                      key the control does not take is refused, naming it.
                      `mode`: SMART also matches similar or related values. WORD
                      matches the exact phrase, with extra words allowed before
                      or after it. STRICT matches the complete field value, with
                      no extra words. A `keyword_sources` condition puts `mode`
                      on each `sources[]` entry instead.
                  - {}
              description: >-
                The conditions, combined with AND. Each `field` and `op` pair
                appears at most once, and its one condition holds all of its
                values.
          additionalProperties: false
          required:
            - filters
        count:
          type: integer
          description: >-
            `FILTERS`: required number of matches to request, taken from the top
            of the query's matches in preview order. Omit for `SELECTED`:
            selection uses distinct `providerIds`, not `count`. If supplied,
            `count` still must pass the input type and bounds. A count above the
            Prospect Capacity left, above what the balance covers or above the
            search schema's `limits.resultCeiling` is refused before anything
            starts; an import is never trimmed to fit. Asking for more than
            `grossTotal` buys nothing extra: the import stops when the matches
            run out and charges only what it retrieved. People already imported
            from this query are among its first matches: they are retrieved and
            charged again and count as already in prospects, so to add other
            people import `SELECTED` rows not yet imported.
          examples:
            - 50
          minimum: 1
          maximum: 2147483647
        providerIds:
          type: array
          description: >-
            `SELECTED`: `providerId` values from preview, 1 to 100; a repeated
            id counts once. Omit for `FILTERS`: they do not limit, exclude, or
            add query matches. If supplied, the array still must pass input
            validation.
          minItems: 1
          maxItems: 100
          items:
            type: string
            minLength: 1
        destination:
          properties:
            campaignId:
              type: string
              format: uuid
              description: >-
                Campaign whose prospect list receives the import. It must be a
                Prospects campaign (`TARGET_USER`); a campaign of any other type
                is refused. Campaigns are never created here.
            listId:
              description: >-
                An existing prospect list of the campaign; omit it or send
                `null` when `listName` names a new one.
              anyOf:
                - type: string
                  format: uuid
                - type: 'null'
            listName:
              description: >-
                Name of a new prospect list to create under the campaign; omit
                it or send `null` when `listId` names an existing one.
              anyOf:
                - type: string
                  minLength: 1
                - type: 'null'
            moveOwnDuplicated:
              type: boolean
              description: >-
                Move prospects the campaign owner already holds in another list
                into this one instead of leaving them where they are.
            onlyRecentlyActive:
              type: boolean
              description: >-
                Remove prospects with no LinkedIn post in the last 30 days once
                their posts are first collected, after the import. They are
                imported and charged like the others.
          description: >-
            Where the prospects land. Exactly one of `listId` and `listName` is
            set; the other is omitted or `null`.
          oneOf:
            - title: Existing list
              description: >-
                Import into an existing prospect list of the campaign: `listId`
                set, `listName` omitted or null.
              required:
                - listId
              properties:
                listId:
                  type: string
                listName:
                  type: 'null'
            - title: New list
              description: >-
                Create a new prospect list under the campaign: `listName` set,
                `listId` omitted or null.
              required:
                - listName
              properties:
                listId:
                  type: 'null'
                listName:
                  type: string
          required:
            - campaignId
            - moveOwnDuplicated
            - onlyRecentlyActive
        idempotencyKey:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
          description: >-
            A UUID v4 the caller generates for this purchase; reuse it only to
            retry the same purchase.
        maxCreditsSpend:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: >-
            The most credits this import may charge: `count` × 1 for `FILTERS`,
            the number of distinct `providerIds` × 1 for `SELECTED`; 1 credit
            per retrieved prospect. The start is refused when the cost could
            exceed it.
          examples:
            - 50
      required:
        - mode
        - schemaVersion
        - destination
        - idempotencyKey
        - maxCreditsSpend
      allOf:
        - if:
            properties:
              mode:
                const: FILTERS
          then:
            required:
              - query
              - count
        - if:
            properties:
              mode:
                const: SELECTED
          then:
            required:
              - providerIds
    ImportProspectsResponseDto:
      type: object
      properties:
        status:
          type: string
          const: success
          description: Response status
        data:
          type: object
          properties:
            importId:
              type: string
              format: uuid
              description: >-
                Id of the import this `idempotencyKey` names — the one just
                started, or, when `replayed` is `true`, the earlier one.
            campaignId:
              type: string
              format: uuid
              description: The destination campaign.
            listId:
              type: string
              format: uuid
              description: >-
                The destination prospect list — the existing one, or the one
                just created from `listName`.
            idempotencyKey:
              type: string
              format: uuid
              description: The `idempotencyKey` of the request, echoed.
            replayed:
              type: boolean
              description: >-
                `true` when this key already named an import: the ids are that
                earlier import's and this call started, created or charged
                nothing. `false` when a fresh import was started.
          required:
            - importId
            - campaignId
            - listId
            - idempotencyKey
            - replayed
        message:
          type: string
          description: Success message
          examples:
            - Operation completed successfully
      required:
        - status
        - data
        - message
    ClientApiErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
          enum:
            - error
        data:
          type: object
          description: Response data
          example: null
          nullable: true
        message:
          type: string
          description: Error message
          example: An error occurred while processing the request
      required:
        - status
        - data
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.