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

# Add Lead to Campaing-Blocklist

> Blocks specific contacts in a campaign using their LinkedIn public identifiers. Once blocked, these leads will not receive any messages from the campaign.

## Overview

Blocks specific contacts in a campaign using their LinkedIn public identifiers. Once blocked, these leads will not receive any messages from the campaign.

<Warning>
  **License Requirement**: This endpoint requires a **Pro** or **Agency** license to use.
</Warning>

## Use Cases

* **Prevent Outreach**: Block specific LinkedIn profiles from receiving campaign messages
* **Compliance**: Exclude contacts who have requested not to be contacted
* **Quality Control**: Remove leads that don't match your targeting criteria

## Authentication

All requests require an API key passed in the `x-api-key` header. You can generate your API key from the WaLead dashboard.

## Example Request

```bash theme={null}
curl -X POST https://app-api.walead.ai/api/v1/campaigns/CAMPAIGN_ID/blocked-leads \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "publicIdentifiers": [
      "john-doe",
      "jane-smith"
    ]
  }'
```

## Request Details

This endpoint requires an API key for authentication and accepts an array of LinkedIn public identifiers to block.

### Public Identifiers

The `publicIdentifiers` field should contain LinkedIn profile identifiers (the username part of a LinkedIn URL). For example, from `linkedin.com/in/john-doe`, the public identifier would be `john-doe`.

## Important Notes

* **License Required**: Pro or Agency license is required to use this endpoint
* The `publicIdentifiers` array is required and must not be empty
* You can block multiple leads in a single request
* Blocked leads will be excluded from all campaign activities
* This is a public route that requires API key authentication


## OpenAPI

````yaml POST /v1/campaigns/{campaignId}/blocked-leads
openapi: 3.1.0
info:
  title: WaLead API
  description: >-
    WaLead Public API for managing LinkedIn outreach campaigns, leads, and
    analytics
  version: 1.0.0
  contact:
    name: WaLead Support
    url: https://walead.ai
servers:
  - url: https://app-api.walead.ai/api
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /v1/campaigns/{campaignId}/blocked-leads:
    post:
      summary: Add Lead to Campaing-Blocklist
      description: >-
        Blocks specific contacts in a campaign using their LinkedIn public
        identifiers. Once blocked, these leads will not receive any messages
        from the campaign.
      parameters:
        - name: campaignId
          in: path
          description: Campaign ID
          required: true
          schema:
            type: string
      requestBody:
        description: Public identifiers of leads to block
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddBlockedLeads'
        required: true
      responses:
        '200':
          description: Leads blocked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddBlockedLeadsResponse'
        '400':
          description: Bad request - publicIdentifiers is required and must not be empty
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddBlockedLeads:
      type: object
      required:
        - publicIdentifiers
      properties:
        publicIdentifiers:
          type: array
          items:
            type: string
          description: >-
            Array of LinkedIn public identifiers to block (e.g., 'john-doe' from
            linkedin.com/in/john-doe)
    AddBlockedLeadsResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the operation was successful
        message:
          type: string
          description: Response message
        blocked:
          type: integer
          description: Number of leads blocked
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Generate from your WaLead dashboard.

````