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

# Import lead

> Import or upsert a lead into the workspace.



## OpenAPI

````yaml POST /v1/leads
openapi: 3.1.0
info:
  title: Avero Public API
  version: 1.0.0
  description: >-
    REST API for importing leads, reading calls and accessing recordings.
    Authenticate with a Bearer API key (pf_live_...).
servers:
  - url: https://api.averohq.sk
    description: Production
security: []
paths:
  /v1/leads:
    post:
      tags:
        - public-api
      summary: Import Lead
      description: Import or upsert a lead into the workspace.
      operationId: import_lead_v1_leads_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadImport'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LeadImport:
      properties:
        phone_e164:
          type: string
          title: Phone E164
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        campaign_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Id
        contact_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Type
        legal_basis:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Basis
      type: object
      required:
        - phone_e164
      title: LeadImport
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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