const url = 'https://app.monitorly.cloud/api/v1/workspaces/WORKSPACE_ID/billing/change';const options = { method: 'POST', headers: { cookie: '__Host-monitorly_session=<__Host-monitorly_session>', 'Content-Type': 'application/json' }, body: '{"checkPacks":1,"period":"month","plan":"example","serverPacks":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The workspace’s id.
Example
WORKSPACE_IDRequest Bodyrequired
Section titled “Request Bodyrequired”A plan with its period and packs, for a checkout or a change.
object
Packs of 50 checks (Solo and above), 0–100.
Billing period of a subscription.
solo_2026, team_2026 or business_2026.
Packs of 5 servers, private nodes (Solo and above), 0–100.
Responses
Section titled “Responses”The billing state.
The workspace’s plan and billing state.
object
The installation takes payments (a payment provider is set up).
The signed-in person may pay, change and cancel (the workspace’s owner, in a session).
Paddle’s client-side token for Paddle.js (meant for browsers); null when billing is off.
sandbox or live: which provider system checkouts go to; null when billing is off.
A plan: its key and the name people see.
object
free, solo_2026, team_2026, business_2026.
Checks paused because the workspace stayed over its plan’s limit.
Where a workspace’s plan comes from.
The workspace’s live subscription.
object
Add-on packs bought on top of the plan.
object
Packs of 50 checks.
Packs of 5 servers (private nodes).
When a cancellation the owner asked for takes effect; until then everything stays.
When the current paid period ends (the next renewal); null while paused.
The signed-in person pays for it (only they open the billing portal).
Billing period of a subscription.
The plan paid for (while status is paused or canceled it grants nothing).
object
free, solo_2026, team_2026, business_2026.
A subscription’s state at the payment provider.
Example
{ "source": "free", "subscription": { "period": "month", "status": "active" }}Bad Request.
request.malformed: the body or a parameter is not of the expected shapeauth.credentials_conflict: the request carries both a session cookie and a token
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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 endedtoken.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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 thistoken.not_allowed: this operation needs a signed-in session; tokens cannot call itrequest.origin_mismatch,request.header_required: a changing request with a session comes from another site or lacksX-Monitorly-Request: 1
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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 managebilling.past_due: the last payment failed: update the payment method in the billing portal first
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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;errorspoints at it
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}Headers
Section titled “Headers”Seconds to wait before trying again.
Bad Gateway.
billing.provider_failed: the payment provider refused or did not answer; nothing changed
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
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
object
Field errors, empty for errors of the whole request.
object
object
JSON pointer into the request body.
Stable code, for example check.timeout_exceeds_interval.
Example generated
{ "detail": "example", "errors": [ { "code": "example", "params": { "additionalProperty": "example" }, "pointer": "example" } ], "status": 1, "title": "example", "type": "example"}