# Create a product

> Creates a new product with associated plans.

Source: https://help.boltapp.com/api-reference/subscriptions/products-v1/createproduct

`POST /v1/subscriptions/products`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Subscriptions API",
    "version": "v1",
    "description": "API for managing subscriptions and products."
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "X-Publishable-Key": []
    }
  ],
  "paths": {
    "/v1/subscriptions/products": {
      "post": {
        "operationId": "createProduct",
        "summary": "Create a product",
        "description": "Creates a new product with associated plans.",
        "tags": [
          "Products v1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Every product needs at least one plan. New products start in `draft` status and can be billed once activated. Every plan needs a `sku`, and plan SKUs must be unique within the product.\n",
                "required": [
                  "plans"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the product.",
                    "examples": [
                      "Bolt Subscription Product"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "description": "Description of the product.",
                    "examples": [
                      "This is a subscription product."
                    ]
                  },
                  "brand": {
                    "type": "string",
                    "description": "Brand of the product.",
                    "examples": [
                      "Bolt"
                    ]
                  },
                  "sku": {
                    "type": "string",
                    "description": "SKU of the product.",
                    "examples": [
                      "BOLT-12345"
                    ]
                  },
                  "merchant_product_id": {
                    "type": "string",
                    "description": "ID for the product; if missing, global plans are created"
                  },
                  "merchant_variant_id": {
                    "type": "string",
                    "description": "ID for the product variant"
                  },
                  "unit_price": {
                    "type": "integer",
                    "description": "Unit price of the product in cents.",
                    "examples": [
                      1999
                    ]
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "URL"
                    },
                    "description": "Array of image URLs for the product.",
                    "examples": [
                      [
                        "https://example.com/image1.jpg",
                        "https://example.com/image2.jpg"
                      ]
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO4217 currency code for the product's prices. Must match the division's currency.",
                    "examples": [
                      "USD"
                    ]
                  },
                  "taxable": {
                    "type": "boolean",
                    "description": "Whether the product is taxed."
                  },
                  "tax_code": {
                    "type": "string",
                    "description": "Tax code applied to the product. See `getTaxCodes` for the selectable codes."
                  },
                  "tax_behavior": {
                    "type": "string",
                    "enum": [
                      "exclusive",
                      "inclusive"
                    ],
                    "description": "Whether tax is added on top of the price (`exclusive`, the default) or included in it (`inclusive`)."
                  },
                  "family": {
                    "type": "string",
                    "description": "Free-form grouping label for the product."
                  },
                  "unit_label": {
                    "type": "string",
                    "description": "Label for one unit of the product (for example `seat`), shown on invoices and in checkout."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Free-form key-value metadata stored on the product."
                  },
                  "marketing_features": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Marketing feature bullets shown in checkout."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "archived"
                    ],
                    "description": "Lifecycle status. New products default to `draft`."
                  },
                  "plans": {
                    "type": "array",
                    "description": "Plans for the product (at least one). Plans take no `unit_price`.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "frequency",
                        "frequency_unit"
                      ],
                      "properties": {
                        "sku": {
                          "type": "string",
                          "description": "SKU of the plan. Required, and unique within the product, for DGAS divisions.",
                          "examples": [
                            "BOLT-PLAN-12345"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the plan.",
                          "examples": [
                            "Monthly Subscription"
                          ]
                        },
                        "frequency": {
                          "type": "integer",
                          "description": "Frequency of the plan.",
                          "examples": [
                            1
                          ]
                        },
                        "frequency_unit": {
                          "type": "string",
                          "enum": [
                            "day",
                            "week",
                            "month",
                            "year"
                          ],
                          "description": "Unit of frequency (e.g., day, week, month).",
                          "examples": [
                            "month"
                          ]
                        },
                        "initial_period": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Duration of the initial period before the subscription transitions to the regular plan.",
                          "properties": {
                            "frequency": {
                              "type": "integer",
                              "description": "Number of units the initial period lasts.",
                              "examples": [
                                2
                              ]
                            },
                            "frequency_unit": {
                              "type": "string",
                              "enum": [
                                "day",
                                "week",
                                "month",
                                "year"
                              ],
                              "description": "Unit of the initial period (e.g. week, month).",
                              "examples": [
                                "week"
                              ]
                            }
                          }
                        },
                        "base_price": {
                          "type": "string",
                          "description": "The plan's recurring charge in major units (for example `\"30.00\"`). Required together with `currency` for usage-billed plans; omit for a flat plan priced by the product.",
                          "examples": [
                            "30.00"
                          ]
                        },
                        "currency": {
                          "type": "string",
                          "description": "ISO4217 currency code for `base_price` and the plan's usage charges.",
                          "examples": [
                            "USD"
                          ]
                        },
                        "ubb": {
                          "type": "boolean",
                          "description": "Marks the plan as usage-billed. Must be `true` exactly when `usage` is supplied; a plan where they disagree is rejected."
                        },
                        "usage": {
                          "$ref": "#/components/schemas/PlanUsageInput"
                        },
                        "trial": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Free-trial terms for the plan.",
                          "properties": {
                            "trial_days": {
                              "type": "integer",
                              "format": "int64",
                              "examples": [
                                14
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "default": {
                  "value": {
                    "name": "Canvas AI Pro",
                    "description": "Professional plan for Canvas AI.",
                    "sku": "CANVAS-AI-PRO",
                    "brand": "Canvas",
                    "unit_price": 2900,
                    "currency": "USD",
                    "images": [
                      "https://example.com/canvas-ai-pro.jpg"
                    ],
                    "taxable": true,
                    "tax_behavior": "exclusive",
                    "status": "draft",
                    "plans": [
                      {
                        "name": "Monthly",
                        "sku": "CANVAS-AI-PRO-MONTHLY",
                        "frequency": 1,
                        "frequency_unit": "month",
                        "trial": {
                          "trial_days": 14
                        }
                      },
                      {
                        "name": "Yearly",
                        "sku": "CANVAS-AI-PRO-YEARLY",
                        "frequency": 1,
                        "frequency_unit": "year"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-Key": []
          },
          {
            "X-Publishable-Key": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PlanUsageInput": {
        "type": [
          "object",
          "null"
        ],
        "description": "Metering and pricing for one usage-billed plan. Supply exactly one of `meter_id` (reuse a division meter) or `meter` (create one inline).",
        "properties": {
          "meter_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "An existing meter's ID."
          },
          "meter": {
            "type": [
              "object",
              "null"
            ],
            "description": "A meter to create inline.",
            "properties": {
              "display_name": {
                "type": "string"
              },
              "event_type": {
                "type": "string"
              },
              "aggregation_type": {
                "type": "string",
                "enum": [
                  "sum",
                  "count"
                ]
              },
              "filter": {
                "type": "object"
              }
            }
          },
          "charge_model": {
            "type": "string",
            "description": "The pricing shape (e.g. `per_unit`, `graduated`, `capped`)."
          },
          "charge_config": {
            "type": "object",
            "description": "The shape's configuration. Amounts are decimal strings in major units."
          },
          "sessions": {
            "type": "array",
            "description": "Optional rolling session windows and alert thresholds.",
            "items": {
              "type": "object",
              "properties": {
                "duration": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "duration_unit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "alert_threshold": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Usage total that triggers a `subscription_usage_alert` webhook, as a decimal string."
                }
              }
            }
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "Product object.",
        "properties": {
          "id": {
            "type": "string",
            "description": "unique identifier for the product.",
            "examples": [
              "sp_Tlj0Osm0N76T"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the product.",
            "examples": [
              "Bolt Subscription Product"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description of the product.",
            "examples": [
              "This is a subscription product."
            ]
          },
          "merchant_product_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "merchant's ID for the product"
          },
          "merchant_variant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "merchant's ID for the product variant"
          },
          "sku": {
            "type": "string",
            "description": "SKU of the product.",
            "examples": [
              "BOLT-12345"
            ]
          },
          "unit_price": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Unit price of the product in cents.",
            "examples": [
              1999
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO4217 compatible currency code",
            "examples": [
              "USD"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Plan"
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "URL"
            },
            "description": "Array of image URLs for the product.",
            "examples": [
              [
                "https://example.com/image1.jpg",
                "https://example.com/image2.jpg"
              ]
            ]
          },
          "brand": {
            "type": [
              "string",
              "null"
            ]
          },
          "family": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product family, for grouping in the catalog."
          },
          "taxable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tax_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_behavior": {
            "type": "string"
          },
          "unit_label": {
            "type": [
              "string",
              "null"
            ],
            "description": "What one unit of the product is called (e.g. \"seat\")."
          },
          "metadata": {
            "type": "object",
            "description": "Free-form key-value pairs on the product."
          },
          "marketing_features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "archived"
            ],
            "description": "The product's lifecycle status. Catalog divisions only."
          },
          "activated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the product was first activated. Catalog divisions only."
          }
        }
      },
      "Plan": {
        "type": "object",
        "required": [
          "id",
          "name",
          "sku",
          "created_at",
          "updated_at",
          "frequency",
          "frequency_unit",
          "product_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "unique identifier for the plan.",
            "examples": [
              "spl_ba_PpkW16oIW"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the plan.",
            "examples": [
              "Monthly Subscription"
            ]
          },
          "sku": {
            "type": "string",
            "description": "SKU of the product.",
            "examples": [
              "BOLT-12345"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "frequency": {
            "type": "integer",
            "format": "int64",
            "description": "The number of `frequency_unit`s between each billing cycle.",
            "examples": [
              1
            ]
          },
          "product_id": {
            "type": "string",
            "description": "ID of the product associated with the plan.",
            "examples": [
              "sp_Tlj0Osm0N76T"
            ]
          },
          "frequency_unit": {
            "type": "string",
            "description": "Unit of frequency (e.g., week, month).",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "examples": [
              "month"
            ]
          },
          "initial_period": {
            "type": [
              "object",
              "null"
            ],
            "description": "How long the initial period lasts before we move over to the regular plan.",
            "required": [
              "frequency",
              "frequency_unit"
            ],
            "properties": {
              "frequency": {
                "type": "integer",
                "format": "int64",
                "description": "Number of units the initial period lasts.",
                "examples": [
                  2
                ]
              },
              "frequency_unit": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "description": "Unit of the initial period (e.g. week, month).",
                "examples": [
                  "week"
                ]
              }
            }
          },
          "checkout_link": {
            "type": "string",
            "description": "Checkout link for the plan, when available.",
            "examples": [
              "https://your_site.c.boltapp.com/g?merchant_product_id=37&merchant_variant_id=67&publishable_key=BQ9PKQksUGtj.Q9LwVLfV3WF4.32122926f7b9651a416a5099dc92dc2b4c87c8b922c114229f83b345d65f1195"
            ]
          },
          "base_price": {
            "type": "integer",
            "format": "int64",
            "description": "The plan's recurring charge in cents. `0` for a plan billed purely on usage.",
            "examples": [
              3000
            ]
          },
          "ubb": {
            "type": "boolean",
            "description": "Whether the plan is usage-billed."
          },
          "usage_pricing": {
            "type": "array",
            "description": "One entry per meter a usage-billed plan charges on top of `base_price`. Absent for a flat plan.",
            "items": {
              "$ref": "#/components/schemas/PlanUsagePricing"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ],
            "description": "The plan's lifecycle status. Catalog divisions only."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO4217 currency code for `base_price`. Catalog divisions only.",
            "examples": [
              "USD"
            ]
          },
          "trial": {
            "type": [
              "object",
              "null"
            ],
            "description": "The plan's free-trial terms, or `null` when it has none. Catalog divisions only.",
            "properties": {
              "trial_days": {
                "type": "integer",
                "format": "int64",
                "examples": [
                  14
                ]
              }
            }
          },
          "usage": {
            "type": [
              "object",
              "null"
            ],
            "description": "The usage block the plan was written with. Catalog divisions only; absent for a flat plan.",
            "properties": {
              "meter_id": {
                "type": "integer",
                "format": "int64"
              },
              "charge_model": {
                "type": "string"
              },
              "charge_config": {
                "type": "object"
              },
              "sessions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "duration": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64"
                    },
                    "duration_unit": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "alert_threshold": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PlanUsagePricing": {
        "type": "object",
        "description": "How one meter prices a usage-billed plan's consumption. Amounts inside `charge_config` are decimal strings in the plan currency's major units.",
        "properties": {
          "meter_name": {
            "type": "string",
            "examples": [
              "API Calls"
            ]
          },
          "event_type": {
            "type": "string",
            "examples": [
              "api_call"
            ]
          },
          "aggregation_type": {
            "type": "string",
            "enum": [
              "sum",
              "count"
            ]
          },
          "charge_model": {
            "type": "string",
            "description": "The pricing shape (e.g. `per_unit`, `graduated`, `capped`).",
            "examples": [
              "per_unit"
            ]
          },
          "charge_config": {
            "type": "object",
            "description": "The shape's configuration. Amounts are decimal strings in major units."
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "Standard error envelope returned by every non-2xx response.",
        "required": [
          "result",
          "errors"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Always `false` on an error.",
                "examples": [
                  false
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "examples": [
          {
            "result": {
              "success": false
            },
            "errors": [
              {
                "code": 15,
                "message": "A valid value must be provided.",
                "field": "frequency"
              }
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "One error of a failed request.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Bolt error code.",
            "examples": [
              15
            ]
          },
          "message": {
            "type": "string",
            "description": "What went wrong.",
            "examples": [
              "A valid value must be provided."
            ]
          },
          "field": {
            "type": "string",
            "description": "Path of the request field the error is about, such as `product.taxable` or `plans[1].sku`. Absent when the error is not about one field.",
            "examples": [
              "frequency"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard. Send it together with `X-Publishable-Key`."
      },
      "X-Publishable-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publishable-Key",
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard. Required. Send it together with `X-API-Key`."
      }
    }
  }
}
```
