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

# Bulk Create Leads

> Creates or reengages multiple leads in one request. Each item accepts the same fields as `POST /api/leads/`. Results preserve request order and report whether each item was created, reengaged, or failed validation.



## OpenAPI

````yaml /Sela_API.yaml post /api/leads/bulk-create/
openapi: 3.0.3
info:
  title: Sela API
  version: 1.0.2
  description: Voice AI agents with superhuman conversion rates
servers:
  - url: https://api.trysela.com/
    description: Production API
security: []
paths:
  /api/leads/bulk-create/:
    post:
      tags:
        - Leads
      summary: Bulk Create Leads
      description: >-
        Creates or reengages multiple leads in one request. Each item accepts
        the same fields as `POST /api/leads/`. Results preserve request order
        and report whether each item was created, reengaged, or failed
        validation.
      operationId: leads_bulk_create_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCreateLeadRequestRequest'
            examples:
              BulkCreateLeads:
                value:
                  leads:
                    - email: first_name@trysela.com
                      phone_number: '+18042221111'
                      metadata:
                        first_name: First
                        last_name: Name
                        timezone: America/Los_Angeles
                        property_address: 123 Main St
                        property_city: San Francisco
                        property_state: California
                        property_zip: '94101'
                        address: 456 2nd St
                        city: Los Angeles
                        state: California
                        zip: '90001'
                      external_id: id_in_your_crm_123
                      lead_source: USDALoans.com
                      lead_type: 123
                      representative: 456
                      us_state: CA
                    - email: first_name@trysela.com
                      phone_number: '+18042221111'
                      metadata:
                        first_name: First
                        last_name: Name
                        timezone: America/Los_Angeles
                        property_address: 123 Main St
                        property_city: San Francisco
                        property_state: California
                        property_zip: '94101'
                        address: 456 2nd St
                        city: Los Angeles
                        state: California
                        zip: '90001'
                        property_value: 725000
                        property_type: single_family
                        occupancy_type: primary_residence
                        funded_date: '2021-06-15'
                        loan_type: conventional
                        loan_program: 30-year fixed
                        loan_rate: 7.1
                        ltv: 62
                        va_indicator: false
                        fha_indicator: false
                        loan_amount: 450000
                        loan_purpose: refinance
                        loan_close_timeframe: 30-45 days
                        preferred_loan_product: 30-year fixed
                      external_id: id_in_your_crm_123
                      lead_source: USDALoans.com
                      lead_type: 123
                      representative: 456
                      us_state: CA
                summary: Bulk create leads
                description: Create multiple leads with a single request.
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BulkCreateLeadRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BulkCreateLeadRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkCreateLeadResponse'
              examples:
                BulkCreateResult:
                  value:
                    results:
                      - id: 123
                        action: created
                      - id: 456
                        action: reengaged
                      - id: null
                        action: error
                        error: Each lead must be a JSON object.
                  summary: Bulk create result
          description: Per-lead bulk create results.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                MissingLeadsList:
                  value:
                    detail: Request body must contain a 'leads' list.
                  summary: Missing leads list
          description: Request body is missing a leads list or exceeds the bulk limit.
      security:
        - tokenAuth: []
      x-codeSamples:
        - lang: curl
          label: BulkCreateLeads
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/leads/bulk-create/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "leads": [
                  {
                    "email": "first_name@trysela.com",
                    "phone_number": "+18042221111",
                    "metadata": {
                      "first_name": "First",
                      "last_name": "Name",
                      "timezone": "America/Los_Angeles",
                      "property_address": "123 Main St",
                      "property_city": "San Francisco",
                      "property_state": "California",
                      "property_zip": "94101",
                      "address": "456 2nd St",
                      "city": "Los Angeles",
                      "state": "California",
                      "zip": "90001"
                    },
                    "external_id": "id_in_your_crm_123",
                    "lead_source": "USDALoans.com",
                    "lead_type": 123,
                    "representative": 456,
                    "us_state": "CA"
                  },
                  {
                    "email": "first_name@trysela.com",
                    "phone_number": "+18042221111",
                    "metadata": {
                      "first_name": "First",
                      "last_name": "Name",
                      "timezone": "America/Los_Angeles",
                      "property_address": "123 Main St",
                      "property_city": "San Francisco",
                      "property_state": "California",
                      "property_zip": "94101",
                      "address": "456 2nd St",
                      "city": "Los Angeles",
                      "state": "California",
                      "zip": "90001",
                      "property_value": 725000,
                      "property_type": "single_family",
                      "occupancy_type": "primary_residence",
                      "funded_date": "2021-06-15",
                      "loan_type": "conventional",
                      "loan_program": "30-year fixed",
                      "loan_rate": 7.1,
                      "ltv": 62,
                      "va_indicator": false,
                      "fha_indicator": false,
                      "loan_amount": 450000,
                      "loan_purpose": "refinance",
                      "loan_close_timeframe": "30-45 days",
                      "preferred_loan_product": "30-year fixed"
                    },
                    "external_id": "id_in_your_crm_123",
                    "lead_source": "USDALoans.com",
                    "lead_type": 123,
                    "representative": 456,
                    "us_state": "CA"
                  }
                ]
              }'
components:
  schemas:
    BulkCreateLeadRequestRequest:
      type: object
      properties:
        leads:
          type: array
          items:
            $ref: '#/components/schemas/CreateLeadRequestRequest'
      required:
        - leads
    BulkCreateLeadResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/BulkCreateLeadResult'
      required:
        - results
    ErrorResponse:
      type: object
      properties:
        non_field_errors:
          type: array
          items:
            type: string
        phone_number:
          type: array
          items:
            type: string
        email:
          type: array
          items:
            type: string
        detail:
          type: string
    CreateLeadRequestRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          nullable: true
          description: The email address of the lead.
        phone_number:
          type: string
          minLength: 1
          description: >-
            The phone number of the lead. Either E.164 or US format. Must have a
            valid area code.
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            Any additional information associated with the lead as json
            metadata. Any of the values supplied here can be used by the agent
            in the talk track. Any additional payload fields that are not part
            of the standard lead fields will be automatically stored in the
            metadata upon lead creation or update, so lead metadata can also be
            sent as additional keys in the payload. Common fields to include in
            the metadata are `first_name` and `last_name`.
        lead_type:
          type: integer
          nullable: true
          description: The id of the campaign this lead is a part of.
        representative:
          type: integer
          nullable: true
          description: The id of the representative assigned to this lead.
        external_id:
          type: string
          nullable: true
          description: The external id of the lead. This can be your CRM id.
          maxLength: 255
        us_state:
          nullable: true
          description: >-
            The US state of the lead. This is used to determine the timezone of
            the lead, as well as for compliance with telemarketing regulations.


            * `AL` - Alabama

            * `AK` - Alaska

            * `AS` - American Samoa

            * `AZ` - Arizona

            * `AR` - Arkansas

            * `AA` - Armed Forces Americas

            * `AE` - Armed Forces Europe

            * `AP` - Armed Forces Pacific

            * `CA` - California

            * `CO` - Colorado

            * `CT` - Connecticut

            * `DE` - Delaware

            * `DC` - District of Columbia

            * `FL` - Florida

            * `GA` - Georgia

            * `GU` - Guam

            * `HI` - Hawaii

            * `ID` - Idaho

            * `IL` - Illinois

            * `IN` - Indiana

            * `IA` - Iowa

            * `KS` - Kansas

            * `KY` - Kentucky

            * `LA` - Louisiana

            * `ME` - Maine

            * `MD` - Maryland

            * `MA` - Massachusetts

            * `MI` - Michigan

            * `MN` - Minnesota

            * `MS` - Mississippi

            * `MO` - Missouri

            * `MT` - Montana

            * `NE` - Nebraska

            * `NV` - Nevada

            * `NH` - New Hampshire

            * `NJ` - New Jersey

            * `NM` - New Mexico

            * `NY` - New York

            * `NC` - North Carolina

            * `ND` - North Dakota

            * `MP` - Northern Mariana Islands

            * `OH` - Ohio

            * `OK` - Oklahoma

            * `OR` - Oregon

            * `PA` - Pennsylvania

            * `PR` - Puerto Rico

            * `RI` - Rhode Island

            * `SC` - South Carolina

            * `SD` - South Dakota

            * `TN` - Tennessee

            * `TX` - Texas

            * `UT` - Utah

            * `VT` - Vermont

            * `VI` - Virgin Islands

            * `VA` - Virginia

            * `WA` - Washington

            * `WV` - West Virginia

            * `WI` - Wisconsin

            * `WY` - Wyoming
          oneOf:
            - $ref: '#/components/schemas/UsStateEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        lead_source:
          type: string
          nullable: true
          description: The source of the lead. This can be used to track the lead provider.
          maxLength: 255
        call_schedule_start_time:
          type: string
          format: date-time
          nullable: true
      required:
        - phone_number
    BulkCreateLeadResult:
      type: object
      properties:
        id:
          type: integer
          nullable: true
        action:
          $ref: '#/components/schemas/ActionEnum'
        error:
          type: string
        enqueue_error:
          type: boolean
      required:
        - action
        - id
    UsStateEnum:
      enum:
        - AL
        - AK
        - AS
        - AZ
        - AR
        - AA
        - AE
        - AP
        - CA
        - CO
        - CT
        - DE
        - DC
        - FL
        - GA
        - GU
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - MP
        - OH
        - OK
        - OR
        - PA
        - PR
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VI
        - VA
        - WA
        - WV
        - WI
        - WY
      type: string
      description: |-
        * `AL` - Alabama
        * `AK` - Alaska
        * `AS` - American Samoa
        * `AZ` - Arizona
        * `AR` - Arkansas
        * `AA` - Armed Forces Americas
        * `AE` - Armed Forces Europe
        * `AP` - Armed Forces Pacific
        * `CA` - California
        * `CO` - Colorado
        * `CT` - Connecticut
        * `DE` - Delaware
        * `DC` - District of Columbia
        * `FL` - Florida
        * `GA` - Georgia
        * `GU` - Guam
        * `HI` - Hawaii
        * `ID` - Idaho
        * `IL` - Illinois
        * `IN` - Indiana
        * `IA` - Iowa
        * `KS` - Kansas
        * `KY` - Kentucky
        * `LA` - Louisiana
        * `ME` - Maine
        * `MD` - Maryland
        * `MA` - Massachusetts
        * `MI` - Michigan
        * `MN` - Minnesota
        * `MS` - Mississippi
        * `MO` - Missouri
        * `MT` - Montana
        * `NE` - Nebraska
        * `NV` - Nevada
        * `NH` - New Hampshire
        * `NJ` - New Jersey
        * `NM` - New Mexico
        * `NY` - New York
        * `NC` - North Carolina
        * `ND` - North Dakota
        * `MP` - Northern Mariana Islands
        * `OH` - Ohio
        * `OK` - Oklahoma
        * `OR` - Oregon
        * `PA` - Pennsylvania
        * `PR` - Puerto Rico
        * `RI` - Rhode Island
        * `SC` - South Carolina
        * `SD` - South Dakota
        * `TN` - Tennessee
        * `TX` - Texas
        * `UT` - Utah
        * `VT` - Vermont
        * `VI` - Virgin Islands
        * `VA` - Virginia
        * `WA` - Washington
        * `WV` - West Virginia
        * `WI` - Wisconsin
        * `WY` - Wyoming
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    ActionEnum:
      enum:
        - created
        - reengaged
        - error
      type: string
      description: |-
        * `created` - created
        * `reengaged` - reengaged
        * `error` - error
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````