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

# Import an AI Finder preview

> **What it does.** Takes a cached `previewId` and starts the provider-specific import workflow into a destination list. This is the final step for new-list building after you create or identify the destination list. Returns an `actionsId` you can use to monitor progress.

**When to use.** Call this as the final step of the preview → iterate → import flow, once you're happy with the filters. The preview must still be valid (24h TTL).

**Preconditions.**
- `listId` must be a list owned by this client.
- The list type must match the preview's entity: pass a **contact list** for CONTACT-typed previews (`LINKEDIN` contacts, `CRM_CONTACTS`, `CRUNCHBASE_CONTACTS`, `CRUNCHBASE_INVESTORS`), and a **company list** for COMPANY-typed previews (`LINKEDIN` companies, `CRM_COMPANIES`, `CRUNCHBASE_COMPANIES`, `STORELEADS`, `THEIRSTACK_TECHNOLOGY`, `THEIRSTACK_JOBS`, `GOOGLE_MAPS`). Mismatch returns 422.
- `maxCount` is an integer between 100 and 2500 in increments of 100.

**What you get back.** An `actionsId` — use it with:
- `GET /v1/actions/{actionsId}/status` to poll progress.
- The `actionsId` filter on `/v1/contacts` and `/v1/companies` to fetch the imported records once they land.

The preview is NOT evicted after import — you can re-import the same preview into a different list until its 24h TTL expires.

**Related tool.** If you don't have a `previewId` yet (you haven't called the preview or iterate endpoints), use `POST /v1/ai-finder/import` instead — it runs a brand-new search and import in one step, but any refinements you'd otherwise apply via iterate are not available since there's no preview to refine.

    > **Required scope:** `ACTIONS_WRITE`
    >
    > **Rate limit:** 10 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json post /v1/ai-finder/previews/{previewId}/import
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/ai-finder/previews/{previewId}/import:
    post:
      tags:
        - AI Finder
      summary: Import an AI Finder preview
      description: >-
        **What it does.** Takes a cached `previewId` and starts the
        provider-specific import workflow into a destination list. This is the
        final step for new-list building after you create or identify the
        destination list. Returns an `actionsId` you can use to monitor
        progress.


        **When to use.** Call this as the final step of the preview → iterate →
        import flow, once you're happy with the filters. The preview must still
        be valid (24h TTL).


        **Preconditions.**

        - `listId` must be a list owned by this client.

        - The list type must match the preview's entity: pass a **contact list**
        for CONTACT-typed previews (`LINKEDIN` contacts, `CRM_CONTACTS`,
        `CRUNCHBASE_CONTACTS`, `CRUNCHBASE_INVESTORS`), and a **company list**
        for COMPANY-typed previews (`LINKEDIN` companies, `CRM_COMPANIES`,
        `CRUNCHBASE_COMPANIES`, `STORELEADS`, `THEIRSTACK_TECHNOLOGY`,
        `THEIRSTACK_JOBS`, `GOOGLE_MAPS`). Mismatch returns 422.

        - `maxCount` is an integer between 100 and 2500 in increments of 100.


        **What you get back.** An `actionsId` — use it with:

        - `GET /v1/actions/{actionsId}/status` to poll progress.

        - The `actionsId` filter on `/v1/contacts` and `/v1/companies` to fetch
        the imported records once they land.


        The preview is NOT evicted after import — you can re-import the same
        preview into a different list until its 24h TTL expires.


        **Related tool.** If you don't have a `previewId` yet (you haven't
        called the preview or iterate endpoints), use `POST
        /v1/ai-finder/import` instead — it runs a brand-new search and import in
        one step, but any refinements you'd otherwise apply via iterate are not
        available since there's no preview to refine.

            > **Required scope:** `ACTIONS_WRITE`
            >
            > **Rate limit:** 10 requests per minute
      parameters:
        - schema:
            type: string
            description: The previewId returned by a prior preview or iterate call.
          required: true
          description: The previewId returned by a prior preview or iterate call.
          name: previewId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                listId:
                  type: integer
                  exclusiveMinimum: 0
                  description: >-
                    Destination list ID. Must be owned by this client. The list
                    type must match the preview's entity — pass a contact list
                    when the preview's `entity` is `CONTACT`, or a company list
                    when it is `COMPANY`. Mismatch returns 422. Create a list
                    first via POST /v1/lists if needed.
                maxCount:
                  type: integer
                  minimum: 100
                  maximum: 2500
                  description: >-
                    Maximum number of results to import into the destination
                    list. Integer between 100 and 2500, in increments of 100
                    (100, 200, 300, …, 2500). The actual count may be lower if
                    the search yields fewer matches.
              required:
                - listId
                - maxCount
            examples:
              typical:
                summary: Import up to 500 results into list 123
                value:
                  listId: 123
                  maxCount: 500
      responses:
        '201':
          description: AI Finder import started
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      actionsId:
                        type: number
                        description: >-
                          ID of the actions group created for this import. Use
                          it with `GET /v1/actions/{actionsId}/status` to
                          monitor progress, or as the `actionsId` filter on
                          `/v1/contacts` / `/v1/companies` to fetch the imported
                          records once they land.
                      createdAt:
                        type: string
                        format: date-time
                        description: When the import workflow was started.
                      type:
                        type: string
                        enum:
                          - CONTACTS
                          - COMPANIES
                        description: >-
                          The entity type being imported (`CONTACTS` or
                          `COMPANIES`). Matches the destination list type.
                      listId:
                        type: number
                        description: >-
                          The destination list ID that records are being
                          imported into.
                      workflowId:
                        type: string
                        description: >-
                          The Temporal workflow ID driving the import. Mainly
                          useful for internal debugging; prefer `actionsId` for
                          status polling.
                      previewId:
                        type: string
                        format: uuid
                        description: >-
                          The preview that was imported. The preview remains
                          cached (until its 24h TTL expires) and can be imported
                          into additional lists.
                    required:
                      - actionsId
                      - createdAt
                      - type
                      - listId
                      - workflowId
                      - previewId
                required:
                  - status
                  - message
                  - data
        '400':
          description: Validation error
        '404':
          description: Preview or destination list not found
        '422':
          description: >-
            Preview cannot be imported (entity mismatch, unsupported provider,
            insufficient credits, etc.). When the cause is insufficient credits,
            `details.code` is `INSUFFICIENT_CREDITS` and `details.upsellUrl`
            links to the billing page.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````