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

# Create a campaign

> 새로운 광고 캠페인을 생성하고 생성된 캠페인을 반환합니다.

엑세스 제어:
- 관리자와 광고주 계정은 캠페인을 생성할 수 있습니다.
- 리테일러 계정은 캠페인을 생성할 수 없습니다.



## OpenAPI

````yaml /openapi/adm.openapi.ko-0.2.2.json post /campaigns
openapi: 3.1.0
info:
  description: >-
    ## 소개

    Data Management API는 광고 및 추천 시스템이 활용하는 **다양한 데이터를** 종합적으로 관리해, Decision API가
    정확하고 효율적으로 작동할 수 있도록 돕습니다.


    캠페인이나 지면을 신규 등록하고 수정·삭제하는 것은 물론, **로그 및 통계 분석을** 통해 시스템 운영에 필요한 인사이트를 확보합니다.
    이렇게 확보된 데이터와 통계는 Decision API에서 최적화된 광고·콘텐츠를 결정하는 데 활용되며, 전체 광고·추천 시스템의 성능
    향상에 이바지합니다.
  title: Data Management APIs
  version: 0.1.3
servers: []
security: []
tags:
  - name: Audience Targeting
  - description: >
      오디언스 관리 API를 사용하여 오디언스 관련 데이터를 통합할 수 있습니다.


      참고:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Audience
  - description: >
      광고 타겟팅 및 성과 최적화를 위한 사용자 활동 로그 수집 API.


      활동 로그는 광고 상호작용 여부와 관계없이 모든 사용자의 상품 조회, 검색, 장바구니 추가, 구매 등 실제 사용자 행동을 기록합니다.


      참고:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Activity Log
  - description: >
      오디언스 속성 API로 오디언스 속성 데이터에 액세스할 수 있습니다.


      참고:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Attribute
  - description: >
      오디언스 세그먼트 API로 오디언스 세그먼트 데이터에 액세스할 수 있습니다.


      참고:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Segment
  - description: >
      광고 타겟팅 및 성과 최적화를 위한 사용자 활동 로그 수집 API.


      활동 로그는 광고 상호작용 여부와 관계없이 모든 사용자의 상품 조회, 검색, 장바구니 추가, 구매 등 실제 사용자 행동을 기록합니다.


      참고:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Activity Log
  - description: >
      오디언스 속성 API로 오디언스 속성 데이터에 액세스할 수 있습니다.


      참고:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Attribute
  - description: >
      오디언스 세그먼트 API로 오디언스 세그먼트 데이터에 액세스할 수 있습니다.


      참고:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Segment
  - description: 분석 API는 대시보드 및 A2 메트릭 데이터에 액세스할 수 있습니다.
    name: Analytic
  - description: >-
      결제 정보를 관리하는 결제 API입니다.

      A2는 리테일 플랫폼에서 사용하는 결제 시스템과 통합되도록 구성되어 있습니다.


      결제를 통합하려면 먼저 외부 채널을 등록해야 합니다.

      결제 시스템과 통합하는 방법에 대한 자세한 내용은 [외부 채널
      페이지](https://docs.aiderx.io/guides/about-a2/en/external-channel)를 참고하세요.
    name: Billing
  - description: |
      캠페인 데이터를 관리하는 캠페인 API입니다.

      관련 문서:
      - [Campaign](https://docs.aiderx.io/guides/about-a2/en/campaign)
    name: Campaign
  - description: |
      소재 및 관련 리소스를 관리하는 크리에이티브 API입니다.

      관련 문서:
      - [Creative](https://docs.aiderx.io/guides/about-a2/en/creative)
    name: Creative
  - description: |
      배정 및 관련 리소스를 관리하는 할당 API입니다.

      관련 문서:
      - [Allocation](https://docs.aiderx.io/guides/about-a2/en/allocation)
    name: Allocation
  - description: |
      미디어 라이브러리 및 관련 리소스를 관리하는 미디어 라이브러리 API입니다.

      관련 문서:
      - [Media Library](https://docs.aiderx.io/guides/about-a2/en/media-library)
    name: Media Library
  - description: |
      소재 및 관련 리소스를 관리하는 크리에이티브 API입니다.

      관련 문서:
      - [Creative](https://docs.aiderx.io/guides/about-a2/en/creative)
    name: Creative
  - description: |
      배정 및 관련 리소스를 관리하는 할당 API입니다.

      관련 문서:
      - [Allocation](https://docs.aiderx.io/guides/about-a2/en/allocation)
    name: Allocation
  - description: |
      미디어 라이브러리 및 관련 리소스를 관리하는 미디어 라이브러리 API입니다.

      관련 문서:
      - [Media Library](https://docs.aiderx.io/guides/about-a2/en/media-library)
    name: Media Library
  - description: >
      카탈로그 관리 API는 카탈로그 및 관련 리소스를 관리하는 기능을 제공합니다.


      관련 문서:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Catalog
  - description: |
      지면 관리 API는 지면 및 관련 리소스를 관리하는 기능을 제공합니다.

      관련 문서:
      - [Placement](https://docs.aiderx.io/guides/about-a2/en/placement)
    name: Placement
  - description: |
      지면 카탈로그는 지면 정보를 구조화된 “광고 제품”으로 변환하여 광고주에게 쉽게 제시할 수 있습니다.

      관련 문서:
      - 업데이트 예정
    name: Placement Catalog
  - description: |
      지면 카탈로그는 지면 정보를 구조화된 “광고 제품”으로 변환하여 광고주에게 쉽게 제시할 수 있습니다.

      관련 문서:
      - 업데이트 예정
    name: Placement Catalog
  - description: >
      시스템 레벨 설정 및 자산(로고 및 구성 값)에 액세스하고 관리할 수 있는 시스템 API입니다.


      관련 문서:

      - [Yield Optimization
      Settings](https://docs.aiderx.io/guides/about-a2/en/yield-optimization)
    name: System
  - description: >
      인증 및 사용자 관리 기능을 제공합니다.


      관련 문서:

      - [Account and
      Budget](https://docs.aiderx.io/guides/about-a2/en/account-and-budget)
    name: Auth and User
  - description: 라이선스 관리 기능을 제공합니다.
    name: License
  - description: 라이선스 관리 기능을 제공합니다.
    name: License
paths:
  /campaigns:
    post:
      tags:
        - Campaign
      summary: Create a campaign
      description: |-
        새로운 광고 캠페인을 생성하고 생성된 캠페인을 반환합니다.

        엑세스 제어:
        - 관리자와 광고주 계정은 캠페인을 생성할 수 있습니다.
        - 리테일러 계정은 캠페인을 생성할 수 없습니다.
      operationId: handle_create_campaign_campaigns_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignCreateSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSchema'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CampaignCreateSchema:
      description: 캠페인 생성을 위한 스키마
      properties:
        audience_segments:
          anyOf:
            - type: object
            - type: 'null'
          description: 타켓팅을 위한 오디언스 세그먼트 목록
          title: Audience Segments
        bid_strategy:
          deprecated: true
          description: 캠페인을 위한 입찰 전략
          enum:
            - highest_volume
            - bid_cap
          title: Bid Strategy
          type: string
        budget:
          default: 0
          description: 캠페인의 총 예산
          title: Budget
          type: number
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 생성 일시
          title: Created At
        crid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          deprecated: true
          title: Crid
        daily_budget:
          anyOf:
            - type: number
            - type: 'null'
          deprecated: true
          title: Daily Budget
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: 캠페인의 설명
          title: Description
        end_date:
          description: 캠페인의 종료 일시 (UTC 시간을 사용하는 것을 강력히 권장합니다)
          format: date-time
          title: End Date
          type: string
        goal:
          description: 캠페인 목표
          enum:
            - click
            - reach
            - impression
            - conversion
          title: Goal
          type: string
        max_bid:
          default: 0
          description: |-
            최대 입찰가
            (입찰 전략을 `maximize_volume`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Max Bid
          type: number
        min_daily_imp:
          default: 1000
          description: 내부 사용 목적
          minimum: 1000
          title: Min Daily Imp
          type: number
        name:
          description: 캠페인 이름
          title: Name
          type: string
        owner_id:
          description: 캠페인의 소유자 id
          format: uuid
          title: Owner Id
          type: string
        start_date:
          description: 캠페인의 시작 일시 (UTC 시간 사용 권장)
          format: date-time
          title: Start Date
          type: string
        status:
          $ref: '#/components/schemas/CampaignStatus'
        sub_goal:
          anyOf:
            - type: string
            - type: 'null'
          description: 캠페인 세부 목표
          title: Sub Goal
        tagid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          deprecated: true
          title: Tagid
        target_cpa:
          default: 0
          description: 결과당 목표 비용
          minimum: 0
          title: Target Cpa
          type: number
        target_cpm:
          default: 0
          description: |-
            1000번 노출당 지출하기 윈하는 희망가
            (세부목표를 `target_cpm`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Target Cpm
          type: number
        target_volume:
          default: 0
          description: |-
            캠페인 기간 내에 보장받을 노출수
            (세부목표를 `target_volume`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Target Volume
          type: number
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 변경 일시
          title: Updated At
      required:
        - name
        - start_date
        - end_date
        - goal
        - status
        - bid_strategy
        - owner_id
      title: CampaignCreateSchema
      type: object
    CampaignSchema:
      description: 캠페인의 모든 속성을 정의한 스키마
      properties:
        audience_segments:
          anyOf:
            - type: object
            - type: 'null'
          description: 타겟팅을 위한 오디언스 세그먼트 목록
          title: Audience Segments
        bid_strategy:
          deprecated: true
          description: 캠페인을 위한 입찰 전략
          enum:
            - highest_volume
            - bid_cap
          title: Bid Strategy
          type: string
        budget:
          default: 0
          description: 캠페인의 총 예산
          title: Budget
          type: number
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 생성 일시
          title: Created At
        crid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          deprecated: true
          title: Crid
        daily_budget:
          anyOf:
            - type: number
            - type: 'null'
          deprecated: true
          title: Daily Budget
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: 캠페인의 설명
          title: Description
        end_date:
          description: 캠페인의 종료 일시 (UTC 시간 사용 권장)
          title: End Date
          type: string
        goal:
          description: 캠페인 목표
          enum:
            - click
            - reach
            - impression
            - conversion
          title: Goal
          type: string
        id:
          description: 캠페인의 id
          format: uuid
          title: Id
          type: string
        max_bid:
          default: 0
          description: |-
            최대 입찰가
            (입찰 전략을 `maximize_volume`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Max Bid
          type: number
        min_daily_imp:
          default: 1000
          description: 내부 사용 목적
          minimum: 1000
          title: Min Daily Imp
          type: number
        name:
          description: 캠페인 이름
          title: Name
          type: string
        'no':
          title: 'No'
          type: integer
        owner_id:
          description: 캠페인의 소유자 id
          format: uuid
          title: Owner Id
          type: string
        start_date:
          description: 캠페인의 시작 일시 (UTC 시간 사용 권장)
          title: Start Date
          type: string
        status:
          $ref: '#/components/schemas/CampaignStatus'
        sub_goal:
          anyOf:
            - type: string
            - type: 'null'
          description: 캠페인 세부 목표
          title: Sub Goal
        tagid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          deprecated: true
          title: Tagid
        target_cpa:
          default: 0
          description: 결과당 목표 비용
          minimum: 0
          title: Target Cpa
          type: number
        target_cpm:
          default: 0
          description: |-
            1000번 노출당 지출하기 윈하는 희망가
            (세부목표를 `target_cpm`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Target Cpm
          type: number
        target_volume:
          default: 0
          description: |-
            캠페인 기간 내에 보장받을 노출수
            (세부목표를 `target_volume`으로 설정한 경우에만 유효함)
          minimum: 0
          title: Target Volume
          type: number
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 변경 일시
          title: Updated At
      required:
        - name
        - start_date
        - end_date
        - goal
        - status
        - bid_strategy
        - owner_id
        - 'no'
      title: CampaignSchema
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    CampaignStatus:
      description: 캠페인 상태 정보
      enum:
        - okay
        - preparing
        - ready
        - archived
      title: CampaignStatus
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    OAuth2PasswordBearer:
      flows:
        password:
          scopes: {}
          tokenUrl: auth/jwt/login
      type: oauth2

````