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

# Create campaigns

> Create one or more campaigns.



## OpenAPI

````yaml /plugins/soundcheck/openapi.yaml post /campaigns
openapi: 3.0.0
info:
  title: soundcheck
  version: 0.1.0
  description: API for interacting with Soundcheck.
servers:
  - url: https://backstage.example.com/api/soundcheck
security: []
tags:
  - name: Campaigns
  - name: Certification
  - name: CheckResults
  - name: Checks
  - name: FactCollectors
  - name: Facts
  - name: Tracks
paths:
  /campaigns:
    post:
      tags:
        - Campaigns
      summary: Create campaigns
      description: Create one or more campaigns.
      operationId: createCampaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignsRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No permission to create campaign
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    CreateCampaignsRequest:
      type: object
      properties:
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
      required:
        - campaigns
      additionalProperties: false
    CampaignsResponse:
      type: object
      properties:
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
      required:
        - campaigns
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
            message:
              type: string
          required:
            - name
            - message
          additionalProperties: true
        request:
          type: object
          properties:
            method:
              type: string
            url:
              type: string
          required:
            - method
            - url
          additionalProperties: false
        response:
          type: object
          properties:
            statusCode:
              type: integer
          required:
            - statusCode
          additionalProperties: false
      required:
        - error
        - response
      additionalProperties: false
    Campaign:
      type: object
      properties:
        id:
          type: string
        group:
          type: string
        type:
          type: string
          enum:
            - campaign
          default: campaign
        badge:
          $ref: '#/components/schemas/Badge'
        levels:
          type: array
          items:
            $ref: '#/components/schemas/Level'
          minItems: 1
        filter:
          $ref: '#/components/schemas/EntityFilter'
        exclude:
          $ref: '#/components/schemas/EntityFilter'
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          minLength: 1
        ownerEntityRef:
          type: string
        documentationURL:
          type: string
        badgeType:
          type: string
          enum:
            - medal
            - status
        draft:
          type: boolean
        isEditable:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
        archived:
          type: boolean
        supportChannel:
          type: string
        startDate:
          type: string
        targetCompletionDate:
          type: string
        milestones:
          type: array
          items:
            $ref: '#/components/schemas/Milestone'
      required:
        - id
        - name
        - description
        - ownerEntityRef
        - levels
        - type
      additionalProperties: false
      description: >
        Note: Additional validation rules are enforced at runtime via Zod and
        are not fully represented in this OpenAPI schema.
    Badge:
      type: object
      properties:
        color:
          type: string
          pattern: ^#(?:[0-9a-fA-F]{3}){1,2}$
        type:
          type: string
          enum:
            - medal
            - status
        svg:
          type: string
      additionalProperties: false
    Level:
      type: object
      properties:
        ordinal:
          type: integer
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
        badge:
          $ref: '#/components/schemas/Badge'
        checks:
          type: array
          items:
            $ref: '#/components/schemas/TrackCheck'
          minItems: 1
      required:
        - ordinal
        - checks
      additionalProperties: false
    EntityFilter:
      oneOf:
        - type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
        - type: array
          items:
            type: object
            additionalProperties:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
    Milestone:
      type: object
      additionalProperties: true
    TrackCheck:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          minLength: 1
        filter:
          $ref: '#/components/schemas/EntityFilter'
        exclude:
          $ref: '#/components/schemas/EntityFilter'
      required:
        - id
        - name
        - description
      additionalProperties: false

````