Skip to content
Insy
For developers
Esc
↑↓navigate↵open⌘Jpreview

Add a price variant to a product

A one-time price, a subscription (interval required), pay-what-you-want or free. On a published product the price is live at once.

Scope: products.write.

POST/v1/products/{slug}/variants
Authorization
AuthorizationBearer token (API Key) · headerrequired
API Key for programmatic access (format: insy_xxxxx)
Path parameters
slugstringrequired
Header parameters
Idempotency-Keystring
Up to 255 characters. A retry with the same key and body returns the first result instead of acting twice.
Request body
requiredapplication/json
namestringrequired
min length 2 · max length 100
descriptionstringrequired
min length 2 · max length 3000
priceCentsnumberrequired
Price in minor units (cents); 0 for a free variant.
min 0
currencyobject
Defaults to the product's currency.
Show properties
object
priceTypeobject
Show properties
object
intervalstring
Required when priceType is subscription.
Allowed:monthyear
Responses
201Successful response
successbooleanrequired
Whether the request was successful
errorCodestringrequired
The error code returned by the request
Allowed:not_foundbad_requestalready_existsunauthorizedforbiddeninternal_server_errorservice_unavailabletimeoutconflictprecondition_failedunprocessable_entitytoo_many_requests
messagestringrequired
The message returned by the request
dataV1VariantCreatedObject
Show properties
productstringrequired
Product name.
variantV1VariantObjectrequired
Show properties
idstringrequired
namestringrequired
priceobject
What the saved variant charges.
Show properties
amountCentsnumberrequired
Minor units (cents).
currencystring | nullrequired
priceTypestring
Allowed:one_timesubscriptionfreepay_what_you_want
intervalstring | null
400Invalid input (`errorCode: bad_request`, `reason: invalid_input`).
401Missing, invalid or expired access token or API key.
403The token lacks the operation's scope (`reason: insufficient_scope`).
409The first request with this Idempotency-Key is still running (`reason: action_pending`).
422This Idempotency-Key was used with a different request (`reason: idempotency_key_reused`).
429Per-account rate limit (120/min, 3000/h, shared with `/mcp`); see `Retry-After`.
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.insy.io/v1/products/string/variants" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "priceCents": 0,
  "currency": "USD",
  "priceType": "one_time",
  "interval": "month"
}'
Response
{
  "success": true,
  "errorCode": "not_found",
  "message": "Success",
  "data": {
    "product": "string",
    "variant": {
      "id": "string",
      "name": "string",
      "price": {
        "amountCents": 0,
        "currency": "PLN"
      },
      "priceType": "one_time",
      "interval": "month"
    }
  }
}