Skip to content

Change the plan

POST
/api/v1/workspaces/{workspaceId}/billing/change
curl --request POST \
--url https://app.monitorly.cloud/api/v1/workspaces/WORKSPACE_ID/billing/change \
--header 'Content-Type: application/json' \
--cookie __Host-monitorly_session=<__Host-monitorly_session> \
--data '{ "checkPacks": 1, "period": "month", "plan": "example", "serverPacks": 1 }'

Changes the plan, period or packs of the subscription. An upgrade is charged for the rest of the period now, a downgrade credited; lower limits start a grace period. Owner only.

workspaceId
required
string format: uuid

The workspace’s id.

Example

WORKSPACE_ID
Media typeapplication/json

A plan with its period and packs, for a checkout or a change.

object
checkPacks

Packs of 50 checks (Solo and above), 0–100.

integer format: int32
period
required

Billing period of a subscription.

string
Allowed values: month year
plan
required

solo_2026, team_2026 or business_2026.

string
serverPacks

Packs of 5 servers, private nodes (Solo and above), 0–100.

integer format: int32

The billing state.

Media typeapplication/json

The workspace’s plan and billing state.

object
available
required

The installation takes payments (a payment provider is set up).

boolean
canManage
required

The signed-in person may pay, change and cancel (the workspace’s owner, in a session).

boolean
clientToken

Paddle’s client-side token for Paddle.js (meant for browsers); null when billing is off.

string | null
environment

sandbox or live: which provider system checkouts go to; null when billing is off.

string | null
grace
One of:

Over the plan’s limits after they went down.

object
enforceAt
required

When the active checks over the limit get paused.

string
enforcedAt

When they were paused; null while the grace period runs.

string | null
since
required
string
plan
required

A plan: its key and the name people see.

object
key
required

free, solo_2026, team_2026, business_2026.

string
name
required
string
planPausedChecks
required

Checks paused because the workspace stayed over its plan’s limit.

integer format: int64
source
required

Where a workspace’s plan comes from.

string
Allowed values: free subscription grant
subscription
One of:

The workspace’s live subscription.

object
addons
required

Add-on packs bought on top of the plan.

object
checkPacks
required

Packs of 50 checks.

integer format: int32
serverPacks
required

Packs of 5 servers (private nodes).

integer format: int32
cancelAt

When a cancellation the owner asked for takes effect; until then everything stays.

string | null
currentPeriodEnd

When the current paid period ends (the next renewal); null while paused.

string | null
paidByYou
required

The signed-in person pays for it (only they open the billing portal).

boolean
period
required

Billing period of a subscription.

string
Allowed values: month year
plan
required

The plan paid for (while status is paused or canceled it grants nothing).

object
key
required

free, solo_2026, team_2026, business_2026.

string
name
required
string
status
required

A subscription’s state at the payment provider.

string
Allowed values: active trialing past_due paused canceled

Example

{
"source": "free",
"subscription": {
"period": "month",
"status": "active"
}
}

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.not_allowed: this operation needs a signed-in session; tokens cannot call it
  • request.origin_mismatch, request.header_required: a changing request with a session comes from another site or lacks X-Monitorly-Request: 1
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Not Found.

  • request.not_found: it does not exist, or you cannot see it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Conflict.

  • billing.no_subscription: the workspace has no subscription to change, cancel or manage
  • billing.past_due: the last payment failed: update the payment method in the billing portal first
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Payload Too Large.

  • request.too_large: the body is larger than 256 KiB
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.required, field.too_long, field.invalid: a field breaks a rule; errors points at it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Too Many Requests.

  • session.rate_limited: more than 5 changes a second from your sessions
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.

Bad Gateway.

  • billing.provider_failed: the payment provider refused or did not answer; nothing changed
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Service Unavailable.

  • billing.unavailable: this installation takes no payments
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}