Skip to main content
Creates a new pricing plan in the specified project. You can optionally assign features to the plan at creation time.

Endpoint

POST /api/v1/projects/{slug}/plans

Authentication

Authorization
string
required
Bearer token with your API key. Requires read_write permission.

Path Parameters

slug
string
required
The project’s URL-friendly slug identifier.

Body Parameters

name
string
required
Plan display name.
description
string
Description of the plan.
Mark this plan as “Popular” to highlight it.
isVisible
boolean
Whether this plan is visible on the pricing page.
basePrice
number
Monthly base price of the plan.
isFree
boolean
Whether this is a free plan (overrides basePrice to 0).
features
array
Array of features to assign to this plan at creation time.

Response

Returns the created plan object with status 201 Created, including its assigned plan features.

Example

curl -X POST https://cuprice.io/api/v1/projects/my-saas-app/plans \
  -H "Authorization: Bearer cpk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro",
    "description": "For growing teams",
    "isPopular": true,
    "isVisible": true,
    "basePrice": 29,
    "isFree": false,
    "features": [
      { "featureId": 101, "multiplier": 5 },
      { "featureId": 102, "multiplier": 1 },
      { "featureId": 104, "multiplier": 1 }
    ]
  }'
{
  "id": 201,
  "name": "Pro",
  "description": "For growing teams",
  "basePrice": 29,
  "isPopular": true,
  "isVisible": true,
  "isFree": false,
  "planFeatures": [
    {
      "id": 301,
      "multiplier": 5,
      "feature": {
        "id": 101,
        "name": "AI Prompts",
        "featureType": "Limits",
        "basePrice": 10
      }
    },
    {
      "id": 302,
      "multiplier": 1,
      "feature": {
        "id": 102,
        "name": "Team Members",
        "featureType": "Standart",
        "basePrice": 5
      }
    },
    {
      "id": 303,
      "multiplier": 1,
      "feature": {
        "id": 104,
        "name": "Priority Support",
        "featureType": "Standart",
        "basePrice": 20
      }
    }
  ],
  "createdAt": "2025-10-05T12:00:00.000Z",
  "updatedAt": "2025-10-05T12:00:00.000Z"
}

Errors

StatusDescription
400Missing name or invalid feature IDs
401Invalid or missing API key
403API key does not have read_write permission
404Project with the given slug not found