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

# Preview leads

> Search database leads with masked response data. Preview results include an internal lead ID for later enrichment and do not include LinkedIn URL, company domain, email, or phone.

## Use Case:

Show masked lead results in SaaS products without exposing paid data such as email, phone, LinkedIn URL, or company domain.

## Pricing

This endpoint is free — it does not incur any charges.


## OpenAPI

````yaml post /api/v1/preview/leads/
openapi: 3.0.3
info:
  title: Generect API
  description: >-
    Welcome to the Generect API documentation. Here we will help you integrate
    and use our API.


    API base url: `https://api.generect.com` — every path below is relative to
    this host. Newer endpoints live under `/api/v1/...`, legacy endpoints under
    `/api/...`; use each path exactly as documented.

    Protocol: `HTTPS`


    # Authentication


    Get your API token from the Generect app settings and send it in the
    `Authorization` header with the required `Token` prefix.


    Example: `Authorization: Token xxxxxxxxx`


    # Rate limits


    You can request data depending on your data plan and account balance
    (default: 10000/month). Pricing depends on the operation and the number of
    results returned, and may increase with additional data flags. For exact
    pricing, see each endpoint's Pricing section or your billing settings:
    https://beta.generect.com/settings/billing


    # Note


    _Every endpoint must include the trailing `/`. Requests without the trailing
    slash may fail._
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.generect.com
security:
  - apiKey: []
tags:
  - name: 1. Auth
    description: Login and get user info
  - name: 2. Transactions
    description: List of latest transactions in your account
  - name: 3. Leads
    description: Fetch information about leads by _link/name/ICP_.
  - name: 4. Companies
    description: Fetch information about companies by link/name/ICP.
  - name: 5. Preview
    description: Search masked database leads for preview and reveal workflows.
  - name: 6. Enrich
    description: Enrich leads and companies by internal or external identifiers.
  - name: 7. Email
    description: Find and validate email addresses.
  - name: 8. Accounts
    description: Account profile, usage, and transactions.
  - name: 9. Search
    description: Database and realtime lead, company, and company-lead search.
  - name: 10. Phone
    description: Find phone numbers for leads.
  - name: 11. Webhooks
    description: Register and manage async job notifications.
paths:
  /api/v1/preview/leads/:
    post:
      tags:
        - 5. Preview
      summary: Preview leads
      description: >-
        Search database leads with masked response data. Preview results include
        an internal lead ID for later enrichment and do not include LinkedIn
        URL, company domain, email, or phone.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_search_criteria:
                  type: object
                  description: Company filters (same as /search/database/companies/).
                  properties:
                    industries:
                      type: array
                      items:
                        type: string
                    headcounts:
                      type: array
                      items:
                        type: string
                    locations:
                      type: array
                      items:
                        type: string
                    company_types:
                      type: array
                      items:
                        type: string
                lead_search_criteria:
                  type: object
                  description: Lead filters (same as /search/database/leads/).
                  properties:
                    job_titles:
                      type: array
                      items:
                        type: string
                    seniorities:
                      type: array
                      items:
                        type: string
                    locations:
                      type: array
                      items:
                        type: string
                    company_industries:
                      type: array
                      items:
                        type: string
                    company_headcounts:
                      type: array
                      items:
                        type: string
                    personas:
                      type: array
                      items:
                        type: array
                    limit_by:
                      type: integer
                    offset_by:
                      type: integer
            examples:
              Preview leads:
                value:
                  company_search_criteria:
                    industries:
                      - Software Development
                    headcounts:
                      - 51-200
                    locations:
                      - United States
                  lead_search_criteria:
                    job_titles:
                      - CEO
                      - Founder
                    seniorities:
                      - c_suite
                    locations:
                      - United States
                    limit_by: 25
      responses:
        '200':
          description: Masked lead preview results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewLeadsResponse'
              example:
                data:
                  leads:
                    - id: ACwAAAE9bk0BxY7Qf2mN4pR8sT1vW3zA5cE6gH9
                      first_name: Jordan
                      last_name: Ellis
                      title: CEO
                      company_name: Microsoft
                      location: San Francisco, CA
                      industry: Software Development
                      seniority: CXO
                      headcount_range: 51-200
                    - id: ACwAAAFp2r4Bd1eF3gH5iJ7kL9mN0pQ2rS4tU6v
                      first_name: Morgan
                      last_name: Lee
                      title: VP Sales
                      company_name: Salesforce
                      location: New York, NY
                      industry: Software Development
                      seniority: VP
                      headcount_range: 201-500
                meta:
                  amount_charged: 0
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Validation error:
                  value:
                    status: error
                    status_code: 400
                    detail:
                      company_headcounts:
                        - Object with name=999 does not exist.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Account is not enabled for the Preview endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: You are not authorized to use this endpoint.
components:
  schemas:
    PreviewLeadsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            leads:
              type: array
              description: Masked lead previews — see the example for the field set.
              items:
                type: object
        meta:
          $ref: '#/components/schemas/Meta'
    Error:
      type: object
      description: Standard error envelope returned for 4xx/5xx responses.
      properties:
        status:
          type: string
          example: error
        status_code:
          type: integer
          example: 400
        detail:
          description: >-
            Human-readable message (string) for most errors, or a field-level
            validation map ({ field: [messages] }) for 400 validation errors.
          example: Insufficient funds in the account.
    Meta:
      type: object
      description: Operation metadata returned in every data/meta response.
      required:
        - amount_charged
      properties:
        amount_charged:
          type: number
          description: >-
            Actual amount charged for this request in USD, computed from your
            pricing tier. 0 for free operations and for not-found results (No
            Data — No Charge).
        status:
          type: string
          description: Set to "error" when the operation finished with an error.
        error:
          type: string
          description: Error details; present only when the operation failed.
        time_cached:
          type: string
          format: date-time
          description: >-
            When the cached result set was originally collected (returned by
            database company search when results are served from a previous
            identical search).
  responses:
    Unauthorized:
      description: Missing or invalid API token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            status_code: 401
            detail: Authentication credentials were not provided.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use the required Token prefix. Example: Authorization: Token xxxxxxxxx'

````