Skip to main content
POST
Create Variant

Headers

authorization
string | null
X-Organization-ID
string | null

Path Parameters

product_key
string
required

Cookies

stytch_session
string | null

Body

application/json

Request model for creating a Variant.

key
string
required

Variant key (lowercase alphanumeric + underscores)

isPublished
boolean
default:false
properties
Properties · object

Variant properties dict

properties_metadata
Properties Metadata · object

Response

Successful Response

Response model for a single Variant.

id
string
required

MongoDB ObjectId as string

key
string
required

Variant key, unique within a product

productType
Producttype · object
required

Product type reference

product_key
string
required

Key of the parent Product

createdAt
string | null

Creation timestamp

createdBy
string | null

User who created this

isPublished
boolean
default:false

Published status

lastModifiedAt
string | null

Last modification timestamp

lastModifiedBy
string | null

User who last modified this

properties
Properties · object

Variant data keyed by PropertyDefinition key

properties_metadata
Properties Metadata · object

Per-property metadata

propertyCount
integer
default:0

Number of properties with values