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

# Create product variant

> Developer API operation for POST /dev/v1/products/{id}/variants.



## OpenAPI

````yaml /openapi.json post /dev/v1/products/{id}/variants
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/products/{id}/variants:
    post:
      tags:
        - Products
      summary: Create product variant
      description: Developer API operation for POST /dev/v1/products/{id}/variants.
      operationId: postDevV1ProductsByIdVariants
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              example:
                title: New
                description: null
                price: 9
                price_modifier: null
                stock: 3
                stock_delimiter: null
                license_period: null
                file_id: 550e8400-e29b-41d4-a716-446655440000
                dynamic_webhook: https://example.com/variant-hook
                option_values:
                  region: eu
                is_default: false
                sort_order: 0
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties: true
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                example:
                  data:
                    id: variant_2
                    uniqid: variant_2
                    product_uniqid: prod_1
                    file_id: 550e8400-e29b-41d4-a716-446655440000
                    dynamic_webhook: https://example.com/variant-hook
                    title: New
                    description: null
                    price: 9
                    price_modifier: null
                    stock: 3
                    stock_delimiter: null
                    license_period: null
                    option_values:
                      region: eu
                    is_default: false
                    sort_order: 0
                    created_at: 1711953600
                    updated_at: 1711953900
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````