Skip to the page

API reference

Billing

The plan, the plans on offer and an enterprise inquiry.

GET The workspace’s plan, subscription and plan history

/api/clist/v1/workspaces/{workspaceId}/billing

API key scope: workspace.update

The plan in force and who manages it, the subscription paying for it (renewing, or ending at paid_through), a change already scheduled (a downgrade starts when the paid period ends), and past plan changes, newest first. Owners and admins.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)yes

Responses

  • 200 application/json
    • plan_key string required
    • managed_by one of: "billing", "operator", "default" required
    • self_service boolean required
    • subscription object or null required
      • plan_key string required
      • interval one of: "month", "year" required
      • state one of: "renewing", "ending" required
      • paid_through string (date-time) or null required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
    • scheduled object or null required
      • plan_key string required
      • interval one of: "month", "year" required
      • starts_at string (date-time) required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
    • history array of object required
      • at string (date-time) required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
      • from string required
      • to string required
      • source one of: "billing", "operator" required

Errors come in the error format.

GET The plans, and what moving to each would mean

/api/clist/v1/workspaces/{workspaceId}/billing/plans

API key scope: workspace.update

Every plan with its main limits and features, the prices and intervals sold, and for each option whether it is the current plan, an upgrade (at once) or a downgrade (when the paid period ends). For smaller plans, over_limit and features_lost preview what the workspace would be over: nothing is deleted, only new use is blocked. Enterprise is always contact.

Parameters

NameInTypeRequiredDescription
workspaceIdpathstring (uuid)yes

Responses

  • 200 application/json
    • currency string required
    • plans array of object required
      • key string required
      • limits object required
      • features object required
      • options array of object required
        • interval one of: "month", "year" or null required
        • action one of: "current", "upgrade", "downgrade", "resume", "scheduled", "contact", "unavailable" required
        • price string or null required
        • effective_at string (date-time) or null required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
      • over_limit array of object required
        • key string required
        • used number required
        • limit number required
      • features_lost array of string required

Errors come in the error format.