# Update the status of a lead

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /lead/update/status:
    post:
      summary: Update the status of a lead
      deprecated: false
      description: >-
        Updates the status of a lead in the specified campaign and workspace.
        Only `new_status` set to `COMPLETED` is accepted.
      operationId: Lead_lead/update-the-status-of-a-lead
      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: The ID of the workspace containing the campaign.
                  examples:
                    - 65099a0dd96fae8ab61130c0
                campaign_id:
                  type: string
                  description: The ID of the campaign to which the lead belongs.
                  examples:
                    - 67838580ef4b6f32e67e7dfc
                email:
                  type: string
                  description: The email address of the lead whose status is being updated.
                  examples:
                    - notcontacted@plusvibe.ai
                new_status:
                  type: string
                  description: The new status for the lead. Only `COMPLETED` is accepted.
                  examples:
                    - COMPLETED
              required:
                - workspace_id
                - campaign_id
                - email
                - new_status
              x-apidog-orders:
                - workspace_id
                - campaign_id
                - email
                - new_status
      responses:
        '200':
          description: Successful update of the lead status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The status of the request.
                    examples:
                      - success
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: OK
        '400':
          description: Invalid input or missing required fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details of the error.
                    examples:
                      - Invalid new_status. Only 'COMPLETED' is allowed.
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: Unauthorized request due to an invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Authentication error message.
                    examples:
                      - Invalid API key.
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Details of the server error.
                    examples:
                      - Unexpected error occurred.
                x-apidog-orders:
                  - error
          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-17238013-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: []

```
