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

# Pause Campaign

> Pauses a running campaign, halting all outbound message sending. The campaign
can be relaunched later. Requires `campaigns:launch` permission.




## OpenAPI

````yaml POST /api/campaigns/{id}/pause
openapi: 3.1.0
info:
  title: Naturalead Campaigns API
  version: 1.0.0
  description: >
    API for managing outreach campaigns in the Naturalead platform. Campaigns

    orchestrate batch AI-driven conversations with leads across messaging
    channels.

    All endpoints require API key authentication and are scoped

    to the caller's account.
servers:
  - url: '{baseUrl}'
    description: API server
    variables:
      baseUrl:
        default: http://localhost:3001
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Campaigns
    description: Campaign CRUD, launch, pause, and channel discovery
paths:
  /api/campaigns/{id}/pause:
    post:
      tags:
        - Campaigns
      summary: Pause campaign
      description: >
        Pauses a running campaign, halting all outbound message sending. The
        campaign

        can be relaunched later. Requires `campaigns:launch` permission.
      operationId: pauseCampaign
      parameters:
        - $ref: '#/components/parameters/CampaignId'
      responses:
        '200':
          description: Campaign paused successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '404':
          description: Campaign not found or not running
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Campaign not found or not running
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    CampaignId:
      name: id
      in: path
      required: true
      description: Campaign ID (MongoDB ObjectId)
      schema:
        type: string
        example: 665a1b2c3d4e5f6a7b8c9d0e
  schemas:
    Campaign:
      type: object
      description: A campaign orchestrates batch AI-driven outreach to leads.
      properties:
        _id:
          type: string
          description: Unique campaign identifier
        accountId:
          type: string
          description: Account that owns this campaign
        name:
          type: string
          description: Campaign display name
        agentConfigId:
          type: string
          description: Reference to the AI agent configuration used for conversations
        channel:
          type: string
          enum:
            - whatsapp
            - telegram
            - email
          default: whatsapp
          description: Messaging channel for outreach
        status:
          type: string
          enum:
            - draft
            - scheduled
            - running
            - paused
            - completed
          default: draft
          description: Current campaign lifecycle status
        leadFilter:
          $ref: '#/components/schemas/LeadFilter'
        advancedFilter:
          $ref: '#/components/schemas/AdvancedFilter'
        manualLeadIds:
          type: array
          items:
            type: string
          description: Explicitly selected lead IDs to include in the campaign
        schedule:
          $ref: '#/components/schemas/Schedule'
        leads:
          type: array
          items:
            $ref: '#/components/schemas/CampaignLead'
          description: Per-lead tracking for the campaign
        stats:
          $ref: '#/components/schemas/CampaignStats'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - accountId
        - name
        - agentConfigId
        - channel
        - status
        - schedule
        - leads
        - stats
        - createdAt
        - updatedAt
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    LeadFilter:
      type: object
      description: Basic lead filter criteria.
      properties:
        statuses:
          type: array
          items:
            type: string
          description: Filter leads by status values
        tags:
          type: array
          items:
            type: string
          description: Filter leads by tag values
        importedAfter:
          type: string
          format: date-time
          description: Only include leads imported after this timestamp
    AdvancedFilter:
      type: object
      description: Advanced filter with multiple conditions.
      properties:
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FilterCondition'
      required:
        - conditions
    Schedule:
      type: object
      description: Campaign scheduling and rate limit configuration.
      properties:
        startAt:
          type: string
          format: date-time
          description: Scheduled start time for the campaign
        rateLimit:
          type: integer
          default: 5
          description: Maximum messages per minute
        activeHours:
          type: object
          description: Time window during which messages are sent
          properties:
            start:
              type: string
              description: Start time in HH:mm format
              example: '09:00'
            end:
              type: string
              description: End time in HH:mm format
              example: '17:00'
            timezone:
              type: string
              description: IANA timezone identifier
              example: America/New_York
          required:
            - start
            - end
            - timezone
        activeDays:
          type: array
          items:
            type: integer
            minimum: 0
            maximum: 6
          description: >-
            Days of the week when the campaign is active (0=Sunday through
            6=Saturday)
          example:
            - 1
            - 2
            - 3
            - 4
            - 5
    CampaignLead:
      type: object
      description: Tracks the status of a single lead within a campaign.
      properties:
        leadId:
          type: string
          description: Reference to the lead
        status:
          type: string
          enum:
            - pending
            - sent
            - replied
            - qualified
            - disqualified
            - failed
          description: Current outreach status for this lead
        conversationId:
          type: string
          description: Reference to the conversation created for this lead
        sentAt:
          type: string
          format: date-time
          description: Timestamp when the first message was sent
        error:
          type: string
          description: Error message if the outreach failed
      required:
        - leadId
        - status
    CampaignStats:
      type: object
      description: Aggregate statistics for the campaign.
      properties:
        totalLeads:
          type: integer
          default: 0
        sent:
          type: integer
          default: 0
        delivered:
          type: integer
          default: 0
        replied:
          type: integer
          default: 0
        qualified:
          type: integer
          default: 0
        disqualified:
          type: integer
          default: 0
        failed:
          type: integer
          default: 0
    FilterCondition:
      type: object
      description: A single filter condition for advanced lead filtering.
      properties:
        field:
          type: string
          description: The lead field to filter on
        operator:
          type: string
          description: Comparison operator (e.g., eq, ne, contains, gt, lt)
        value:
          description: The value to compare against
      required:
        - field
        - operator
        - value
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Failed to process request
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        API key for programmatic access. Keys use the format `nl_live_<64 hex>`
        or `nl_test_<64 hex>` and are scoped to an account's RBAC permissions.
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Bearer token using an API key (format: nl_live_* or nl_test_*).

````