# Lead Variable/Label Update or Add

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /lead/data/update:
    post:
      summary: Lead Variable/Label Update or Add
      deprecated: false
      description: >-
        When using this endpoint, existing variables/label in the lead's data
        will be updated, and new variables provided in the `variables` property
        will be added to the lead's data.
      operationId: Lead_lead/lead-variable-update-or-add
      tags:
        - Lead
        - Lead
      parameters:
        - name: x-api-key
          in: header
          description: Your PlusVibe.ai account's API Key
          required: false
          example: ''
          schema:
            type: string
            description: Your PlusVibe.ai account's API Key
            default: ''
            examples:
              - your-api-key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: Workspace ID
                  examples:
                    - 65f3c92d3dbe5dbb35374a9a
                campaign_id:
                  type: string
                  description: The campaign ID of the lead to be updated
                  examples:
                    - 66b447598f6dd99f7f7b5c0a
                email:
                  type: string
                  description: The email of the lead to be updated
                  format: email
                  examples:
                    - lead@example.com
                variables:
                  type: object
                  description: >-
                    A key-value pair object containing the custom variables to
                    be updated. Existing variables will be updated, and new
                    variables will be added.
                  properties:
                    label:
                      type: string
                      description: The label of the lead to be updated
                      examples:
                        - NOT_INTERESTED
                    first_name:
                      type: string
                      description: ''
                      examples:
                        - New First Name
                    language:
                      type: string
                      description: ''
                      examples:
                        - Javascript
                    interest:
                      type: string
                      description: ''
                      examples:
                        - Coding
                  x-apidog-orders:
                    - label
                    - first_name
                    - language
                    - interest
              required:
                - workspace_id
                - email
                - variables
              x-apidog-orders:
                - workspace_id
                - campaign_id
                - email
                - variables
            example:
              workspace_id: 65f3c92d3dbe5dbb35374a9a
              campaign_id: 66b447598f6dd99f7f7b5c0a
              email: lead@example.com
              variables:
                label: NOT_INTERESTED
                first_name: New First Name
                language: Javascript
                interest: Coding
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: ''
                    examples:
                      - success
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: OK
        '400':
          description: Validation or other error
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: Server Error
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Lead
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-17238011-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
