Skip to main content
POST
/
products
/
{product_id}
Update Product
curl --request POST \
  --url https://api.useautumn.com/v1/products/{product_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "is_add_on": true,
  "is_default": true,
  "group": "<string>",
  "archived": true,
  "items": [
    {
      "feature_id": "<string>",
      "included_usage": 123,
      "interval": "minute",
      "interval_count": 123,
      "entity_feature_id": "<string>",
      "usage_model": "prepaid",
      "price": 123,
      "tiers": [
        {
          "to": 100,
          "amount": 10
        }
      ],
      "billing_units": 123,
      "reset_usage_when_enabled": true
    }
  ],
  "free_trial": {
    "length": "<string>",
    "unique_fingerprint": false,
    "duration": "day",
    "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": "words",
      "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 Words",
        "secondary_text": "then $0.5 per 1,000 Words"
      }
    },
    {
      "type": "feature",
      "feature_id": "dashboard",
      "entity_feature_id": null,
      "display": {
        "primary_text": "Dashboard"
      }
    },
    {
      "type": "feature",
      "feature_id": "messages",
      "included_usage": 10,
      "interval": "month",
      "interval_count": 1,
      "reset_usage_when_enabled": true,
      "entity_feature_id": null,
      "display": {
        "primary_text": "10 Messages"
      }
    }
  ],
  "free_trial": {
    "duration": "day",
    "length": 7,
    "unique_fingerprint": false,
    "card_required": true
  },
  "base_variant_id": null,
  "scenario": "new"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

product_id
string
required

Body

application/json
id
string

The ID of the product. Used to identify the product in other API calls like checkout or update product.

name
string

The name of the product

is_add_on
boolean

Whether the product is an add-on. Add-on products can be attached multiple times and don't to through upgrade / downgrade flows.

is_default
boolean

Whether the product is the default product. Default products are enabled by default for new customers.

group
string | null

Product group which this product belongs to. Products within a group have upgrade / downgrade logic when the customer moves between them.

archived
boolean

Archive this product using this flag. Archived products are hidden on the dashboard.

items
object[]
free_trial
object | null

Free trial configuration for this product, if available

Response

200 - application/json
id
string
required

The ID of the product you set when creating the product

name
string
required

The name of the product

group
string | null
required

Product group which this product belongs to

env
enum<string>
required

The environment of the product

Available options:
sandbox,
live
is_add_on
boolean
required

Whether the product is an add-on and can be purchased alongside other products

is_default
boolean
required

Whether the product is the default product

archived
boolean
required

Whether this product has been archived and is no longer available

version
number
required

The current version of the product

created_at
number
required

The timestamp of when the product was created in milliseconds since epoch

items
object[]
required

Array of product items that define the product's features and pricing

free_trial
object | null
required

Free trial configuration for this product, if available

base_variant_id
string | null
required

ID of the base variant this product is derived from

scenario
enum<string>

Scenario for when this product is used in attach flows

Available options:
scheduled,
active,
new,
renew,
upgrade,
downgrade,
cancel,
expired,
past_due