Skip to main content
POST
/
products
curl -X POST https://api.autumnai.com/products \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "Pro Product",
    "name": "Pro Plan",
    "is_add_on": false,
    "is_default": false,
    "items": [
      {
        "price": 20,
        "interval": "month"
      },
      {
        "feature_id": "messages",
        "included_usage": 1000,
        "price": 0.5,
        "interval": "month",
        "usage_model": "pay_per_use"
      }
    ],
    "free_trial": {
      "duration": "day",
      "length": 7,
      "unique_fingerprint": false,
      "card_required": true
    }
  }'
{
  "id": "Pro Product",
  "name": "Pro Plan",
  "group": null,
  "env": "sandbox",
  "is_add_on": false,
  "is_default": false,
  "archived": false,
  "version": 1,
  "created_at": 1761296829908,
  "items": [
    {
      "type": "price",
      "feature_id": null,
      "interval": "month",
      "interval_count": 1,
      "price": 20,
      "display": {
        "primary_text": "$20",
        "secondary_text": "per month"
      }
    },
    {
      "type": "priced_feature",
      "feature_id": "messages",
      "included_usage": 1000,
      "interval": "month",
      "interval_count": 1,
      "price": 0.5,
      "usage_model": "pay_per_use",
      "billing_units": 1000,
      "reset_usage_when_enabled": true,
      "entity_feature_id": null,
      "display": {
        "primary_text": "1,000 Messages",
        "secondary_text": "then $0.5 per 1,000 Messages"
      }
    }
  ],
  "free_trial": {
    "duration": "day",
    "length": 7,
    "unique_fingerprint": false,
    "card_required": true
  },
  "base_variant_id": null,
  "scenario": "new"
}
Creates a new product with pricing plans and feature configurations.

Request Body

id
string
required
The ID of the product. Used to identify the product in other API calls like checkout or update product.Must match the pattern: ^[a-zA-Z0-9_-]+$
name
string
required
The name of the product.
description
string
The description of the product.
is_add_on
boolean
default:false
Whether the product is an add-on. Add-on products can be attached multiple times and don’t go through upgrade/downgrade flows.
is_default
boolean
default:false
Whether the product is the default product. Default products are enabled by default for new customers.
group
string
Product group which this product belongs to. Products within a group have upgrade/downgrade logic when the customer moves between them.
items
array
Array of product items that define the product’s features and pricing.
free_trial
object
Free trial configuration for this product.

Response

id
string
The ID of the product you set when creating the product.
name
string
The name of the product.
group
string
Product group which this product belongs to.
env
string
The environment of the product (sandbox or production).
is_add_on
boolean
Whether the product is an add-on and can be purchased alongside other products.
is_default
boolean
Whether the product is the default product.
archived
boolean
Whether this product has been archived and is no longer available.
version
number
The current version of the product.
created_at
number
The timestamp of when the product was created in milliseconds since epoch.
items
array
Array of product items that define the product’s features and pricing.
free_trial
object
Free trial configuration for this product, if available.
base_variant_id
string
ID of the base variant this product is derived from.
scenario
enum
Scenario for when this product is used in attach flows.
  • new
  • upgrade
  • downgrade
  • crossgrade
properties
object
Additional product properties.
curl -X POST https://api.autumnai.com/products \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "Pro Product",
    "name": "Pro Plan",
    "is_add_on": false,
    "is_default": false,
    "items": [
      {
        "price": 20,
        "interval": "month"
      },
      {
        "feature_id": "messages",
        "included_usage": 1000,
        "price": 0.5,
        "interval": "month",
        "usage_model": "pay_per_use"
      }
    ],
    "free_trial": {
      "duration": "day",
      "length": 7,
      "unique_fingerprint": false,
      "card_required": true
    }
  }'
{
  "id": "Pro Product",
  "name": "Pro Plan",
  "group": null,
  "env": "sandbox",
  "is_add_on": false,
  "is_default": false,
  "archived": false,
  "version": 1,
  "created_at": 1761296829908,
  "items": [
    {
      "type": "price",
      "feature_id": null,
      "interval": "month",
      "interval_count": 1,
      "price": 20,
      "display": {
        "primary_text": "$20",
        "secondary_text": "per month"
      }
    },
    {
      "type": "priced_feature",
      "feature_id": "messages",
      "included_usage": 1000,
      "interval": "month",
      "interval_count": 1,
      "price": 0.5,
      "usage_model": "pay_per_use",
      "billing_units": 1000,
      "reset_usage_when_enabled": true,
      "entity_feature_id": null,
      "display": {
        "primary_text": "1,000 Messages",
        "secondary_text": "then $0.5 per 1,000 Messages"
      }
    }
  ],
  "free_trial": {
    "duration": "day",
    "length": 7,
    "unique_fingerprint": false,
    "card_required": true
  },
  "base_variant_id": null,
  "scenario": "new"
}

Build docs developers (and LLMs) love