> ## 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 Daily Bonus

> Creates a daily bonus.

<RequestExample>
  ```bash Create Daily Bonus theme={"system"}
  curl -X POST \
    'https://api.appcharge.com/v2/offer' \
    -H 'Content-Type: application/json' \
    -H 'x-publisher-token: <x-publisher-token>' \
    -d '{
      "publisherOfferId": "daily-bonus-1",
      "name": "My Daily Bonus",
      "type": "PopUp",
      "subType": "DailyBonus",
      "active": true,
      "productsSequence": [
        {
          "index": 1,
          "products": [
            {
              "priority": "Main",
              "publisherProductId": "TreasureChest",
              "quantity": 10
            }
          ],
          "priceInUsdCents": 2000
        }
      ]
      "productSale": {
        "type": "percentage",
        "sale": 10
      },
      "priceDiscount": {
        "type": "percentage",
        "discount": 10
      },
      "displayName": "My Daily Bonus",
      "description": "This is my daily bonus description.",
      "offerUiId": "68b41c4aa1c5b1a284737e9b",
      "offerExternalUiId": "58b41c4aa1c5b1a284737e9b",
      "segments": [
        "New User"
      ],
      "badges": [
        {
          "publisherBadgeId": "22ac77ff889b"
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Daily Bonus theme={"system"}
  {
    "offerId": "223b4cc89711ac",
    "publisherOfferId": "daily-bonus-1",
    "name": "My Daily Bonus",
    "type": "PopUp",
    "subType": "DailyBonus",
    "displayName": "My Daily Bonus",
    "description": "This is my daily bonus description.",
    "type": "string",
    "active": true,
    "segments": [
        "New User"
    ],
    "offerUi": {
        "offerUiId": "68b41c4aa1c5b1a284737e9b",
        "active": true,
        "offerUiType": "PopUp",
        "offerUiSubType": "DailyBonus",
        "name": "popup",
        "description": "description",
        "backgroundImage": "https://media.appcharge.com/media/75cb7861ec8924a63338-5790-47c8-a6a0-23cb43db5883",
        "buttonSuffixImage": "",
        "buttonSuffixAnimation": "",
        "specialOffer": {
            "templateType": "Single",
            "presentOfferEndTimer": false,
            "title": "jrwtnip",
            "fontSize": 620,
            "fontWeight": "normal",
            "fontColor": {
                "colorOne": "#ffffff"
            },
            "subTitle": {
                "text": "",
                "fontSize": 16,
                "fontWeight": "normal",
                "fontColor": {
                    "colorOne": "#ffffff"
                }
            },
            "backgroundColor": {
                "colorOne": "#CACBD4"
            }
        },
        "borderColor": {
            "colorOne": "#e70d0d",
            "colorTwo": "",
            "direction": ""
        },
        "borderWidth": 10,
        "externalId": "popup"
    },
    "productsSequence": [
        {
            "index": 1,
            "products": [
                {
                    "product": {
                        "publisherProductId": "TreasureChest",
                        "name": "Treasure Chest",
                        "type": "Quantity",
                        "prefix": "$",
                        "suffix": "M",
                        "priority": "Main",
                        "images": [
                            {
                                "type": "product",
                                "url": "https://media.appcharge.com/media/35nb7861ec9924a6b69a0fe59/2208472.png"
                            },
                            {
                                "type": "productPrefix",
                                "url": ""
                            }
                        ],
                        "displayName": "Treasure Chest"
                    }
                }
            ]
        }
    ],
    "badges": [
        {
        "publisherBadgeId": "22ac77ff889b"
        }
    ],
    "productSale": {
        "type": "percentage",
        "sale": 10
    },
    "priceDiscount": {
        "type": "percentage",
        "discount": 10
    },
    "createdAt": "2025-04-06T10:00:44.528Z",
    "updatedAt": "2025-04-06T10:00:44.528Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-daily-bonus.json POST /v2/offer
openapi: 3.0.1
info:
  title: Daily Bonus Offer API
  description: API for managing Daily Bonus Offers.
  version: '1.0'
servers:
  - url: https://api-sandbox.appcharge.com
security: []
paths:
  /v2/offer:
    post:
      tags:
        - Daily Bonus Offers
      summary: Create a new daily bonus offer
      description: Creates a daily bonus.
      operationId: createDailyBonusOffer
      parameters:
        - name: x-publisher-token
          in: header
          required: true
          description: The publisher token used for authentication.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDailyBonusOfferDto'
      responses:
        '201':
          description: Daily bonus offer created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyBonusOfferDtoResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  requestUrl:
                    type: string
                  body:
                    type: string
        '401':
          description: Unauthorized.
components:
  schemas:
    CreateDailyBonusOfferDto:
      type: object
      required:
        - publisherOfferId
        - name
        - type
        - subType
        - active
        - segments
        - productsSequence
        - priority
      properties:
        publisherOfferId:
          type: string
          description: The unique identifier for the daily bonus offer.
        name:
          type: string
          description: The name of the daily bonus offer (at least 3 characters).
        displayName:
          type: string
          description: >-
            The display name of the daily bonus offer. If not provided, the name
            will be used.
        description:
          type: string
          description: The description of the daily bonus offer.
        type:
          type: string
          description: The type of offer - In this case 'PopUp'.
          enum:
            - PopUp
          default: PopUp
        subType:
          type: string
          description: The subType of the offer - In this case 'DailyBonus'.
          enum:
            - DailyBonus
          default: DailyBonus
        active:
          type: boolean
          description: Whether the daily bonus offer is active.
        priority:
          type: integer
          description: >-
            The priority level of the daily bonus offer. The priority start from
            1 (1 being the highest priority).
        startOver:
          type: boolean
          description: Whether the daily bonus should restart after completion.
        offerUiId:
          type: string
          description: >-
            Internal ID for the Offer UI (required if offerExternalUiId not
            provided)
        offerExternalUiId:
          type: string
          description: The external UI ID for the daily bonus offer.
        segments:
          type: array
          description: List of player segments that this daily bonus offer applies to.
          items:
            type: string
        productsSequence:
          type: array
          description: The sequence of products included in the daily bonus offer.
          items:
            type: object
            properties:
              index:
                type: integer
                description: The order of the product in the daily bonus offer.
              products:
                type: array
                description: List of products in the daily bonus.
                items:
                  type: object
                  required:
                    - publisherProductId
                    - quantity
                    - priority
                  properties:
                    publisherProductId:
                      type: string
                      description: The unique ID of the product.
                    quantity:
                      type: integer
                      description: The quantity of the product in the daily bonus offer.
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        daily bonus. Either `Main` or `Sub`.
              priceInUsdCents:
                type: integer
                default: 0
                description: >-
                  The price of the product in cents (always 0, as the daily
                  bonus is free).
                enum:
                  - 0
            required:
              - index
              - products
              - priceInUsdCents
        publisherSectionId:
          type: string
          description: The publisher section ID.
        publisherTabId:
          type: string
          description: Tab ID in the web store.
        showAfter:
          type: string
          description: Event after which the popup can be shown.
        triggers:
          type: array
          description: Triggers that determine when the popup is shown.
          items:
            type: object
    DailyBonusOfferDtoResponse:
      type: object
      properties:
        publisherId:
          type: string
          description: Publisher ID.
        offerId:
          type: string
          description: The unique identifier of the daily bonus.
        publisherOfferId:
          type: string
          description: >-
            The daily bonus offer ID provided by the publisher. This is the
            offer's **External ID** value in the Publisher Dashboard.
        name:
          type: string
          description: The name of the daily bonus.
        displayName:
          type: string
          description: >-
            The display name of the daily bonus. If not provided, the name will
            be used.
        description:
          type: string
          description: The description of the daily bonus (conditionally returned)
        type:
          type: string
          description: The type of offer.
        subtype:
          type: string
          description: The subType of the offer - In this case 'DailyBonus'.
        active:
          type: boolean
          description: Whether the daily bonus is active.
        segments:
          type: array
          description: >-
            List of player segments that this daily bonus applies to (e.g.,
            ["NewUser", "BigSpender"]). This is empty by default.
          items:
            type: string
        offerUi:
          type: object
          description: UI configuration for the daily bonus.
          properties:
            offerUiId:
              type: string
              description: >-
                The ID of the daily bonus design, as displayed in the Publisher
                Dashboard.
            externalId:
              type: string
              description: >-
                The SKU of the daily bonus design, as defined in the Publisher
                Dashboard.
            active:
              type: boolean
              description: Whether the daily bonus design is active.
            offerUiType:
              type: string
              description: The type of offer design. In this case, ‘daily bonus’.
            name:
              type: string
              description: >-
                The name of the daily bonus design, as defined in the Publisher
                Dashboard.
            description:
              type: string
              description: >-
                The description of the daily bonus design, as defined in the
                Publisher Dashboard.
            backgroundImage:
              type: string
              description: >-
                The background image of the daily bonus design, as defined in
                the Publisher Dashboard.
            specialOffer:
              type: object
              description: Details on the daily bonus template and design.
              properties:
                templateType:
                  type: string
                  description: The template type, as configured in the Publisher Dashboard.
                title:
                  type: string
                  description: >-
                    The title of the daily bonus, as configured in the Publisher
                    Dashboard.
                fontSize:
                  type: number
                  description: >-
                    The font size of the daily bonus title, as configured in the
                    Publisher Dashboard.
                fontWeight:
                  type: string
                  description: >-
                    The font weight of the daily bonus title, as configured in
                    the Publisher Dashboard.
                fontColor:
                  type: object
                  description: >-
                    Details on the font color of the daily bonus title as
                    configured in the Publisher Dashboard. If the font color is
                    set to linear, both 'colorOne' and 'colorTwo' will be
                    returned. 'colorThree' may also be returned, if configured.
                  properties:
                    colorOne:
                      type: string
                      description: The font color of the daily bonus title.
                    colorTwo:
                      type: string
                      description: >-
                        The second font color of the daily bonus title. Relevant
                        only if the font color is set to linear.
                    colorThree:
                      type: string
                      description: >-
                        The third font color of the daily bonus title. Relevant
                        only if the font color is set to linear.
                backgroundColor:
                  type: object
                  description: >-
                    Details on the background color of the daily bonus title as
                    configured in the Publisher Dashboard. If the background
                    color is set to linear, the direction will be returned along
                    with ‘colorOne’ and ‘colorTwo’.
                  properties:
                    colorOne:
                      type: string
                      description: The background color of the daily bonus title.
                    colorTwo:
                      type: string
                      description: >-
                        The second background color of the daily bonus title.
                        Relevant only if the background color is set to linear.
                    direction:
                      type: string
                      description: >-
                        The direction of the linear gradient. Relevant only if
                        the background color is set to linear.
        productsSequence:
          type: array
          description: A sequence of products in the daily bonus.
          items:
            type: object
            properties:
              index:
                type: integer
                description: The order of the product in the daily bonus.
              products:
                type: array
                description: List of products in the daily bonus.
                items:
                  type: object
                  properties:
                    publisherProductId:
                      type: string
                      description: The unique ID of the product.
                    quantity:
                      type: integer
                      description: The quantity of the product in the daily bonus offer.
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        daily bonus. Either `Main` or `Sub`.
              priceInUsdCents:
                type: integer
                description: >-
                  The price of the product in cents. The value must be either 0
                  (free), or by minimum 80 cents.
              badges:
                type: array
                description: List of badges associated with the daily bonus.
                items:
                  type: object
                  properties:
                    publisherBadgeId:
                      type: string
                      description: The ID as configured in the dashboard.
        createdAt:
          type: string
          description: Date the daily bonus was created.
          format: date-time
        updatedAt:
          type: string
          description: Date the daily bonus was updated.
          format: date-time

````