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

# Create a DRAFT campaign (confirm currency first)



## OpenAPI

````yaml /openapi/buyer.yaml post /api/v2/buyer/campaigns
openapi: 3.1.0
info:
  title: Semicola Exchange buyer API
  version: 2.0.0
  description: >-
    Buyer endpoints: advertisers, storefronts and connections, product
    discovery, campaigns, proposals, media buys, creatives and reporting. Every
    write accepts an Idempotency-Key header.
servers:
  - url: https://api.semicola.com
security:
  - bearerAuth: []
  - sessionCookie: []
tags:
  - name: Advertisers
  - name: Storefronts
  - name: Product Discovery
  - name: Campaigns
  - name: Media Buys
  - name: Creatives
  - name: Reporting
  - name: Event Sources
  - name: Webhooks
  - name: Tasks
  - name: Audit Logs
paths:
  /api/v2/buyer/campaigns:
    post:
      tags:
        - Campaigns
      summary: Create a DRAFT campaign (confirm currency first)
      operationId: postBuyerCampaigns
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 16
            maxLength: 255
            pattern: ^[A-Za-z0-9_.:-]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                advertiserId:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                brief:
                  type: string
                  maxLength: 20000
                flightDates:
                  type: object
                  properties:
                    startDate:
                      type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                    endDate:
                      type: string
                      pattern: ^\d{4}-\d{2}-\d{2}$
                  required:
                    - startDate
                    - endDate
                budget:
                  type: object
                  properties:
                    total:
                      type: string
                      pattern: ^-?\d+(\.\d{1,6})?$
                    currency:
                      type: string
                      pattern: ^[A-Z]{3}$
                    dailyCap:
                      type: string
                      pattern: ^-?\d+(\.\d{1,6})?$
                    pacing:
                      default: EVEN
                      type: string
                      enum:
                        - EVEN
                        - ASAP
                        - FRONTLOADED
                  required:
                    - total
                    - currency
                management:
                  default: managed
                  type: string
                  enum:
                    - managed
                    - tracked
                constraints:
                  type: object
                  properties:
                    countries:
                      type: array
                      items:
                        type: string
                        pattern: ^[A-Z]{2}$
                    channels:
                      type: array
                      items:
                        type: string
                        enum:
                          - display
                          - olv
                          - social
                          - search
                          - ctv
                          - linear_tv
                          - radio
                          - streaming_audio
                          - podcast
                          - dooh
                          - ooh
                          - print
                          - cinema
                          - email
                          - gaming
                          - retail_media
                          - influencer
                          - affiliate
                          - product_placement
                          - sponsored_intelligence
                    geoRegions:
                      type: array
                      items:
                        type: string
                    geoMetros:
                      type: array
                      items:
                        type: string
                    language:
                      type: string
                    audience:
                      type: string
                    ageRange:
                      type: object
                      properties:
                        min:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        max:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - min
                        - max
                autonomy:
                  type: object
                  properties:
                    inventorySelection:
                      type: string
                      enum:
                        - manual
                        - propose
                        - automatic
                    rebriefing:
                      type: string
                      enum:
                        - manual
                        - propose
                        - automatic
                  required:
                    - inventorySelection
                    - rebriefing
                storefrontIds:
                  type: array
                  items:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                discoveryId:
                  type: string
              required:
                - advertiserId
                - name
                - flightDates
                - budget
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - type: object
                        properties:
                          campaign:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 5
                              advertiserId:
                                type: integer
                                exclusiveMinimum: 0
                                maximum: 9007199254740991
                              customerId:
                                type: integer
                                exclusiveMinimum: 0
                                maximum: 9007199254740991
                              name:
                                type: string
                                minLength: 1
                              brief:
                                type:
                                  - string
                                  - 'null'
                              status:
                                type: string
                                enum:
                                  - DRAFT
                                  - ACTIVE
                                  - PAUSED
                                  - COMPLETED
                                  - CANCELED
                                  - ARCHIVED
                              management:
                                type: string
                                enum:
                                  - managed
                                  - tracked
                              flightStart:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                              flightEnd:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                              budgetTotal:
                                type: string
                                pattern: ^-?\d+(\.\d{1,6})?$
                              currency:
                                type: string
                                pattern: ^[A-Z]{3}$
                              dailyCap:
                                anyOf:
                                  - type: string
                                    pattern: ^-?\d+(\.\d{1,6})?$
                                  - type: 'null'
                              pacing:
                                type: string
                                enum:
                                  - EVEN
                                  - ASAP
                                  - FRONTLOADED
                              constraints:
                                anyOf:
                                  - type: object
                                    properties:
                                      countries:
                                        type: array
                                        items:
                                          type: string
                                          pattern: ^[A-Z]{2}$
                                      channels:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - display
                                            - olv
                                            - social
                                            - search
                                            - ctv
                                            - linear_tv
                                            - radio
                                            - streaming_audio
                                            - podcast
                                            - dooh
                                            - ooh
                                            - print
                                            - cinema
                                            - email
                                            - gaming
                                            - retail_media
                                            - influencer
                                            - affiliate
                                            - product_placement
                                            - sponsored_intelligence
                                      geoRegions:
                                        type: array
                                        items:
                                          type: string
                                      geoMetros:
                                        type: array
                                        items:
                                          type: string
                                      language:
                                        type: string
                                      audience:
                                        type: string
                                      ageRange:
                                        type: object
                                        properties:
                                          min:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          max:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                        required:
                                          - min
                                          - max
                                        additionalProperties: false
                                    additionalProperties: false
                                  - type: 'null'
                              channelGroups:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        channelGroupId:
                                          type: string
                                        name:
                                          type: string
                                        channels:
                                          type: array
                                          items:
                                            type: string
                                            enum:
                                              - display
                                              - olv
                                              - social
                                              - search
                                              - ctv
                                              - linear_tv
                                              - radio
                                              - streaming_audio
                                              - podcast
                                              - dooh
                                              - ooh
                                              - print
                                              - cinema
                                              - email
                                              - gaming
                                              - retail_media
                                              - influencer
                                              - affiliate
                                              - product_placement
                                              - sponsored_intelligence
                                        budgetShare:
                                          type: number
                                          minimum: 0
                                          maximum: 1
                                      required:
                                        - channelGroupId
                                        - name
                                        - channels
                                      additionalProperties: false
                                  - type: 'null'
                              performanceConfig:
                                anyOf:
                                  - type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties: {}
                                  - type: 'null'
                              autonomy:
                                anyOf:
                                  - type: object
                                    properties:
                                      inventorySelection:
                                        type: string
                                        enum:
                                          - manual
                                          - propose
                                          - automatic
                                      rebriefing:
                                        type: string
                                        enum:
                                          - manual
                                          - propose
                                          - automatic
                                    required:
                                      - inventorySelection
                                      - rebriefing
                                    additionalProperties: false
                                  - type: 'null'
                              frequencyCaps:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        maxImpressions:
                                          type: integer
                                          exclusiveMinimum: 0
                                          maximum: 9007199254740991
                                        window:
                                          type: string
                                      required:
                                        - maxImpressions
                                        - window
                                      additionalProperties: false
                                  - type: 'null'
                              labels:
                                anyOf:
                                  - type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties:
                                      type: string
                                  - type: 'null'
                              discoveryId:
                                anyOf:
                                  - type: string
                                    minLength: 5
                                  - type: 'null'
                              revision:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              launchedAt:
                                anyOf:
                                  - type: string
                                    format: date-time
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                  - type: 'null'
                              createdAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                              updatedAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                            required:
                              - id
                              - advertiserId
                              - customerId
                              - name
                              - brief
                              - status
                              - management
                              - flightStart
                              - flightEnd
                              - budgetTotal
                              - currency
                              - dailyCap
                              - pacing
                              - constraints
                              - channelGroups
                              - performanceConfig
                              - autonomy
                              - frequencyCaps
                              - labels
                              - discoveryId
                              - revision
                              - launchedAt
                              - createdAt
                              - updatedAt
                            additionalProperties: false
                          warnings:
                            type: array
                            items:
                              type: string
                        required:
                          - campaign
                          - warnings
                        additionalProperties: false
                      - type: 'null'
                  error:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          field:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                      - type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        default:
          description: >-
            Error envelope `{data: null, error: {code, message, field?,
            details?}}`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or OAuth access token.
    sessionCookie:
      type: apiKey
      in: cookie
      name: sc_session

````