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

# Publish campaign

> Locks the config so the run is reproducible. Only a `draft` can be published. Scope `campaigns:write`.



## OpenAPI

````yaml /api-reference/openapi.json post /campaigns/{campaign_id}/publish
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /campaigns/{campaign_id}/publish:
    post:
      tags:
        - Campaigns
      summary: Publish campaign
      description: >-
        Locks the config so the run is reproducible. Only a `draft` can be
        published. Scope `campaigns:write`.
      operationId: publish_campaign_ca_api_v0_campaigns__campaign_id__publish_post
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
      responses:
        '200':
          description: Published campaign (status `published`)
        '409':
          description: Campaign is not a draft
          content:
            application/json:
              example:
                error:
                  code: conflict
                  message: Only draft campaigns can be published
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````