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

# Update contact lead source



## OpenAPI

````yaml /openapi.public.json patch /contacts/{id}/lead-source
openapi: 3.1.1
info:
  title: Breezy Public API
  version: 1.0.0
  description: Curated Breezy customer API for user JWT and service API key clients.
servers:
  - url: https://ai-api.getbreezyapp.com/api/v1
    description: Production
security:
  - userJwtBearer: []
  - serviceApiKeyBearer: []
tags:
  - name: API Keys
    description: Create, list, reveal, and revoke service API keys.
  - name: Company Settings
    description: Read and update tenant company settings and service zones.
  - name: Contacts
    description: Read contacts and update customer attribution fields.
  - name: Service Requests
    description: Read and triage customer service requests.
  - name: Users
    description: Read public user identity and team user records.
  - name: Webhooks
    description: Create, update, rotate, and delete webhook endpoints.
paths:
  /contacts/{id}/lead-source:
    patch:
      tags:
        - Contacts
      summary: Update contact lead source
      operationId: contacts.patchLeadSource
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
            description: Unique identifier (UUID)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                leadSourceId:
                  anyOf:
                    - type: string
                      pattern: >-
                        ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                      description: Unique identifier (UUID)
                    - type: 'null'
              required:
                - leadSourceId
              readOnly: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                    description: Unique identifier (UUID)
                  referenceNumber:
                    type: string
                  firstName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  lastName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  companyName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  email:
                    anyOf:
                      - type: string
                      - type: 'null'
                  phoneNumber:
                    anyOf:
                      - type: string
                      - type: 'null'
                  leadSourceId:
                    anyOf:
                      - type: string
                        pattern: >-
                          ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                        description: Unique identifier (UUID)
                      - type: 'null'
                  leadSourceName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  excludedFromReporting:
                    type: boolean
                  manuallyExcludedFromReporting:
                    type: boolean
                  createdAt:
                    type: string
                  updatedAt:
                    anyOf:
                      - type: string
                      - type: 'null'
                  serviceRequests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: >-
                            ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                          description: Unique identifier (UUID)
                        customerName:
                          anyOf:
                            - type: string
                            - type: 'null'
                        status:
                          type: string
                        channel:
                          anyOf:
                            - type: string
                            - type: 'null'
                        excludedFromReporting:
                          type: boolean
                        manuallyExcludedFromReporting:
                          type: boolean
                        createdAt:
                          type: string
                      required:
                        - id
                        - customerName
                        - status
                        - channel
                        - excludedFromReporting
                        - manuallyExcludedFromReporting
                        - createdAt
                      readOnly: true
                  conversations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: >-
                            ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                          description: Unique identifier (UUID)
                        status:
                          type: string
                        outcome:
                          enum:
                            - in_progress
                            - completed
                            - abandoned_early
                            - abandoned_mid
                            - transferred
                            - transfer_failed
                          type: string
                        category:
                          anyOf:
                            - type: object
                              properties:
                                slug:
                                  enum:
                                    - service_request
                                    - customer_support
                                    - spam
                                    - other
                                  type: string
                                name:
                                  type: string
                                source:
                                  enum:
                                    - llm
                                    - manual
                                    - system
                                  type: string
                              required:
                                - slug
                                - name
                                - source
                              readOnly: true
                            - type: 'null'
                        excludedFromReporting:
                          type: boolean
                        manuallyExcludedFromReporting:
                          type: boolean
                        createdAt:
                          type: string
                        lastActivityAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - id
                        - status
                        - outcome
                        - category
                        - excludedFromReporting
                        - manuallyExcludedFromReporting
                        - createdAt
                        - lastActivityAt
                      readOnly: true
                  voiceCalls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: >-
                            ^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$
                          description: Unique identifier (UUID)
                        status:
                          type: string
                        outcome:
                          enum:
                            - in_progress
                            - completed
                            - abandoned_early
                            - abandoned_mid
                            - transferred
                            - transfer_failed
                          type: string
                        category:
                          anyOf:
                            - type: object
                              properties:
                                slug:
                                  enum:
                                    - service_request
                                    - customer_support
                                    - spam
                                    - other
                                  type: string
                                name:
                                  type: string
                                source:
                                  enum:
                                    - llm
                                    - manual
                                    - system
                                  type: string
                              required:
                                - slug
                                - name
                                - source
                              readOnly: true
                            - type: 'null'
                        transferStatus:
                          enum:
                            - not_attempted
                            - transferred
                            - transfer_failed
                          type: string
                        callerPhoneNumber:
                          anyOf:
                            - type: string
                            - type: 'null'
                        excludedFromReporting:
                          type: boolean
                        manuallyExcludedFromReporting:
                          type: boolean
                        startedAt:
                          type: string
                        endedAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - id
                        - status
                        - outcome
                        - category
                        - transferStatus
                        - callerPhoneNumber
                        - excludedFromReporting
                        - manuallyExcludedFromReporting
                        - startedAt
                        - endedAt
                      readOnly: true
                required:
                  - id
                  - referenceNumber
                  - firstName
                  - lastName
                  - companyName
                  - email
                  - phoneNumber
                  - leadSourceId
                  - leadSourceName
                  - excludedFromReporting
                  - manuallyExcludedFromReporting
                  - createdAt
                  - updatedAt
                  - serviceRequests
                  - conversations
                  - voiceCalls
                readOnly: true
      security:
        - userJwtBearer: []
        - serviceApiKeyBearer: []
components:
  securitySchemes:
    userJwtBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User JWT bearer token. User principals can manage API keys and call
        tenant-scoped customer endpoints.
    serviceApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: bzy_live_...
      description: >-
        Service API key bearer token beginning with bzy_live_. Service API keys
        use tenant scope and cannot manage API keys or call user-only endpoints.

````