Skip to main content
POST
Create plan

Autorizações

X-Api-Key
string
header
obrigatório

Corpo

application/json

Body for creating a new plan. Exactly one of packagePublicId or content must be provided; bodies with neither are rejected with 400.

billingIntervalMonths
integer<int32>
obrigatório

Billing interval in months for recurring plans.

Exemplo:

1

billingType
enum<string>
obrigatório

Billing model (one-time or recurring).

Opções disponíveis:
one_time,
recurring
priceCents
integer<int32>
obrigatório

Plan price in the smallest currency unit (cents).

Intervalo necessário: x >= 0
Exemplo:

4990

seatsIncluded
integer<int32>
obrigatório

Number of workspace seats included in the plan.

Intervalo necessário: x >= 1
Exemplo:

5

content
object

Inline plan content definition. Mutually exclusive with packagePublicId.

creditPackagePublicId
string<uuid>

Public ID of the credit package bundled with the plan.

Exemplo:

"1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5d"

currency
string

3-letter ISO currency code.

Required string length: 3
Exemplo:

"USD"

description
string

Short description of the plan.

Maximum string length: 500
Exemplo:

"Best for growing teams."

extraCreditsEnabled
boolean

Whether customers can purchase extra credits beyond the included amount. Defaults to false.

Exemplo:

false

extraCreditsPriceCents
integer<int32>

Price of an extra credit pack in the smallest currency unit (cents).

Intervalo necessário: x >= 1
Exemplo:

500

name
string

Display name of the plan.

Required string length: 3 - 100
Exemplo:

"Pro"

packagePublicId
string<uuid>

Public ID of the agent/feature package backing this plan. Mutually exclusive with content.

Exemplo:

"9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21"

unlimitedCredits
boolean

Whether the plan offers unlimited credits. Defaults to false.

Exemplo:

false

visible
boolean

Whether the plan is visible in the public pricing widget. Defaults to true.

Exemplo:

true

Resposta

Created

activeSubscriptions
integer<int32>
billingIntervalMonths
integer<int32>
billingType
enum<string>
Opções disponíveis:
one_time,
recurring
checkoutUrl
string
createdAt
string<date-time>
creditPackage
object
currency
string
description
string
extraCreditsEnabled
boolean
extraCreditsPriceCents
integer<int32>
formattedPrice
string
hubPackage
object
name
string
priceCents
integer<int32>
publicId
string<uuid>
seatsIncluded
integer<int32>
status
enum<string>
Opções disponíveis:
active,
inactive
unlimitedCredits
boolean
visible
boolean
widgetCtaText
string
widgetDescription
string
widgetFeatures
object[]
widgetHighlighted
boolean
widgetTitle
string