> ## 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 Product

> Creates a product.



## OpenAPI

````yaml openapi-products-api.json POST /components/v1/product
openapi: 3.0.3
info:
  title: Products API
  version: 1.0.0
servers:
  - url: https://api-sandbox.appcharge.com
security:
  - PublisherTokenAuth: []
tags:
  - name: Products
paths:
  /components/v1/product:
    post:
      tags:
        - Products
      description: Creates a product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCreate'
      responses:
        '200':
          description: Product created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
        '400':
          description: Bad request. Invalid input or validation failure.
components:
  schemas:
    ProductCreate:
      type: object
      properties:
        name:
          type: string
          description: Product name.
          example: Gold Coins Pack
        displayName:
          type: string
          description: Product display name.
          example: Gold Coins
        publisherProductId:
          type: string
          description: Product ID that you define.
          example: gold_coins_100
        type:
          type: string
          enum:
            - Quantity
            - Time
          description: Product unit type.
          example: Quantity
        description:
          type: string
          description: Product description.
          example: A pack of 100 gold coins.
        prefix:
          type: string
          description: Product prefix text.
          example: Get
        suffix:
          type: string
          description: Product suffix text.
          example: coins
        textFontColorHex:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Product text font color in hex format.
          example: '#f5c518'
        productImageUrl:
          type: string
          format: url
          description: >-
            Product image URL in PNG or JPEG format.


            For uploaded files, this is the Appcharge-hosted CDN URL. For
            external image URLs, this is the original image URL served from the
            provided URL. External image URLs are saved and used as-is, and
            Appcharge doesn't download, copy, upload, or host them. Images must
            remain available at the provided URLs.


            We recommend uploading image files instead of using external URLs
            when possible.
          example: https://media.appcharge.com/media/69133d595af23405d8e843a5
        productPrefixImageUrl:
          type: string
          format: url
          description: >-
            Product prefix image URL in PNG or JPEG format.


            For uploaded files, this is the Appcharge-hosted CDN URL. For
            external image URLs, this is the original image URL served from the
            provided URL. External image URLs are saved and used as-is, and
            Appcharge doesn't download, copy, upload, or host them. Images must
            remain available at the provided URLs.


            We recommend uploading image files instead of using external URLs
            when possible.
          example: https://media.appcharge.com/media/69133d595af23405d8e843a5
      required:
        - name
        - publisherProductId
        - type
        - textFontColorHex
        - productImageUrl
    ProductResponse:
      type: object
      properties:
        id:
          type: string
          description: Product ID.
          example: 507f1f77bcf86cd799439015
        name:
          type: string
          description: Product name.
          example: Gold Coins Pack
        displayName:
          type: string
          description: Product display name.
          example: Gold Coins
        publisherProductId:
          type: string
          description: Product ID that you defined.
          example: gold_coins_100
        type:
          type: string
          enum:
            - Quantity
            - Time
          description: Product unit type.
          example: Quantity
        description:
          type: string
          description: Product description.
          example: A pack of 100 gold coins.
        prefix:
          type: string
          description: Product prefix text.
          example: Get
        suffix:
          type: string
          description: Product suffix text.
          example: coins
        textFontColorHex:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Product text font color in hex format.
          example: '#f5c518'
        productImageUrl:
          type: string
          format: url
          description: >-
            Product image URL. For uploaded files, this is the Appcharge-hosted
            CDN URL. For external image URLs, this is the original image URL
            served from the provided URL.
          example: https://media.appcharge.com/media/69133d595af23405d8e843a5
        productPrefixImageUrl:
          type: string
          format: url
          description: >-
            Product prefix image URL. For uploaded files, this is the
            Appcharge-hosted CDN URL. For external image URLs, this is the
            original image URL served from the provided URL.
          example: https://media.appcharge.com/media/69133d595af23405d8e843a5
        productImageExternalUrl:
          type: string
          format: url
          description: >-
            Original product image URL when the product uses an external image
            URL. This URL is used as provided to serve the image.
          example: https://images.pexels.com/photos/35406321/pexels-photo-35406321.jpeg
  securitySchemes:
    PublisherTokenAuth:
      type: apiKey
      in: header
      name: x-publisher-token
      description: Publisher token, as displayed in the Publisher Dashboard.

````