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

# Create Offer



## OpenAPI

````yaml POST /offering/offer
openapi: 3.0.0
info:
  title: Offering API
  description: Offering API for enabling publishers to push new assets
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.appcharge.com
security: []
tags: []
paths:
  /offering/offer:
    post:
      tags:
        - Offers
      operationId: create-offer
      parameters:
        - name: x-publisher-token
          required: true
          in: header
          description: The publisher token
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOfferDto'
            example:
              publisherOfferId: offer1
              name: Test_Bundle
              type: Bundle
              active: true
              segments:
                - NewUser
              productsSequence:
                - index: 1
                  priceInUsdCents: 300
                  products: []
              priceDiscount:
                priceBeforeDiscount: 1000
                discount: 10
                type: percentage
      responses:
        '201':
          description: Create a new Offer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfferDtoResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  requestUrl:
                    type: string
                  body:
                    type: string
        '401':
          description: Not Authorized
components:
  schemas:
    CreateOfferDto:
      type: object
      required:
        - publisherOfferId
        - name
        - type
        - active
        - segments
        - productsSequence
      properties:
        publisherOfferId:
          type: string
          description: The publisher offer Id
        name:
          type: string
          description: The name of the offer (at least 3 letters)
        displayName:
          type: string
          description: If not specified, the offer name will be used
        description:
          type: string
          description: The description of the offer (conditionally returned)
        type:
          type: string
          description: The type of the offer - Bundle, SpecialOffer
        offerUiId:
          type: string
          description: >
            Internal ID for the Offer UI (required if offerExternalUiId not
            provided)
        offerExternalUiId:
          type: string
          description: >
            The offer UI ID as configured by the publisher (if provided,
            offerUiId is not required)
        publisherSectionId:
          type: string
          description: |
            The publisher section ID (applies only to Bundle)
        dynamicOfferUi:
          $ref: '#/components/schemas/DynamicOfferUiDto'
        active:
          type: boolean
          description: Whether the offer is active
        segments:
          type: array
          items:
            type: string
          description: |
            IDs of player segments (["NewUser", "BigSpender"] etc.)
        productsSequence:
          type: array
          items:
            $ref: '#/components/schemas/ProductsSequence'
        schedule:
          type: object
          properties:
            permanent:
              type: boolean
              default: true
            timeFrames:
              type: array
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    format: date-time
                  endTime:
                    type: string
                    format: date-time
                  notes:
                    type: string
                required:
                  - startTime
                  - endTime
            intervals:
              type: string
          required:
            - permanent
            - timeFrames
        priceDiscount:
          $ref: '#/components/schemas/PriceDiscountDto'
    OfferDtoResponse:
      type: object
      properties:
        offerId:
          type: string
        publisherOfferId:
          type: string
        name:
          type: string
        displayName:
          type: string
        description:
          type: string
        type:
          type: string
        createdBy:
          type: string
        offerUi:
          $ref: '#/components/schemas/OfferUiDto'
        dynamicOfferUi:
          $ref: '#/components/schemas/DynamicOfferUiDto'
        active:
          type: boolean
        segments:
          type: array
          items:
            type: string
        productsSequence:
          type: array
          items:
            $ref: '#/components/schemas/ProductsSequenceResponse'
        startOver:
          type: boolean
        priority:
          type: number
        showAfter:
          type: string
        triggers:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              eventName:
                type: string
              every:
                type: integer
              rules:
                type: array
                items: {}
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DynamicOfferUiDto:
      type: object
      properties:
        badges:
          type: array
          items:
            type: object
            properties:
              publisherBadgeId:
                type: string
              position:
                type: string
          description: The badges of the offer
        salePercentage:
          type: number
        salePercentageDisplayType:
          type: string
          default: percentage
    ProductsSequence:
      type: object
      properties:
        index:
          type: number
        priceInUsdCents:
          type: number
        playerAvailability:
          type: number
        products:
          type: array
          items:
            $ref: '#/components/schemas/ProductsSet'
      required:
        - index
        - priceInUsdCents
        - products
    PriceDiscountDto:
      type: object
      properties:
        priceBeforeDiscount:
          type: integer
          description: Offer amount in USD before sale is applied
        discount:
          type: integer
          description: Sale amount in percentage
        type:
          type: string
          description: >
            Discount type. Defaults to 'percentage'. Optional values:
            'percentage', 'multiplier', 'fixed_amount'.
          enum:
            - percentage
            - multiplier
            - fixed_amount
    OfferUiDto:
      type: object
      properties:
        offerUiId:
          type: string
        externalId:
          type: string
        active:
          type: boolean
        offerUiType:
          type: string
        name:
          type: string
        description:
          type: string
        backgroundImage:
          type: string
        specialOffer:
          type: object
          properties:
            templateType:
              type: string
            presentOfferEndTimer:
              type: boolean
            title:
              type: string
            fontSize:
              type: number
            fontWeight:
              type: string
            fontColor:
              type: object
              properties:
                colorOne:
                  type: string
                colorTwo:
                  type: string
                direction:
                  type: string
            backgroundColor:
              type: object
              properties:
                colorOne:
                  type: string
                colorTwo:
                  type: string
                direction:
                  type: string
    ProductsSequenceResponse:
      type: object
      properties:
        index:
          type: number
        playerAvailability:
          type: number
        priceInUsdCents:
          type: number
        products:
          type: array
          items:
            $ref: '#/components/schemas/ProductsSetResponse'
    ProductsSet:
      type: object
      properties:
        quantity:
          type: number
        publisherProductId:
          type: string
      required:
        - quantity
        - publisherProductId
    ProductsSetResponse:
      type: object
      properties:
        quantity:
          type: number
        product:
          $ref: '#/components/schemas/ProductDto'
    ProductDto:
      type: object
      properties:
        publisherProductId:
          type: string
        name:
          type: string
        textFontColorHex:
          type: string
        type:
          type: string
        prefix:
          type: string
        suffix:
          type: string
        priority:
          type: string
        images:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              url:
                type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        productId:
          type: string

````