Skip to main content
POST
/
api
/
v1
/
plans
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const plan = await client.v1.events.plans.create({
  id: 'id',
  displayName: 'displayName',
  productId: 'productId',
});

console.log(plan.data);
{
  "data": {
    "id": "plan-professional",
    "displayName": "Professional",
    "description": "Professional plan with advanced features",
    "productId": "product-starter",
    "status": "PUBLISHED",
    "pricingType": "PAID",
    "billingId": "price_1234567890",
    "versionNumber": 1,
    "isLatest": true,
    "entitlements": [
      {
        "type": "FEATURE",
        "id": "feature-advanced-analytics"
      },
      {
        "type": "CREDIT",
        "id": "api-calls"
      }
    ],
    "metadata": {},
    "createdAt": "2025-09-02T14:56:54.496Z",
    "updatedAt": "2025-11-29T16:49:52.604Z",
    "parentPlanId": null
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Body

application/json

Request to create a new plan

id
string
required

The unique identifier for the entity

Required string length: 1 - 255
displayName
string
required

The display name of the package

Maximum string length: 255
productId
string
required

The product ID to associate the plan with

Required string length: 1 - 255
description
string | null

The description of the package

Maximum string length: 255
parentPlanId
string | null

The ID of the parent plan, if applicable

Maximum string length: 255
pricingType
enum<string> | null

The pricing type of the package

Available options:
FREE,
PAID,
CUSTOM
billingId
string | null

The unique identifier for the entity in the billing provider

Maximum string length: 255
status
enum<string>

The status of the package

Available options:
DRAFT,
PUBLISHED,
ARCHIVED
metadata
object

Metadata associated with the entity

Response

The newly created plan object.

Response object

data
Plan · object
required

Plan configuration object