Skip to main content
POST
Create a plan

Authorizations

Authorization
string
header
required

A Custral API key, created in Settings → Developers → Applications, sent as Authorization: Bearer sk_…. The X-Api-Key header is also accepted and takes precedence. Use a secret key (sk_…) from your server; a publishable key (pk_…) may hold only objects:read and usage:write. Never expose a secret key in a browser.

Body

application/json
key
string
required

A slug: lowercase letters, digits and dashes, up to 40 characters.

Pattern: ^[a-z0-9][a-z0-9-]{0,39}$
Example:

"growth"

name
string
required
Required string length: 1 - 80
description
string
Maximum string length: 280
features
string[]
Maximum array length: 12
Maximum string length: 120
highlighted
boolean
ctaLabel
string

"" uses "Switch to ".

Maximum string length: 40
trialDays
integer
Required range: 0 <= x <= 90
monthlyProduct
string

The product billed monthly, by id or exact name. "" clears it.

Maximum string length: 200
yearlyProduct
string

The product billed yearly, by id or exact name. "" clears it.

Maximum string length: 200
contactSalesUrl
string

https only. "" clears it.

Maximum string length: 2000

Response

200 - application/json

The plan.

data
object

A plan on the customer billing page.

reqId
string

A per-request id (req_…). Quote it to support when reporting a problem.

Example:

"req_2a1f9c8e7b6d5"