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

# Update Lead

> Send only the fields you want to change. `tags` or `tag_ids` replaces all existing tags.



## OpenAPI

````yaml PATCH /leads/{id}
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /leads/{id}:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Leads
      summary: Update lead
      description: >-
        Send only the fields you want to change. `tags` or `tag_ids` replaces
        all existing tags.
      operationId: updateLead
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                email:
                  type: string
                  format: email
                  nullable: true
                long_term_context:
                  type: string
                  nullable: true
                  description: >-
                    AI memory for this lead. Injected into the agent's system
                    prompt at call time.
                metadata:
                  type: object
                tags:
                  type: array
                  items:
                    type: string
                  description: Replace all tags by name
                tag_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Replace all tags by UUID
      responses:
        '200':
          description: Updated lead
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
          format: uuid
        phone_number:
          type: string
          example: '+972501234567'
        name:
          type: string
          nullable: true
        email:
          type: string
          format: email
          nullable: true
        source:
          type: string
          example: api
          description: >-
            How the lead was created: 'api', 'manual', or 'auto' (from inbound
            call).
        tags:
          type: array
          items:
            $ref: '#/components/schemas/LeadTag'
        long_term_context:
          type: string
          nullable: true
          description: >-
            AI memory for this lead. Injected into the agent's system prompt at
            call time when lead_memory_enabled is true on the agent.
        metadata:
          type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    LeadTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        color:
          type: string
          nullable: true
        sort_order:
          type: integer
        created_at:
          type: string
          format: date-time
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard
        under **Settings → API Keys**.

````