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

# Create a product

> *Rate limit: 5 requests / minute per shop. See [Rate limiting](/guides/rate-limiting).*

Creates a product from a design or a digital product.

<Note>
  **OAuth scope:** `offer_write`

  API keys have full access to this endpoint.
</Note>


## OpenAPI

````yaml POST /open-api/v1.0/products
openapi: 3.1.0
info:
  title: Fourthwall APIs
  description: Service used for management of orders, carts, and payments.
  termsOfService: https://fourthwall.com/terms-of-service
  contact:
    name: Backend team
    url: https://fourthwall.com
    email: backend@fourthwall.com
  version: unspecified
servers:
  - url: https://api.fourthwall.com
    description: Production server
security: []
externalDocs:
  description: OpenAPI documentation
  url: https://docs.fourthwall.com
paths:
  /open-api/v1.0/products:
    post:
      tags:
        - Products (offers)
      summary: Create a product
      description: >-
        *Rate limit: 5 requests / minute per shop. See [Rate
        limiting](/guides/rate-limiting).*


        Creates a product from a design or a digital product.
      operationId: create-product
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/com.fourthwall.openapi.model.offer.CreateProductRequestV1
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/com.fourthwall.openapi.model.offer.CreateProductResponseV1
        '400':
          description: >-
            Possible errors: `CUSTOMIZATION_ALREADY_USED_ERROR`,
            `CUSTOMIZATION_FOR_REQUESTABLE_PRODUCT_ERROR`,
            `CUSTOMIZATION_OPTION_DO_NOT_EXISTS`,
            `CUSTOMIZATION_REGIONS_DUPLICATION`,
            `CUSTOMIZATION_TOO_MANY_VARIANTS`,
            `DESIGN_PIPELINE_BACKEND_RENDERING_NOT_SUPPORTED`,
            `DESIGN_PIPELINE_INVALID_REGIONS`,
            `DESIGNER_NOT_SUPPORTED_PRODUCT_ERROR`,
            `DIGITAL_ITEMS_NOT_VALID_ERROR`, `DIGITAL_ITEMS_SIZE_LIMIT_ERROR`,
            `MISSING_VERSION_ERROR`, `OFFER_CREATION_NOT_ALLOWED_ERROR`,
            `RENDERING_PRODUCT_NOT_SUPPORTED_ERROR`,
            `TOTAL_DIGITAL_STORAGE_LIMIT_ERROR`, `UNTRUSTED_ASSET_SOURCE_ERROR`
          content:
            application/json:
              examples:
                customization-already-used-error:
                  value:
                    code: CUSTOMIZATION_ALREADY_USED_ERROR
                    customizationId: <customizationid?>
                customization-for-requestable-product-error:
                  value:
                    code: CUSTOMIZATION_FOR_REQUESTABLE_PRODUCT_ERROR
                    productId: <productid>
                customization-option-do-not-exists:
                  value:
                    code: CUSTOMIZATION_OPTION_DO_NOT_EXISTS
                    type: <string>
                    name: <string>
                    productId: <productid>
                customization-regions-duplication:
                  value:
                    code: CUSTOMIZATION_REGIONS_DUPLICATION
                    regions: <list>
                customization-too-many-variants:
                  value:
                    code: CUSTOMIZATION_TOO_MANY_VARIANTS
                    newColorCount: <int>
                    newSizeCount: <int>
                    newVariantCount: <int>
                    max: <int>
                design-pipeline-backend-rendering-not-supported:
                  value:
                    code: DESIGN_PIPELINE_BACKEND_RENDERING_NOT_SUPPORTED
                    reason: <string>
                design-pipeline-invalid-regions:
                  value:
                    code: DESIGN_PIPELINE_INVALID_REGIONS
                    invalidRegions: <set>
                    validRegions: <set>
                designer-not-supported-product-error:
                  value:
                    code: DESIGNER_NOT_SUPPORTED_PRODUCT_ERROR
                    productId: <productid>
                digital-items-not-valid-error:
                  value:
                    code: DIGITAL_ITEMS_NOT_VALID_ERROR
                    offerId: <offerid>
                    digitalFiles: <collection>
                digital-items-size-limit-error:
                  value:
                    code: DIGITAL_ITEMS_SIZE_LIMIT_ERROR
                    offerId: <offerid>
                    sizeLimit: <long>
                missing-version-error:
                  value:
                    code: MISSING_VERSION_ERROR
                    customizationId: <customizationid>
                offer-creation-not-allowed-error:
                  value:
                    code: OFFER_CREATION_NOT_ALLOWED_ERROR
                    shopId: <shopid>
                rendering-product-not-supported-error:
                  value:
                    code: RENDERING_PRODUCT_NOT_SUPPORTED_ERROR
                    productId: <string>
                total-digital-storage-limit-error:
                  value:
                    code: TOTAL_DIGITAL_STORAGE_LIMIT_ERROR
                    offerId: <offerid>
                    sizeLimit: <long>
                untrusted-asset-source-error:
                  value:
                    code: UNTRUSTED_ASSET_SOURCE_ERROR
                    uri: <uri>
        '403':
          description: 'Possible errors: `SAAS_OPERATION_NOT_ALLOWED_ERROR`'
          content:
            application/json:
              examples:
                saas-operation-not-allowed-error:
                  value:
                    code: SAAS_OPERATION_NOT_ALLOWED_ERROR
                    operation: <saasoperation.type>
                    shopId: <shopid>
                    planUpgradeable: <boolean>
        '404':
          description: >-
            Possible errors: `MEDIA_FILE_DO_NOT_EXISTS`,
            `PRODUCT_CATALOG_PRODUCT_ID_NOT_FOUND`,
            `RENDERING_NOT_SCHEDULED_ERROR`
          content:
            application/json:
              examples:
                media-file-do-not-exists:
                  value:
                    code: MEDIA_FILE_DO_NOT_EXISTS
                    uri: <uri>
                product-catalog-product-id-not-found:
                  value:
                    code: PRODUCT_CATALOG_PRODUCT_ID_NOT_FOUND
                    id: <productid>
                rendering-not-scheduled-error:
                  value:
                    code: RENDERING_NOT_SCHEDULED_ERROR
                    customizationId: <string>
        '406':
          description: 'Possible errors: `PRICING_CALCULATION_NOT_SUPPORTED`'
          content:
            application/json:
              examples:
                pricing-calculation-not-supported:
                  value:
                    code: PRICING_CALCULATION_NOT_SUPPORTED
                    customizationType: <customizationversiontype>
        '409':
          description: >-
            Possible errors: `OFFER_SLUG_DUPLICATION_ERROR`,
            `SQL_CONSTRAINTS_ERROR`
          content:
            application/json:
              examples:
                offer-slug-duplication-error:
                  value:
                    code: OFFER_SLUG_DUPLICATION_ERROR
                    shopId: <shopid>
                    offerSlug: <slug>
                sql-constraints-error:
                  value:
                    code: SQL_CONSTRAINTS_ERROR
                    table: <string?>
                    constraint: <string?>
                    msg: <string?>
        '429':
          description: |-
            Rate limited: 5 requests / minute per shop (effective limit).

            All applicable limits:
            - `open-api-heavy-rate-limiter` — 5 requests / minute per shop
            - `open-api-rate-limiter` — 100 requests / 10 seconds per shop
          content:
            application/json:
              examples:
                too-many-requests:
                  value:
                    code: OPEN_API_TOO_MANY_REQUESTS
                    title: Too many requests
                    status: 429
      security:
        - oauth:
            - offer_write
        - basicAuth: []
components:
  schemas:
    com.fourthwall.openapi.model.offer.CreateProductRequestV1:
      type: object
      description: >-
        Request to create a product. The shape is discriminated by the `type`
        field.
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/CreateDesignProductRequestV1'
        - $ref: '#/components/schemas/CreateDigitalProductRequestV1'
        - $ref: '#/components/schemas/CreateCustomizationProductRequestV1'
      properties:
        type:
          type: string
      required:
        - type
      title: Create Product Request
    com.fourthwall.openapi.model.offer.CreateProductResponseV1:
      type: object
      description: Response returned after creating a product.
      properties:
        productId:
          type: string
          description: ID of the created product
        customizationId:
          type: string
          description: Customization used to back the product, when applicable
        images:
          type: array
          description: Rendered product images
          items:
            $ref: >-
              #/components/schemas/com.fourthwall.openapi.model.designpipeline.DesignPipelineImageV1
      required:
        - images
      title: Create Product Response
    CreateDesignProductRequestV1:
      allOf:
        - $ref: >-
            #/components/schemas/com.fourthwall.openapi.model.offer.CreateProductRequestV1
        - type: object
          properties:
            productTemplateId:
              type: string
              description: >-
                Id of the product template to render the design onto, from `GET
                /open-api/v1.0/product-templates`.
              example: pro_k66ZW4fsRm6c2def3itltA
            regions:
              type: array
              description: >-
                Design regions to place on the product. Each region references a
                registered media image by id (register it via `POST
                /open-api/v1.0/media/images` and pass the returned id as
                `imageId`).
              items:
                $ref: '#/components/schemas/ProductDesignRegionV1'
            colors:
              type: array
              description: >-
                Colors to render. Defaults to all available product colors when
                omitted. Values not offered by the product are ignored; the
                request is rejected with 400 if none of the supplied colors are
                available.
              items:
                type: string
            sizes:
              type: array
              description: >-
                Sizes to include. Defaults to all available product sizes when
                omitted. Values not offered by the product are ignored; the
                request is rejected with 400 if none of the supplied sizes are
                available. When both colors and sizes are supplied, the request
                is also rejected with 400 if no requested color/size combination
                is an available variant.
              items:
                type: string
            name:
              type: string
              description: Product name
              example: My Awesome Design Tee
            description:
              type: string
              description: Product description
              example: Limited edition design
            profitMargin:
              type: number
              description: Profit margin in USD applied on top of the base cost.
              example: 10
            publishOnCreate:
              type: boolean
              description: >-
                Publish the product immediately on creation. Defaults to false
                (product stays hidden).
      description: >-
        Create a product by running the design pipeline: renders each region's
        registered image into mockups and creates a purchasable product. The
        product is created hidden unless `publishOnCreate` is true.
      required:
        - name
        - productTemplateId
        - regions
        - type
      title: Create Design Product Request
    CreateDigitalProductRequestV1:
      allOf:
        - $ref: >-
            #/components/schemas/com.fourthwall.openapi.model.offer.CreateProductRequestV1
        - type: object
          properties:
            name:
              type: string
              description: Product name
              example: My Digital Product
            description:
              type: string
              description: Product description
              example: A detailed description of my digital product
            price:
              type: number
              description: Price set by the creator, in USD.
              example: 19.99
            publishOnCreate:
              type: boolean
              description: >-
                Publish the product immediately on creation. Defaults to false
                (product stays hidden).
      description: >-
        Create a digital product with a creator-set price in USD and digital
        fulfillment. Attach files and images via the
        /products/{productId}/digital-files and /products/{productId}/images
        endpoints.
      required:
        - description
        - name
        - price
        - type
      title: Create Digital Product Request
    CreateCustomizationProductRequestV1:
      allOf:
        - $ref: >-
            #/components/schemas/com.fourthwall.openapi.model.offer.CreateProductRequestV1
        - type: object
          properties:
            customizationId:
              type: string
              description: >-
                Id of the customization to build the product from, from `POST
                /open-api/v1.0/customizations`.
              example: cud_k66ZW4fsRm6c2def3itltA
            name:
              type: string
              description: >-
                Product name. Defaults to the product template name when
                omitted.
              example: My Awesome Design Tee
            description:
              type: string
              description: Product description
            profitMargin:
              type: number
              description: Profit margin in USD applied on top of the base cost.
              example: 10
            publishOnCreate:
              type: boolean
              description: >-
                Publish the product immediately on creation. Defaults to false
                (product stays hidden).
      description: >-
        Create a product from an existing customization (design sketch). The
        design pipeline renders the customization's stored design into mockups
        and creates a purchasable product — no regions or product template are
        supplied here, they come from the customization. Create the
        customization first via `POST /open-api/v1.0/customizations`. The
        product is created hidden unless `publishOnCreate` is true.
      required:
        - customizationId
        - type
      title: Create Customization Product Request
    com.fourthwall.openapi.model.designpipeline.DesignPipelineImageV1:
      type: object
      properties:
        url:
          type: string
        width:
          type: integer
          format: int32
        height:
          type: integer
          format: int32
        style:
          type: string
        color:
          type: string
        size:
          type: string
        region:
          type: string
      required:
        - color
        - height
        - style
        - url
        - width
      title: Design Pipeline Image
    ProductDesignRegionV1:
      type: object
      description: A product region paired with the registered media image to render on it.
      properties:
        region:
          type: string
          description: >-
            Name of the product region to place the image on, e.g. `front` or
            `back`.
          example: front
        imageId:
          type: string
          description: >-
            Id of a registered media-library image to render on the region.
            Register the image first via `POST /open-api/v1.0/media/images` and
            pass the returned id here.
          example: img_k66ZW4fsRm6c2def3itltA
        placementId:
          type: string
          description: >-
            Placement to target when `placementStrategy` is `PLACEMENT_ID`.
            Required for that strategy and ignored by the others.
        placementStrategy:
          type: string
          description: >-
            How the image is placed on the region. Defaults to `AUTO` when
            omitted, and takes precedence over
            `placementId`/`fillAllPlacements`.

            - `AUTO` — let the renderer decide using the product's automation
            defaults (its preferred placement, or fill-all for products like
            mugs/stickers).

            - `FILL_ALL` — apply the image to every placement in the region.

            - `FULL_REGION` — render the image across the full region, skipping
            the preferred placement.

            - `PLACEMENT_ID` — target the single placement named by
            `placementId` (required for this strategy).
          enum:
            - AUTO
            - FILL_ALL
            - FULL_REGION
            - PLACEMENT_ID
          example: AUTO
      required:
        - imageId
        - region
      title: Product Design Region
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://auth.staging.fourthwall.com/auth/realms/Fourthwall/protocol/openid-connect/auth
          scopes:
            donation_read: donation_read
            order_read: order_read
            order_write: order_write
            fulfillment_write: fulfillment_write
            giveaway_read: giveaway_read
            giveaway_write: giveaway_write
            memberships_read: memberships_read
            memberships_write: memberships_write
            promotions_write: promotions_write
            promotions_read: promotions_read
            offer_read: offer_read
            offer_write: offer_write
            shop_read: shop_read
            thankyou_read: thankyou_read
            thankyou_write: thankyou_write
            webhook_read: webhook_read
            webhook_write: webhook_write
            media_read: media_read
            media_write: media_write
            analytics_read: analytics_read
            samples_read: samples_read
            samples_write: samples_write
            dns_read: dns_read
            dns_write: dns_write
            settings_read: settings_read
            payout_read: payout_read
            integrations_read: integrations_read
    basicAuth:
      type: http
      scheme: basic

````