> ## 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.

# Create Campaign

> Creates a new campaign in your workspace

## Overview

Creates a new campaign in your workspace. If your workspace has only one LinkedIn account, it will be automatically associated with the campaign.

## Authentication

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


## OpenAPI

````yaml POST /v1/campaigns
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:
    post:
      summary: Create Campaign
      description: Creates a new campaign in your workspace
      requestBody:
        description: Campaign to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaign'
        required: true
      responses:
        '200':
          description: Campaign created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateCampaign:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Campaign name
    Campaign:
      type: object
      properties:
        id:
          type: string
          description: Unique campaign identifier
        name:
          type: string
          description: Campaign name
        status:
          type: string
          enum:
            - active
            - paused
            - completed
            - error
            - draft
          description: Campaign status
        progress:
          type: number
          description: Campaign progress percentage (0-100)
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp of creation
        settings:
          type: object
          description: Campaign configuration settings
        coreVariables:
          type: object
          description: Core variables enabled for this campaign
        customVariables:
          type: object
          description: Custom variables defined for this campaign
        linkedinAccounts:
          type: array
          items:
            type: string
          description: Array of LinkedIn account IDs associated with the campaign
        analytics:
          type: object
          properties:
            acceptanceRate:
              type: number
              description: Connection acceptance rate (0-1)
            responseRate:
              type: number
              description: Message response rate (0-1)
            totalLeads:
              type: integer
              description: Total number of leads in the campaign
    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.

````