POST
/
products
curl --request POST \
  --url https://api.useautumn.com/v1/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "is_add_on": false,
  "is_default": false,
  "items": [
    {
      "feature_id": "<string>",
      "included_usage": 123,
      "interval": "<string>",
      "usage_model": "prepaid",
      "price": 123,
      "billing_units": 123,
      "entity_feature_id": "<string>",
      "reset_usage_on_billing": true,
      "reset_usage_when_enabled": true,
      "tiers": [
        {
          "to": 123,
          "amount": 123
        }
      ]
    }
  ],
  "free_trial": {
    "duration": "<string>",
    "length": 123,
    "unique_fingerprint": true
  }
}'
{
  "autumn_id": "<string>",
  "created_at": 123,
  "id": "<string>",
  "name": "<string>",
  "env": "production",
  "is_add_on": true,
  "is_default": true,
  "group": "<string>",
  "version": 123,
  "items": [
    {
      "feature_id": "<string>",
      "included_usage": 123,
      "interval": "<string>",
      "usage_model": "prepaid",
      "price": 123,
      "billing_units": 123,
      "entity_feature_id": "<string>",
      "reset_usage_on_billing": true,
      "reset_usage_when_enabled": true,
      "tiers": [
        {
          "to": 123,
          "amount": 123
        }
      ]
    }
  ],
  "free_trial": {
    "duration": "<string>",
    "length": 123,
    "unique_fingerprint": true
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
id
string
required

The product ID of the product to create, used to identify the product in the API

name
string

The name of the product

is_add_on
boolean
default:false

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

is_default
boolean
default:false

Whether the product should be attached by default to new customers

items
object[]
free_trial
object

Response

201 - application/json
Product created successfully
autumn_id
string

Autumn's internal ID of the product

created_at
integer

The timestamp of when the product was created

id
string

The ID of the product you set when creating the product

name
string

The name of the product

env
enum<string>

The environment of the product

Available options:
production,
sandbox
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

group
string

The group of the product

version
integer

The version of the product

items
object[]
free_trial
object