> ## 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 Progress Bar

> Creates a Progress Bar offer.

<RequestExample>
  ```bash Create Progress Bar 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": "progressBar-1",
      "name": "My ProgressBar Offer 1",
      "type": "ProgressBar",
      "active": true,
      "offerExternalUiId": "ProgressBar Design 1",
      "productsSequence": [
        {
          "index": 1,
          "products": [
            {
              "publisherProductId": "coins",
              "priority": "Main",
              "quantity": 300
            }
          ],
          "priceInUsdCents": 0,
          "barSize": 10
        },
        {
          "index": 2,
          "products": [
            {
              "publisherProductId": "coins",
              "priority": "Main",
              "quantity": 500
            }
          ],
          "priceInUsdCents": 0,
          "barSize": 20
        }
      ],
      "schedule": {
        "permanent": false,
        "timeFrames": [
          {
            "startTime": "2025-11-01T12:05:00.000Z",
            "endTime": "2025-11-22T12:10:00.000Z",
            "notes": "Holiday promotion period."
          }
        ]
      },
      "displayName": "My ProgresBar Offer",
      "description": "This is my progress bar offer description.",
      "segments": [
        "New User",
        "VIP Player"
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Progress Bar theme={"system"}
  {
    "offerId": "67890abcdef1234567890123",
    "active": true,
    "description": "This is my progress bar offer description.",
    "displayName": "My ProgresBar Offer",
    "name": "My ProgressBar Offer 1",
    "type": "ProgressBar",
    "offerUi": {
      "offerUiId": "67890abcdef1234567890124",
      "active": true,
      "offerUiType": "ProgressBar",
      "name": "ProgressBar Design 1",
      "description": "Progress Bar UI design template",
      "backgroundImage": "https://media-dev.appcharge.com/media/6555b69c02ee8eca00465694/background-image.png",
      "progressBar": {
        "barFillColor": {
          "colorOne": "#FFD450",
          "colorTwo": "#EDB923",
          "gradientDirection": "to bottom"
        },
        "barRadius": 12,
        "accumulatedItem": {
          "imageUrl": "https://media-dev.appcharge.com/media/6555b69c02ee8eca00465694/pngtree-game-three-stars-png-image_4524815.jpeg",
          "backgroundColor": {
            "colorOne": "#FFD450",
            "colorTwo": "#EDB923",
            "gradientDirection": "to right"
          }
        },
        "backgroundOpacity": 80,
        "frameRadius": 12
      },
      "borderColor": {
        "colorOne": "#DBBD9C",
        "colorTwo": "#DBBD9C",
        "gradientDirection": "to right"
      },
      "backgroundColor": {
        "colorOne": "#DABA98",
        "colorTwo": "#FDFCF9",
        "gradientDirection": "to right"
      },
      "borderWidth": 3,
      "externalId": "ProgressBar 1"
    },
    "productsSequence": [
      {
        "index": 1,
        "products": [
          {
            "product": {
              "publisherProductId": "coins",
              "name": "coins",
              "textFontColorHex": "#cb1010",
              "type": "Quantity",
              "prefix": "+",
              "suffix": "",
              "priority": "Main",
              "images": [
                {
                  "type": "product",
                  "url": "https://media-dev.appcharge.com/media/63e53f149e43bf44513e15c3/asset.png"
                },
                {
                  "type": "productPrefix",
                  "url": "https://media-dev.appcharge.com/media/63e53f149e43bf44513e15c3/prefix-icon.png"
                }
              ],
              "createdAt": "2024-01-15T10:30:00.000Z",
              "updatedAt": "2024-11-20T14:22:00.000Z",
              "displayName": "Coins",
              "description": "In-game currency used for purchases.",
              "productId": "67890abcdef1234567890125"
            },
            "publisherProductId": "coins",
            "quantity": 300,
            "priority": "Main",
            "quantityDisplay": "+ 300"
          }
        ],
        "priceInUsdCents": 0,
        "barSize": 10,
        "id": "67890abcdef1234567890126"
      },
      {
        "index": 2,
        "products": [
          {
            "product": {
              "publisherProductId": "coins",
              "name": "coins",
              "textFontColorHex": "#cb1010",
              "type": "Quantity",
              "prefix": "+",
              "suffix": "",
              "priority": "Main",
              "images": [
                {
                  "type": "product",
                  "url": "https://media-dev.appcharge.com/media/63e53f149e43bf44513e15c3/asset.png"
                },
                {
                  "type": "productPrefix",
                  "url": "https://media-dev.appcharge.com/media/63e53f149e43bf44513e15c3/prefix-icon.png"
                }
              ],
              "createdAt": "2024-01-15T10:30:00.000Z",
              "updatedAt": "2024-11-20T14:22:00.000Z",
              "displayName": "Coins",
              "description": "In-game currency used for purchases.",
              "productId": "67890abcdef1234567890125"
            },
            "publisherProductId": "coins",
            "quantity": 500,
            "priority": "Main",
            "quantityDisplay": "+ 500"
          }
        ],
        "priceInUsdCents": 0,
        "barSize": 20,
        "id": "67890abcdef1234567890127"
      }
    ],
    "publisherId": "6555b69c02ee8eca00465694",
    "publisherOfferId": "progressBar-1",
    "schedule": {
      "permanent": false,
      "timeFrames": [
        {
          "startTime": "2025-11-01T12:05:00.000Z",
          "endTime": "2025-11-22T12:10:00.000Z",
          "notes": "Holiday promotion period.",
          "id": "67890abcdef1234567890128"
        }
      ]
    },
    "segments": [
      "New User",
      "VIP Player"
    ],
    "createdAt": "2024-11-15T09:30:00.000Z",
    "updatedAt": "2024-11-15T09:30:00.000Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-progress-bar.json POST /v2/offer
openapi: 3.0.1
info:
  title: Progress Bars API
  description: API for managing Progress Bar Offers.
  version: '1.0'
servers:
  - url: https://api-sandbox.appcharge.com
security: []
paths:
  /v2/offer:
    post:
      tags:
        - Progress Bar Offers
      summary: Create a new Progress Bar
      description: Creates a Progress Bar offer.
      operationId: createProgressBarOffer
      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/CreateProgressBarDto'
      responses:
        '201':
          description: Progress Bar offer created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProgressBarDtoResponse'
        '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:
    CreateProgressBarDto:
      type: object
      required:
        - publisherOfferId
        - name
        - type
        - active
        - segments
        - productsSequence
      properties:
        publisherOfferId:
          type: string
          description: >-
            The Progress Bar offer ID provided by the publisher. This is the
            offer's **External ID** value in the Publisher Dashboard.
          example: progressBar-1
        name:
          type: string
          description: The name of the Progress Bar offer (at least 3 characters).
          example: My ProgressBar Offer 1
        type:
          type: string
          description: The type of offer - In this case 'ProgressBar'.
          enum:
            - ProgressBar
          example: ProgressBar
        active:
          type: boolean
          description: Whether the Progress Bar offer is active.
          example: true
        offerUiId:
          type: string
          description: >-
            Internal ID of the offer design. Required if `offerExternalUiId` is
            not provided.
          example: 67890abcdef1234567890124
        offerExternalUiId:
          type: string
          description: >-
            The offer design ID. This is the Offer Design's **External ID**
            value in the Publisher Dashboard. Required if `offerUiId` is not
            provided.
          example: ProgressBar Design 1
        displayName:
          type: string
          description: The display name of the Progress Bar offer shown to players.
          example: My ProgresBar Offer
        description:
          type: string
          description: Progress Bar offer description.
          example: This is my progress bar offer description.
        segments:
          type: array
          description: |-
            List of player segments that this Progress Bar offer applies to. 

             If you don't have any segments, pass an empty array.
          items:
            type: string
          example:
            - New User
            - VIP Player
        productsSequence:
          type: array
          description: |-
            The sequence of products included in the Progress Bar offer. 

             **Min:** 1 
             **Max:** 50
          items:
            type: object
            required:
              - index
              - products
              - priceInUsdCents
            properties:
              index:
                type: integer
                description: >-
                  The mission order in the Progress Bar offer. The index must
                  start from 1 and be sequential.
                example: 1
              products:
                type: array
                description: |-
                  List of products rewarded when completing this mission. 

                   **Max:** 3
                items:
                  type: object
                  required:
                    - publisherProductId
                    - quantity
                    - priority
                  properties:
                    publisherProductId:
                      type: string
                      description: Product ID.
                      example: coins
                    quantity:
                      type: integer
                      description: The quantity of the product rewarded.
                      example: 300
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        Progress Bar offer.
                      enum:
                        - Main
                        - Sub
                      example: Main
              priceInUsdCents:
                type: integer
                description: >-
                  The price of the mission in US cents. Progress Bar offers are
                  free rewards, so this value must always be set to 0.
                enum:
                  - 0
                example: 0
              barSize:
                type: integer
                description: The number of points required to complete this mission.
                example: 10
        schedule:
          type: object
          description: The schedule for when the Progress Bar offer is available.
          properties:
            permanent:
              type: boolean
              description: Whether the Progress Bar offer is permanent.
              default: true
              example: false
            timeFrames:
              type: array
              description: >-
                Time frame for the scheduled offer. Leave blank if permanent is
                set to true. If permanent is false, at least 1 time frame is
                required. When specifying multiple timeFrames, the startTime and
                endTime of each must not overlap.
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    description: >-
                      Scheduled offer start time in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                    format: date-time
                    example: '2025-11-01T12:05:00.000Z'
                  endTime:
                    type: string
                    description: >-
                      Scheduled offer end time in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                      Can't be a past date.
                    format: date-time
                    example: '2025-11-22T12:10:00.000Z'
                  notes:
                    type: string
                    description: Notes about the scheduled offer.
                    example: Holiday promotion period.
                required:
                  - startTime
                  - endTime
        publisherSectionId:
          type: string
          description: The publisher section ID.
        publisherTabId:
          type: string
          description: Tab ID in the web store.
    ProgressBarDtoResponse:
      type: object
      properties:
        publisherId:
          type: string
          description: Publisher ID.
        offerId:
          type: string
          description: Autogenerated Progress Bar offer ID.
        publisherOfferId:
          type: string
          description: >-
            Progress Bar offer ID provided by the publisher. This is the offer's
            **External ID** value in the Publisher Dashboard.
        name:
          type: string
          description: Progress Bar offer name.
        displayName:
          type: string
          description: Progress Bar offer display name that is shown to players.
        description:
          type: string
          description: Progress Bar offer description.
        type:
          type: string
          description: Offer type.
          example: ProgressBar
        active:
          type: boolean
          description: Whether the Progress Bar offer is active.
        segments:
          type: array
          description: The player segments associated with the Progress Bar offer.
          items:
            type: string
        offerUi:
          type: object
          description: >-
            Information about the Progress Bar offer design, as configured in
            the Publisher Dashboard.
          properties:
            offerUiId:
              type: string
              description: The ID of the Progress Bar offer design.
            active:
              type: boolean
              description: Whether the Progress Bar offer design is active.
            offerUiType:
              type: string
              description: The type of offer design. In this case, 'ProgressBar'.
              example: ProgressBar
            name:
              type: string
              description: The name of the Progress Bar offer design.
            description:
              type: string
              description: The description of the Progress Bar offer design.
            progressBar:
              type: object
              description: >-
                Specific settings for the Progress Bar UI, as configured in the
                Publisher Dashboard.
              properties:
                barFillColor:
                  type: object
                  description: Color settings for the Progress Bar fill.
                  properties:
                    colorOne:
                      type: string
                      description: The primary fill color.
                    colorTwo:
                      type: string
                      description: >-
                        The secondary fill color. Returned only if the fill
                        color is set to **Linear**.
                    gradientDirection:
                      type: string
                      description: >-
                        The direction of the gradient between both fill colors.
                        Returned only if the fill color is set to **Linear**.
                barRadius:
                  type: integer
                  description: The border radius of the progress bar in pixels.
                accumulatedItem:
                  type: object
                  description: Settings for the accumulated points indicator.
                  properties:
                    imageUrl:
                      type: string
                      description: The URL of the image displayed for accumulated points.
                    backgroundColor:
                      type: object
                      description: Background color for the accumulated points indicator.
                      properties:
                        colorOne:
                          type: string
                          description: The primary background color.
                        colorTwo:
                          type: string
                          description: >-
                            The secondary background color. Returned only if the
                            background color is set to **Linear**.
                        gradientDirection:
                          type: string
                          description: >-
                            The direction of the gradient. Returned only if the
                            background color is set to **Linear**.
                backgroundOpacity:
                  type: integer
                  description: The opacity level of the progress bar background (0-100).
                frameRadius:
                  type: integer
                  description: The border radius of the progress bar frame in pixels.
            borderColor:
              type: object
              description: Border color details for the Progress Bar offer.
              properties:
                colorOne:
                  type: string
                  description: The primary border color.
                colorTwo:
                  type: string
                  description: >-
                    The secondary border color. Returned only if the border
                    color in the UI is set to **Linear**.
                gradientDirection:
                  type: string
                  description: >-
                    The direction of the gradient between both border colors.
                    Returned only if the border color in the UI is set to
                    **Linear**.
            backgroundColor:
              type: object
              description: Background color details for the Progress Bar offer.
              properties:
                colorOne:
                  type: string
                  description: The primary background color.
                colorTwo:
                  type: string
                  description: >-
                    The secondary background color. Returned only if the
                    background color in the UI is set to **Linear**.
                gradientDirection:
                  type: string
                  description: >-
                    The direction of the gradient between both background
                    colors. Returned only if the background color in the UI is
                    set to **Linear**.
            borderWidth:
              type: integer
              description: >-
                The width of the border surrounding the Progress Bar offer in
                pixels.
            externalId:
              type: string
              description: >-
                The SKU of the Progress Bar offer design, as defined in the
                Publisher Dashboard.
        productsSequence:
          type: array
          description: The sequence of missions within the Progress Bar offer
          items:
            type: object
            properties:
              index:
                type: integer
                description: >-
                  The mission order in the Progress Bar offer. The index must
                  start from 1 and be sequential.
              id:
                type: string
                description: Mission ID.
              products:
                type: array
                description: List of products rewarded when completing this mission.
                items:
                  type: object
                  properties:
                    product:
                      type: object
                      description: Detailed product information.
                      properties:
                        publisherProductId:
                          type: string
                          description: The unique ID of the product.
                        name:
                          type: string
                          description: The name of the product.
                        displayName:
                          type: string
                          description: The display name of the product.
                        description:
                          type: string
                          description: The description of the product.
                        textFontColorHex:
                          type: string
                          description: The hex color code for the product text.
                        type:
                          type: string
                          description: The type of product.
                        prefix:
                          type: string
                          description: Prefix text for the product.
                        suffix:
                          type: string
                          description: Suffix text for the product.
                        priority:
                          type: string
                          description: Display priority of the product.
                          enum:
                            - Main
                            - Sub
                        images:
                          type: array
                          description: Product images.
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                description: The type of image.
                              url:
                                type: string
                                description: The URL of the image.
                        productId:
                          type: string
                          description: The internal product ID.
                        createdAt:
                          type: string
                          description: Date the product was created.
                          format: date-time
                        updatedAt:
                          type: string
                          description: Date the product was last updated.
                          format: date-time
                    publisherProductId:
                      type: string
                      description: The unique ID of the product.
                    quantity:
                      type: integer
                      description: The quantity of the product rewarded.
                    quantityDisplay:
                      type: string
                      description: The display format of the product quantity.
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        Progress Bar offer.
                      enum:
                        - Main
                        - Sub
              priceInUsdCents:
                type: integer
                description: >-
                  The price of the mission in cents. Progress Bar offers are
                  free rewards, so this value is always 0.
                example: 0
              barSize:
                type: integer
                description: The number of points required to complete this mission.
                example: 10
        schedule:
          type: object
          description: The schedule for when the Progress Bar offer is available.
          properties:
            permanent:
              type: boolean
              description: Whether the Progress Bar offer is permanent.
              default: true
            timeFrames:
              type: array
              description: >-
                Time frame for the scheduled offer. Leave blank if permanent is
                set to true. If permanent is false, at least 1 time frame is
                required. When specifying multiple timeFrames, the startTime and
                endTime of each must not overlap.
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    description: >-
                      Scheduled offer start time in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                    format: date-time
                  endTime:
                    type: string
                    description: >-
                      Scheduled offer end time in [ISO
                      8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                    format: date-time
                  notes:
                    type: string
                    description: Notes about the scheduled offer.
          items:
            type: object
        createdAt:
          type: string
          description: Date the Progress Bar offer was created.
          format: date-time
        updatedAt:
          type: string
          description: Date the Progress Bar offer was last updated.
          format: date-time

````