# Delete leads from a campaign

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /lead/delete:
    post:
      summary: Delete leads from a campaign
      deprecated: false
      description: >-
        Users can remove leads by providing the campaign ID and other optional
        parameters, such as deleting leads with matching domains. The action
        helps users efficiently manage their campaign's lead database by
        removing unwanted entries.
      operationId: Lead_lead/delete-leads-from-a-campaign
      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: Campaign ID
                  examples:
                    - 66b447598f6dd99f7f7b5c0a
                delete_all_from_company:
                  type: boolean
                  description: >-
                    Set to true if you would like to remove all leads with
                    matching domains
                  examples:
                    - true
                delete_list:
                  type: array
                  description: >-
                    A list of email addresses corresponding to the leads you
                    want to delete. Must include at least one email.
                  items:
                    type: string
                    description: ''
                    examples:
                      - lead1@example.com
                delete_parent_lead:
                  type: boolean
                  description: >-
                    Optional. default = true. Set it as false for Subsequence's
                    lead
              required:
                - workspace_id
                - delete_list
              x-apidog-orders:
                - workspace_id
                - campaign_id
                - delete_parent_lead
                - delete_all_from_company
                - delete_list
            examples: {}
      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:
                  message:
                    type: string
                    description: ''
                    examples:
                      - Validation error
                  error:
                    type: string
                    description: ''
                    examples:
                      - Validation error
                x-apidog-orders:
                  - message
                  - error
          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-17238010-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: []

```
