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

# Update Lead List

> Updates a lead list's name or active status. Requires authentication.

## Overview

Updates a lead list's name or active status. This endpoint allows you to modify basic properties of an existing lead list.

## Path Parameters

| Parameter      | Type   | Required | Description             | Example             |
| -------------- | ------ | -------- | ----------------------- | ------------------- |
| `lead_list_id` | string | Yes      | Lead list ID (lead\_id) | `Lecb6be7be43b4724` |

## Request Body

| Field       | Type    | Required | Description                                     | Example                 |
| ----------- | ------- | -------- | ----------------------------------------------- | ----------------------- |
| `name`      | string  | No       | Name of the lead list                           | `"Marketing Lead List"` |
| `is_active` | boolean | No       | Whether to activate or deactivate the lead list | `true` or `false`       |

## Examples

### Update Lead List Name

```bash theme={null}
curl -X PATCH "https://management.scanova.io/lead/Lecb6be7be43b4724/" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Marketing Lead List"
  }'
```

### Activate/Deactivate Lead List

```bash theme={null}
curl -X PATCH "https://management.scanova.io/lead/Lecb6be7be43b4724/" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": true
  }'
```

### Update Both Name and Status

```bash theme={null}
curl -X PATCH "https://management.scanova.io/lead/Lecb6be7be43b4724/" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Lead List Name",
    "is_active": false
  }'
```

## Response

Returns the updated lead list object with all current details.

## Use Cases

* **Name Management**: Update lead list names for better organization
* **Status Control**: Activate or deactivate lead lists as needed
* **Bulk Operations**: Update multiple lead lists programmatically
* **Workflow Management**: Control lead list availability based on campaigns

<Note>
  When you deactivate a lead list (`is_active: false`), it will no longer capture new leads, but existing data remains intact. You can reactivate it later by setting `is_active: true`.
</Note>

<Warning>
  Deactivating a lead list will stop new lead capture immediately. Make sure to inform your team about status changes to avoid confusion.
</Warning>


## OpenAPI

````yaml PATCH /lead/{lead_list_id}/
openapi: 3.1.0
info:
  title: Scanova Lead List API
  description: >-
    Lead list management endpoints for creating, updating, and managing lead
    lists
  version: 1.0.0
servers:
  - url: https://management.scanova.io
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Lead List
    description: Lead list management operations
paths:
  /lead/{lead_list_id}/:
    patch:
      tags:
        - Lead List
      summary: Update Lead List
      description: Updates a lead list's name or active status. Requires authentication.
      parameters:
        - name: lead_list_id
          in: path
          required: true
          description: Lead list ID (lead_id)
          schema:
            type: string
          example: Lecb6be7be43b4724
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLeadListRequest'
            examples:
              update_name:
                summary: Update lead list name
                value:
                  name: Marketing Lead List
              activate_deactivate:
                summary: Activate/Deactivate lead list
                value:
                  is_active: true
      responses:
        '200':
          description: Lead list updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadList'
        '400':
          description: Bad request - Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '404':
          description: Lead list not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    UpdateLeadListRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the lead list
          example: Marketing Lead List
        is_active:
          type: boolean
          description: Whether to activate or deactivate the lead list
          example: true
    LeadList:
      type: object
      properties:
        id:
          type: integer
          description: Internal lead list ID
          example: 262
        lead_id:
          type: string
          description: Unique lead list identifier
          example: Lecb6be7be43b4724
        name:
          type: string
          description: Name of the lead list
          example: Onit Lead
        created:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2023-08-04T13:51:51.959871+05:30'
        modified:
          type: string
          format: date-time
          description: Last modification timestamp
          example: '2023-08-04T13:51:51.959871+05:30'
        is_active:
          type: boolean
          description: Whether the lead list is active
          example: true
        usage_count:
          type: integer
          description: Number of times this lead list has been used
          example: 5
        entries_count:
          type: integer
          description: Number of lead entries in this list
          example: 7
        linked_qrs:
          type: array
          description: QR codes linked to this lead list
          items:
            type: object
            properties:
              qr_code__id:
                type: integer
                example: 150157
              qr_code__qrid:
                type: string
                example: Qff07909fe1c14923
              qr_code__name:
                type: string
                example: Androd
              qr_code__qr_type:
                type: string
                example: dy
        data:
          type: string
          description: JSON string containing lead list form configuration
          example: >-
            [{"type":"page_title","data":{"title":"<p>TEST FOR NEW LEAD
            NOPW</p>\n","cardStyle":{"backgroundColor":"#F8F8F8"}}},{"type":"page_layout","data":{"backgroundColor":"0a2e9b"}},{"type":"description_box","data":{"text":"<p>NEW
            LEAD
            NEW</p>\n","cardStyle":{"backgroundColor":"#F8F8F8"}}},{"type":"banner_images","data":{"images":[{"url":"https://qcg7-storage-staging.s3.amazonaws.com/media/uploads/560/2023/06/20230620_462316_qrcode.png"}]}},{"type":"lead_form","data":{"description":"Food
            Preference","questions":[{"question":"FOOD
            PREFERENCES","answer":{"type":"multipleChoice","data":[{"option":"VEG"},{"option":"NON
            VEG"}]},"isRequired":true}]}},{"type":"submit_button","data":{"label":"SUBMIT","color":{"label":"#585858","button":"#F8F8F8","border":"#F8F8F8"},"buttonStyle":{"borderWidth":1,"borderRadius":50}}},{"type":"skip_button","data":{"label":"SKIP","color":{"label":"#585858","button":"#F8F8F8","border":"#F8F8F8"},"buttonStyle":{"borderWidth":1,"borderRadius":50}}}]
        webhooks:
          type: array
          description: Webhooks configured for this lead list
          items:
            type: object
            properties:
              id:
                type: integer
                example: 16
              url:
                type: string
                example: https://webhook.site/8e85fafd-a4d0-433b-bf80-5bb11eed4ea6
              created:
                type: string
                format: date-time
                example: '2023-06-20T16:24:00.060154+05:30'
              modified:
                type: string
                format: date-time
                example: '2023-06-20T16:24:03.157414+05:30'
    ValidationErrorResponse:
      type: object
      properties:
        field_name:
          type: array
          items:
            type: string
          description: Field-specific validation errors
          example:
            - This field is required.
            - Invalid value provided.
      additionalProperties:
        type: array
        items:
          type: string
        description: Additional field validation errors
    AuthenticationErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Authentication error message
          example: Invalid token.
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Error message
          example: Not found.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Enter your API key directly in the Authorization
        header.

````