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

# Create a new product variant

> This endpoint creates a new variant for a specified product. It requires the `x-store-id` header for authorization, and attributes such as `name` and `price` must be provided in the request body. The endpoint supports adding options like subscription intervals.



## OpenAPI

````yaml /api-reference/blink-api.json post /v1/products/{id}/variants
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
tags:
  - name: Invoices
    description: Unified merchant of record invoices for products and subscriptions.
  - name: Geo Pricing
    description: Resolve Purchasing Power Parity (PPP) localized pricing.
paths:
  /v1/products/{id}/variants:
    post:
      tags:
        - Products
      summary: Create a new product variant
      description: >-
        This endpoint creates a new variant for a specified product. It requires
        the `x-store-id` header for authorization, and attributes such as `name`
        and `price` must be provided in the request body. The endpoint supports
        adding options like subscription intervals.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ID of the product to create a variant for.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductVariantRequest'
      responses:
        '201':
          description: Product variant created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductVariantDetails'
        '400':
          description: Bad Request - Name or Price missing.
        '401':
          description: Unauthorized - Store ID header missing.
        '404':
          description: Product not found.
      security:
        - storeIdHeader: []
components:
  schemas:
    CreateProductVariantRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        price:
          type: number
        subscription_interval:
          type: string
        trial_days:
          type: integer
        is_active:
          type: boolean
        requires_license_key:
          type: boolean
        license_key_activation_limit:
          type: integer
      required:
        - name
        - price
    ProductVariantDetails:
      type: object
      properties:
        id:
          type: string
        product_id:
          type: string
        name:
          type: string
        description:
          type: string
        price:
          type: number
        subscription_interval:
          type: string
        trial_days:
          type: integer
        is_active:
          type: boolean
        requires_license_key:
          type: boolean
        license_key_activation_limit:
          type: integer
        created_at:
          type: string
          format: date-time
        deliverables:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              title:
                type: string
              description:
                type: string
              url:
                type: string
              button_label:
                type: string
              created_at:
                type: string
                format: date-time
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````