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

# Preview an ICP card’s leads

> Up to 25 sample people for a card, from the page its count already fetched (never a new search), as canonical Persons with no contact data. People on a do-not-contact list are left out. The same contract as the web app’s ICP Builder (an API key instead of a session).

#### Billing

Free — this endpoint does not consume points.



## OpenAPI

````yaml /openapi.json get /api/v1/icp/analyses/{analysisId}/profiles/{profileId}/preview
openapi: 3.1.0
info:
  title: Loice API
  version: v1
  description: >-
    The Loice API finds and verifies professional contact data. Every capability
    is exposed here, key-authenticated and rate-limited; the web app is a client
    of the same platform.


    **Authentication** — pass your workspace API key on every request (except
    the API description) as `Authorization: Bearer loice_sk_…`. Keys are created
    under Settings → API Keys.


    **Billing** — operations are billed in points against your workspace
    balance. Each operation below states when the charge applies. The current
    cost of every operation is shown in the app under [Settings →
    Billing](https://app.loice.ai/settings/account?tab=billing) and in the live
    API description, `GET /api/v1/openapi.json`. Calls that fail because of a
    system or provider error (timeouts, upstream failures, our defects) are not
    billed, and rate-limited calls are rejected before any billable work. Check
    headroom with `GET /api/v1/points`. Where an operation documents an
    `Idempotency-Key` header, send one to retry safely: a repeated request
    returns the original outcome and is not charged again.


    **Errors** — every non-200 response has the shape `{ "error": { "message":
    "…" } }`. Operations whose error responses document an `error.code` also
    return that machine-readable code beside the message; branch on the code,
    not the text.
servers:
  - url: https://app.loice.ai
security: []
paths:
  /api/v1/icp/analyses/{analysisId}/profiles/{profileId}/preview:
    get:
      summary: Preview an ICP card’s leads
      description: >-
        Up to 25 sample people for a card, from the page its count already
        fetched (never a new search), as canonical Persons with no contact data.
        People on a do-not-contact list are left out. The same contract as the
        web app’s ICP Builder (an API key instead of a session).


        #### Billing


        Free — this endpoint does not consume points.
      parameters:
        - schema:
            type: string
            description: Analysis id from `POST /api/v1/icp/analyses`.
          required: true
          description: Analysis id from `POST /api/v1/icp/analyses`.
          name: analysisId
          in: path
        - schema:
            type: string
            description: Profile id from the analysis’s `profiles`.
          required: true
          description: Profile id from the analysis’s `profiles`.
          name: profileId
          in: path
      responses:
        '200':
          description: The preview.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - ready
                          - stale
                          - unavailable
                        description: >-
                          `ready`: the rows; `stale`: the counted page expired
                          (build the cards again); `unavailable`: the count did
                          not answer.
                      total:
                        type:
                          - integer
                          - 'null'
                      rows:
                        type: array
                        items:
                          type: object
                          properties:
                            person:
                              $ref: '#/components/schemas/Person'
                          required:
                            - person
                        description: At most 25 people, never any contact data.
                    required:
                      - state
                      - total
                      - rows
                required:
                  - data
              example:
                data:
                  state: stale
                  total: 1200
                  rows: []
        '401':
          description: >-
            API key missing (`Missing API key. Pass it as: Authorization: Bearer
            <key>`), invalid (`Invalid API key`), or expired (`This API key has
            expired`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                required:
                  - error
        '404':
          description: '`not_found`: no such analysis, profile or card in this workspace.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - validation_error
                          - unauthenticated
                          - not_found
                          - forbidden
                          - method_not_allowed
                          - idempotency_conflict
                          - idempotency_in_progress
                          - rate_limited
                          - internal_error
                          - run_already_active
                          - run_already_continued
                          - search_unavailable
                          - invalid_continuation
                          - invalid_input
                          - insufficient_credits
                          - incomplete
                          - list_name_taken
                          - confirmation_required
                          - confirmation_mismatch
                          - selection_too_large
                        description: >-
                          Machine-readable error code. Branch on this, not on
                          `message`.
                      message:
                        type: string
                        description: Human-readable explanation.
                      retryAfterSeconds:
                        type: integer
                        description: >-
                          Present on a 429 only: seconds until the workspace may
                          call again (same value as the `Retry-After` header).
                    required:
                      - code
                      - message
                required:
                  - error
        '405':
          description: Method not allowed — see the `Allow` response header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                required:
                  - error
        '429':
          description: >-
            Rate limit exceeded for this workspace. Retry after the number of
            seconds in the `Retry-After` header (60). Rate-limited calls are
            never billed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
                required:
                  - error
        '500':
          description: '`internal_error`: failed on our side. Never billed.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - validation_error
                          - unauthenticated
                          - not_found
                          - forbidden
                          - method_not_allowed
                          - idempotency_conflict
                          - idempotency_in_progress
                          - rate_limited
                          - internal_error
                          - run_already_active
                          - run_already_continued
                          - search_unavailable
                          - invalid_continuation
                          - invalid_input
                          - insufficient_credits
                          - incomplete
                          - list_name_taken
                          - confirmation_required
                          - confirmation_mismatch
                          - selection_too_large
                        description: >-
                          Machine-readable error code. Branch on this, not on
                          `message`.
                      message:
                        type: string
                        description: Human-readable explanation.
                      retryAfterSeconds:
                        type: integer
                        description: >-
                          Present on a 429 only: seconds until the workspace may
                          call again (same value as the `Retry-After` header).
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - workspaceApiKey: []
components:
  schemas:
    Person:
      type:
        - object
        - 'null'
      properties:
        avatarUrl:
          type:
            - string
            - 'null'
          description: >-
            Owned image address (`/api/images/<id>`, authenticated). Null ⇒
            render initials.
        fullName:
          type:
            - string
            - 'null'
          description: The source's own statement of the name.
        firstName:
          type:
            - string
            - 'null'
          description: >-
            The first name, as the source stated it when it stated two names;
            otherwise `fullName` split at read time (as written). Null when the
            name does not split.
        lastName:
          type:
            - string
            - 'null'
          description: >-
            The last name (the whole surname, e.g. "van Beethoven"), on the same
            rule as `firstName`.
        linkedinUrl:
          type: string
          description: >-
            Canonical profile URL — the identity. Never null. The public profile
            URL (`https://www.linkedin.com/in/<public-name>`) when known, else
            the member-ID URL.
        xUrl:
          type:
            - string
            - 'null'
          description: >-
            The person's own X (Twitter) profile as a source stated it, as
            `https://x.com/<handle>`. Null when no source stated one — never
            derived from a name, an address or another site's username.
        facebookUrl:
          type:
            - string
            - 'null'
          description: >-
            The person's own Facebook profile as a source stated it
            (`https://www.facebook.com/<name>` or `…/profile.php?id=<digits>`).
            Null when unstated.
        instagramUrl:
          type:
            - string
            - 'null'
          description: >-
            The person's own Instagram profile as a source stated it, as
            `https://www.instagram.com/<user>`. Null when unstated.
        telegramUrl:
          type:
            - string
            - 'null'
          description: >-
            The person's own Telegram profile as a source stated it, as
            `https://t.me/<username>` (never an invite or a channel post). Null
            when unstated.
        title:
          type:
            - string
            - 'null'
          description: Title of the primary current position.
        about:
          type:
            - string
            - 'null'
        company:
          $ref: '#/components/schemas/Company'
        companyName:
          type:
            - string
            - 'null'
          description: Alias of `company.name`.
        companyLinkedinUrl:
          type:
            - string
            - 'null'
          description: Alias of `company.linkedinUrl`.
        companyLogoUrl:
          type:
            - string
            - 'null'
          description: Alias of `company.logoImageUrl` (owned).
        domain:
          type:
            - string
            - 'null'
          description: >-
            The company's website domain, else the domain the profile resolver
            stated.
        industry:
          type:
            - string
            - 'null'
          description: Alias of `company.industry`.
        location:
          type:
            - string
            - 'null'
          description: The person's own location (never company HQ).
        department:
          type:
            - string
            - 'null'
          enum:
            - Accounting
            - Administrative
            - Arts and Design
            - Business Development
            - Community & Social Services
            - Consulting
            - Customer Success and Support
            - Education
            - Engineering
            - Entrepreneurship
            - Finance
            - Healthcare Services
            - Human Resources
            - Information Technology
            - Legal
            - Marketing
            - Media and Communication
            - Military and Protective Services
            - Operations
            - Product Management
            - Program and Project Management
            - Purchasing
            - Quality Assurance
            - Real Estate
            - Research
            - Sales
            - null
          description: Source-stated only; never classified from the title.
        seniority:
          type:
            - string
            - 'null'
          enum:
            - In Training
            - Entry Level
            - Senior
            - Strategic
            - Entry Level Manager
            - Experienced Manager
            - Director
            - Vice President
            - CXO
            - Owner / Partner
            - null
          description: Source-stated only; never classified from the title.
        yearsOfExperience:
          type:
            - string
            - 'null'
          enum:
            - Less than 1 year
            - 1-2 years
            - 3-5 years
            - 6-10 years
            - 11-15 years
            - 16-20 years
            - 20+ years
            - null
          description: >-
            Overlap-free union of stated positions; null when any start is
            missing or the stated precision leaves it between two buckets.
        employment:
          type: array
          items:
            $ref: '#/components/schemas/EmploymentEntry'
          description: Source order; [] when not available.
        education:
          type: array
          items:
            $ref: '#/components/schemas/EducationEntry'
          description: Source order; [] when not available.
        historyStatus:
          type: object
          properties:
            employment:
              type: string
              enum:
                - available
                - not-yet-available
              description: >-
                `not-yet-available`: no source has supplied this history yet
                (the list is []). `available` with [] means the source supplied
                an empty history.
            education:
              type: string
              enum:
                - available
                - not-yet-available
              description: >-
                `not-yet-available`: no source has supplied this history yet
                (the list is []). `available` with [] means the source supplied
                an empty history.
          required:
            - employment
            - education
      required:
        - avatarUrl
        - fullName
        - firstName
        - lastName
        - linkedinUrl
        - xUrl
        - facebookUrl
        - instagramUrl
        - telegramUrl
        - title
        - about
        - company
        - companyName
        - companyLinkedinUrl
        - companyLogoUrl
        - domain
        - industry
        - location
        - department
        - seniority
        - yearsOfExperience
        - employment
        - education
        - historyStatus
      description: >-
        linkedin mode only: THE canonical Person, present whenever resolution
        found someone; otherwise null.
    Company:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
        linkedinUrl:
          type:
            - string
            - 'null'
        tagline:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        industry:
          type:
            - string
            - 'null'
        employeeBand:
          type:
            - string
            - 'null'
          description: Size band as the source displays it.
        employeeCount:
          type:
            - integer
            - 'null'
          description: Exact headcount, when stated.
        followerCount:
          type:
            - integer
            - 'null'
        websiteUrl:
          type:
            - string
            - 'null'
        websiteDomain:
          type:
            - string
            - 'null'
        headquarters:
          type:
            - string
            - 'null'
        hqLocality:
          type:
            - string
            - 'null'
        hqRegion:
          type:
            - string
            - 'null'
        hqCountry:
          type:
            - string
            - 'null'
        foundedYear:
          type:
            - integer
            - 'null'
        companyType:
          type:
            - string
            - 'null'
        specialties:
          type: array
          items:
            type: string
        logoUrl:
          type: 'null'
          description: >-
            Always null. Reserved so the shape stays stable: a provider image
            address is never returned (it is signed, expires, and discloses the
            viewer). Render `logoImageUrl`.
        logoImageUrl:
          type:
            - string
            - 'null'
          description: >-
            Our own copy of the logo (`/api/images/<id>`, same authentication as
            this API). Null when the source states no logo or no copy is held.
        phone:
          type:
            - string
            - 'null'
          description: >-
            The company phone. Always null until phone verification is
            available; reserved so the shape does not change when it is.
        email:
          type:
            - string
            - 'null'
          description: >-
            The company's general contact email: only a generic role address
            (info@, sales@, …) on the company's own domain, stated by the
            company, that passed email verification. Null when none is stated or
            it did not verify. Never a personal address.
        xUrl:
          type:
            - string
            - 'null'
          description: >-
            X (Twitter) profile the company states as its own, as
            `https://x.com/<handle>`. Null when not stated; never constructed
            from the name.
        facebookUrl:
          type:
            - string
            - 'null'
          description: >-
            Facebook page the company states as its own, as
            `https://www.facebook.com/<page>`. Null when not stated.
        instagramUrl:
          type:
            - string
            - 'null'
          description: >-
            Instagram profile the company states as its own, as
            `https://www.instagram.com/<user>`. Null when not stated.
        youtubeUrl:
          type:
            - string
            - 'null'
          description: >-
            YouTube channel the company states as its own, as
            `https://www.youtube.com/` followed by `@handle`, `channel/…`, `c/…`
            or `user/…`. Null when not stated.
        confirmedAt:
          type:
            - string
            - 'null'
          description: >-
            When this record was last confirmed against the source. Null when
            the Company is built only from what a lead or list row observed (no
            company record).
      required:
        - name
        - linkedinUrl
        - tagline
        - description
        - industry
        - employeeBand
        - employeeCount
        - followerCount
        - websiteUrl
        - websiteDomain
        - headquarters
        - hqLocality
        - hqRegion
        - hqCountry
        - foundedYear
        - companyType
        - specialties
        - logoUrl
        - logoImageUrl
        - phone
        - email
        - xUrl
        - facebookUrl
        - instagramUrl
        - youtubeUrl
        - confirmedAt
      description: >-
        The canonical Company for the current employer (same schema as `POST
        /api/v1/company`).
    EmploymentEntry:
      type: object
      properties:
        companyName:
          type:
            - string
            - 'null'
        companyLinkedinUrl:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        start:
          $ref: '#/components/schemas/StatedDate'
        end:
          $ref: '#/components/schemas/StatedDate'
        current:
          type: boolean
        location:
          type:
            - string
            - 'null'
          description: Where the position was held, as the source stated it.
        description:
          type:
            - string
            - 'null'
          description: The person's own description of the position, as stated.
      required:
        - companyName
        - companyLinkedinUrl
        - title
        - start
        - end
        - current
        - location
        - description
    EducationEntry:
      type: object
      properties:
        school:
          type:
            - string
            - 'null'
        schoolLinkedinUrl:
          type:
            - string
            - 'null'
        degree:
          type:
            - string
            - 'null'
        field:
          type:
            - string
            - 'null'
        start:
          $ref: '#/components/schemas/StatedDate'
        end:
          $ref: '#/components/schemas/StatedDate'
      required:
        - school
        - schoolLinkedinUrl
        - degree
        - field
        - start
        - end
    StatedDate:
      type:
        - object
        - 'null'
      properties:
        year:
          type: integer
        month:
          type:
            - integer
            - 'null'
          description: 1–12, or null when the source stated the year only (never padded).
      required:
        - year
        - month
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key (`loice_sk_` + 48 hex characters), created under
        Settings → API Keys. Sent as `Authorization: Bearer loice_sk_…`.
        Invalid, missing, or expired keys are rejected with 401 before any
        billable work happens.

````

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