> ## 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.

# Create a Lead

> Creates a lead for the authenticated API user. `phone_number` is required; `email`, `lead_type`, `external_id`, and `metadata` are optional. Use `GET /api/lead-types/` to discover available lead type IDs and their public metadata fields. Unknown top-level fields are preserved in `metadata`, which lets customer-specific values be used by the agent. If reengagement is configured and the payload matches an eligible existing lead, that lead is reengaged and returned with a 200 response instead of creating a duplicate.



## OpenAPI

````yaml /Sela_API.yaml post /api/leads/
openapi: 3.0.3
info:
  title: Sela API
  version: 1.0.2
  description: >-
    Create and manage leads, configure outbound webhook subscriptions, and use
    customer-specific lead ingestion workflows. Unless an endpoint says
    otherwise, authenticate with `Authorization: Token <api-key>`.
servers:
  - url: https://api.trysela.com/
    description: Production API
security: []
tags:
  - name: Leads
    description: Create, retrieve, update, and schedule customer leads.
  - name: Call Control
    description: Pause or resume outbound calling for an API user.
  - name: Lead Types
    description: >-
      Discover lead categories and the public metadata fields accepted for each
      one.
  - name: Webhooks
    description: >-
      Manage subscriptions that deliver lead and call events to customer
      systems.
  - name: Lead Ingestion
    description: >-
      Submit provider-specific lead payloads through ingestion URLs configured
      by Sela.
  - name: File Ingestion
    description: Request temporary upload URLs for configured CSV ingestion sources.
paths:
  /api/leads/:
    post:
      tags:
        - Leads
      summary: Create a Lead
      description: >-
        Creates a lead for the authenticated API user. `phone_number` is
        required; `email`, `lead_type`, `external_id`, and `metadata` are
        optional. Use `GET /api/lead-types/` to discover available lead type IDs
        and their public metadata fields. Unknown top-level fields are preserved
        in `metadata`, which lets customer-specific values be used by the agent.
        If reengagement is configured and the payload matches an eligible
        existing lead, that lead is reengaged and returned with a 200 response
        instead of creating a duplicate.
      operationId: leads_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLeadRequestRequest'
            examples:
              GenericLead:
                value:
                  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
                summary: Generic lead
                description: Example lead with detailed metadata.
              RefinanceLead:
                value:
                  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: Refinance lead
                description: Example lead for a mortgage refinance use case.
              HomePurchaseLead:
                value:
                  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'
                    moving_timeframe: 3-6 months
                    is_first_time_buyer: false
                    desired_loan_amount: 650000
                    property_picked_out: true
                    is_working_with_agent: true
                  external_id: id_in_your_crm_123
                  lead_source: USDALoans.com
                  lead_type: 123
                  representative: 456
                  us_state: CA
                summary: Home purchase lead
                description: Example lead for a new home purchase use case.
              HomeEquityLead:
                value:
                  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: 540000
                    property_type: single_family
                    occupancy_type: primary_residence
                    funded_date: '2020-09-10'
                    loan_type: conventional
                    loan_program: HELOC
                    loan_rate: 6.8
                    ltv: 57
                    va_indicator: false
                    fha_indicator: false
                    loan_amount: 310000
                    loan_purpose: home_equity
                    loan_close_timeframe: 30-45 days
                    preferred_loan_product: HELOC
                  external_id: id_in_your_crm_123
                  lead_source: USDALoans.com
                  lead_type: 123
                  representative: 456
                  us_state: CA
                summary: Home equity lead
                description: Example lead for a home equity use case.
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateLeadRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateLeadRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartialLead'
              examples:
                LeadReengaged:
                  value:
                    id: 28013
                    email: first_name@trysela.com
                    phone_number: '+18042221111'
                    metadata:
                      phone_number: '+18042221111'
                      email: first_name@trysela.com
                      first_name: First
                      last_name: Name
                      timezone: America/Los_Angeles
                      created_at: 02/28/2025 15:09
                      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'
                      lead_source: USDALoans.com
                      external_id: id_in_your_crm_123
                    modified_time: '2025-02-28T15:09:03.139554-08:00'
                    created_time: '2025-02-28T15:09:03.122515-08:00'
                    status: OPEN
                    status_reason: null
                    lead_source: USDALoans.com
                    lead_type: 123
                    representative: 456
                    next_call_time: '2025-02-28T15:09:03.122515-08:00'
                    next_call_time_reason: FIRST_CALL
                    external_id: id_in_your_crm_123
                    us_state: CA
                    received_time: '2025-02-28T15:09:03.122515-08:00'
                    reengagements_count: 1
                    last_reengagement_time: null
                    call_schedule_start_time: null
                    sms_dnc: false
                    call_dnc: false
                  summary: Lead reengaged
          description: An eligible existing lead was reengaged.
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartialLead'
              examples:
                LeadCreated:
                  value:
                    id: 28013
                    email: first_name@trysela.com
                    phone_number: '+18042221111'
                    metadata:
                      phone_number: '+18042221111'
                      email: first_name@trysela.com
                      first_name: First
                      last_name: Name
                      timezone: America/Los_Angeles
                      created_at: 02/28/2025 15:09
                      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'
                      lead_source: USDALoans.com
                      external_id: id_in_your_crm_123
                    modified_time: '2025-02-28T15:09:03.139554-08:00'
                    created_time: '2025-02-28T15:09:03.122515-08:00'
                    status: OPEN
                    status_reason: null
                    lead_source: USDALoans.com
                    lead_type: 123
                    representative: 456
                    next_call_time: '2025-02-28T15:09:03.122515-08:00'
                    next_call_time_reason: FIRST_CALL
                    external_id: id_in_your_crm_123
                    us_state: CA
                    received_time: '2025-02-28T15:09:03.122515-08:00'
                    reengagements_count: 0
                    last_reengagement_time: null
                    call_schedule_start_time: null
                    sms_dnc: false
                    call_dnc: false
                  summary: Lead created
          description: Lead created successfully.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                DuplicatePhoneAndEmailAddressPair:
                  value:
                    non_field_errors:
                      - >-
                        The fields email, phone_number, company must make a
                        unique set.
                  summary: Duplicate phone and email address pair
                InvalidPhoneNumber:
                  value:
                    phone_number:
                      - The phone number entered is not valid.
                  summary: Invalid phone number
                MissingPhoneNumber:
                  value:
                    phone_number:
                      - This field is required.
                  summary: Missing phone number
                BlankPhoneNumber:
                  value:
                    phone_number:
                      - This field may not be blank.
                  summary: Blank phone number
                InvalidEmailAddress:
                  value:
                    email:
                      - Enter a valid email address.
                  summary: Invalid email address
          description: Bad Request, usually due to email or phone_number issues.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                InvalidToken:
                  value:
                    detail: Invalid token header. No credentials provided.
                  summary: Invalid Token
          description: Invalid Token.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailErrorResponse'
              examples:
                RateLimitExceeded:
                  value:
                    detail: >-
                      Request was throttled. Expected available in 86400
                      seconds.
                  summary: Rate Limit Exceeded
          description: Rate limit exceeded.
      security:
        - tokenAuth: []
      x-codeSamples:
        - lang: curl
          label: GenericLead
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/leads/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "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"
              }'
        - lang: curl
          label: RefinanceLead
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/leads/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "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"
              }'
        - lang: curl
          label: HomePurchaseLead
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/leads/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "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",
                  "moving_timeframe": "3-6 months",
                  "is_first_time_buyer": false,
                  "desired_loan_amount": 650000,
                  "property_picked_out": true,
                  "is_working_with_agent": true
                },
                "external_id": "id_in_your_crm_123",
                "lead_source": "USDALoans.com",
                "lead_type": 123,
                "representative": 456,
                "us_state": "CA"
              }'
        - lang: curl
          label: HomeEquityLead
          source: |-
            curl --request POST \
              --url https://api.trysela.com/api/leads/ \
              --header 'Authorization: Token <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
                "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": 540000,
                  "property_type": "single_family",
                  "occupancy_type": "primary_residence",
                  "funded_date": "2020-09-10",
                  "loan_type": "conventional",
                  "loan_program": "HELOC",
                  "loan_rate": 6.8,
                  "ltv": 57,
                  "va_indicator": false,
                  "fha_indicator": false,
                  "loan_amount": 310000,
                  "loan_purpose": "home_equity",
                  "loan_close_timeframe": "30-45 days",
                  "preferred_loan_product": "HELOC"
                },
                "external_id": "id_in_your_crm_123",
                "lead_source": "USDALoans.com",
                "lead_type": 123,
                "representative": 456,
                "us_state": "CA"
              }'
components:
  schemas:
    CreateLeadRequestRequest:
      type: object
      description: >-
        Describe fields accepted when creating a lead.


        This serializer is documentation-only and must not be used for
        deserialization.

        ``min_reengagement_days`` is not a ``Lead`` model field and would
        otherwise reach

        ``ModelSerializer.create()`` as an unknown keyword argument.
      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`.
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          description: |-
            The status of the lead. This is updated automatically.

            * `UNKNOWN` - Unknown
            * `NEW` - New
            * `OPEN` - Open
            * `CALLBACK_TO_TRANSFER` - Callback to transfer
            * `CLOSED` - Closed
            * `CLOSED_INCOMPLETE` - Closed incomplete
            * `LOST` - Lost
            * `SCHEDULE_COMPLETED` - Schedule completed
            * `OUT_OF_TERRITORY` - Out of territory
            * `BAD_NUMBER` - Bad number
            * `CANCELLED` - Cancelled
        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
        min_reengagement_days:
          type: integer
          minimum: 0
          nullable: true
          description: >-
            Minimum number of days since creation or the last reengagement
            before a matching existing lead may be reopened. Omit to use the
            lead type default.
      required:
        - phone_number
    PartialLead:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          nullable: true
          description: The email address of the lead.
        phone_number:
          type: string
          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`.
        modified_time:
          type: string
          format: date-time
          readOnly: true
          description: The last time this lead was modified.
        created_time:
          type: string
          format: date-time
          readOnly: true
          description: The time this lead was created.
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          description: |-
            The status of the lead. This is updated automatically.

            * `UNKNOWN` - Unknown
            * `NEW` - New
            * `OPEN` - Open
            * `CALLBACK_TO_TRANSFER` - Callback to transfer
            * `CLOSED` - Closed
            * `CLOSED_INCOMPLETE` - Closed incomplete
            * `LOST` - Lost
            * `SCHEDULE_COMPLETED` - Schedule completed
            * `OUT_OF_TERRITORY` - Out of territory
            * `BAD_NUMBER` - Bad number
            * `CANCELLED` - Cancelled
        status_detail:
          nullable: true
          description: >-
            Sub-type of the status outcome (e.g. blind_transfer, warm_transfer,
            appointment_booked). This is updated automatically.


            * `blind_transfer` - Blind transfer

            * `warm_transfer` - Warm transfer

            * `appointment_booked` - Appointment booked

            * `live_handoff_unavailable` - Live handoff unavailable

            * `escalation` - Escalation

            * `has_call_dnc` - Has call DNC

            * `tcpa_litigator` - TCPA litigator

            * `LEAD_ASSIGNED` - Lead assigned

            * `application_link_sms` - Application link SMS
          oneOf:
            - $ref: '#/components/schemas/StatusDetailEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        status_reason:
          nullable: true
          description: >-
            The reason for the current status of the lead. This is updated
            automatically.


            * `UNKNOWN` - Unknown

            * `WEBHOOK` - Webhook

            * `MANUAL` - Manual

            * `CHAT` - Chat

            * `REENGAGEMENT` - Reengagement
          oneOf:
            - $ref: '#/components/schemas/StatusReasonEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        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.
        next_call_time:
          type: string
          nullable: true
          readOnly: true
          description: The time of the next call scheduled for this lead.
        next_call_time_reason:
          type: string
          nullable: true
          readOnly: true
          description: The reasons for the next call scheduled time for 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
        received_time:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: The time this lead was received by an API call.
        reengagements_count:
          type: integer
          description: The total number of times this lead has been reengaged.
          readOnly: true
        last_reengagement_time:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: The time this lead was last reengaged.
        call_schedule_start_time:
          type: string
          format: date-time
          nullable: true
        sms_dnc:
          type: boolean
          nullable: true
          readOnly: true
          description: >-
            If True, the lead has been marked as do not contact for the SMS
            channel (DNC).
        call_dnc:
          type: boolean
          nullable: true
          readOnly: true
          description: >-
            If True, the lead has been marked as do not contact for the call
            channel (DNC).
      required:
        - call_dnc
        - created_time
        - id
        - last_reengagement_time
        - modified_time
        - next_call_time
        - next_call_time_reason
        - phone_number
        - received_time
        - reengagements_count
        - sms_dnc
    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
        leads:
          type: array
          items:
            type: string
    DetailErrorResponse:
      type: object
      description: Document the standard DRF error response.
      properties:
        detail:
          type: string
      required:
        - detail
    StatusEnum:
      enum:
        - UNKNOWN
        - NEW
        - OPEN
        - CALLBACK_TO_TRANSFER
        - CLOSED
        - CLOSED_INCOMPLETE
        - LOST
        - SCHEDULE_COMPLETED
        - OUT_OF_TERRITORY
        - BAD_NUMBER
        - CANCELLED
      type: string
      description: |-
        * `UNKNOWN` - Unknown
        * `NEW` - New
        * `OPEN` - Open
        * `CALLBACK_TO_TRANSFER` - Callback to transfer
        * `CLOSED` - Closed
        * `CLOSED_INCOMPLETE` - Closed incomplete
        * `LOST` - Lost
        * `SCHEDULE_COMPLETED` - Schedule completed
        * `OUT_OF_TERRITORY` - Out of territory
        * `BAD_NUMBER` - Bad number
        * `CANCELLED` - Cancelled
    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
    StatusDetailEnum:
      enum:
        - blind_transfer
        - warm_transfer
        - appointment_booked
        - live_handoff_unavailable
        - escalation
        - has_call_dnc
        - tcpa_litigator
        - LEAD_ASSIGNED
        - application_link_sms
      type: string
      description: |-
        * `blind_transfer` - Blind transfer
        * `warm_transfer` - Warm transfer
        * `appointment_booked` - Appointment booked
        * `live_handoff_unavailable` - Live handoff unavailable
        * `escalation` - Escalation
        * `has_call_dnc` - Has call DNC
        * `tcpa_litigator` - TCPA litigator
        * `LEAD_ASSIGNED` - Lead assigned
        * `application_link_sms` - Application link SMS
    StatusReasonEnum:
      enum:
        - UNKNOWN
        - WEBHOOK
        - MANUAL
        - CHAT
        - REENGAGEMENT
      type: string
      description: |-
        * `UNKNOWN` - Unknown
        * `WEBHOOK` - Webhook
        * `MANUAL` - Manual
        * `CHAT` - Chat
        * `REENGAGEMENT` - Reengagement
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````