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

> Create a new campaign.

# Create a new campaign



## OpenAPI

````yaml post /campaigns
openapi: 3.0.0
info:
  title: Campaigns Service API
  description: Campaigns Service REST API
  version: '1.0'
  contact: {}
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3/campaigns
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security:
  - apikey: []
tags:
  - name: Notification Feed
    description: Operations on the per-user in-app notification feed.
  - name: Channels
    description: Manage channel instances and per-type availability.
  - name: Templates
    description: Manage templates and their versions.
  - name: Template Categories
    description: Manage template categories for feed filtering.
  - name: Campaigns
    description: Create, schedule, and manage notification campaigns.
  - name: Notifications
    description: Send notifications directly via API.
  - name: Push Notifications
    description: Manage push notification delivery and engagement.
  - name: Analytics
    description: Delivery and engagement analytics.
paths:
  /campaigns:
    post:
      tags:
        - Campaigns
      summary: Create a new campaign
      operationId: CampaignsController_create
      parameters:
        - name: appid
          in: header
          description: Tenant application ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignDto'
      responses:
        '201':
          description: Campaign created
components:
  schemas:
    CreateCampaignDto:
      type: object
      properties:
        name:
          type: string
          description: Campaign name
        templateId:
          type: string
          description: Template ID (CUID or templateId slug)
        templateVersion:
          type: number
          description: Template version number to pin
          minimum: 1
        variables:
          type: object
          description: >-
            Campaign-level default variables — applied to every recipient as a
            fallback layer below per-user CSV values and above template
            variableSchema defaults. Example: `{ "promoCode": "SUMMER25",
            "supportEmail": "help@acme.io" }`.
          example:
            promoCode: SUMMER25
        config:
          type: object
          description: Additional campaign configuration (free-form)
      required:
        - name
        - templateId
        - templateVersion
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: apikey
      description: Your CometChat REST API Key.

````