management
superuser

Get organization trial state

Changed on

Get any organization's trial state, as GET /subscriptions/trial-state reports it to the organization itself.

This endpoint is for superusers only. A no-credit-card Professional trial (WBC-763) has no local subscription row -- the trial lives only on the Orb subscription -- so getOrganizationSubscription returns null for it, and this is how the superuser pane tells a trialing org from one that is missing its subscription.

All-null trial fields mean the org's active Orb subscription has no trial window. They do not mean the org never trialed: a lapse downgrade to Community replaces the Orb subscription. Orb never clears a trial end date either, so an org that paid for years after a plan-default trial reads converted.

Unlike the org-scoped route, a failed Orb lookup is a 424 rather than all-null fields: an operator would otherwise read a trialing org as having no trial, with nothing to say the answer is incomplete. The Orb cache is shared with that route, so after repeated failures it may answer 424 for up to TRIAL_SIGNALS_STALE_REFRESH_BACKOFF_SECONDS without asking Orb again.

get/management/organization/{organization_id}/trial-state

Request

  • Base URL
    https://api.cloud.wherobots.com
  • URL
    https://api.cloud.wherobots.com/management/organization/{organization_id}/trial-state
  • Auth
    • HTTP bearer
    • or API key in header X-API-Key

Path parameters

organization_idstring required

Response

Successful Response

trialStartedAtstring date-time nullable
trialEndsAtstring date-time nullable
trialCreditsRemainingstring nullable
trialStatus'active' | 'converted' | 'expired' | 'canceled' | 'ending_soon'

Derived lifecycle status of an organization's Professional trial.

Wire values (lowercased member names, matching the repo's other LowercaseStrEnum enums):

ACTIVE - "active" trial live, with or without a card on file (WBC-855). Read hasPaymentMethod for card presence. CONVERTED - "converted" the trial finished with a valid payment method on file, so the org rolled onto paid usage. Also an org whose delinquency downgrade is in effect (WBC-766): it converted and then stopped paying, which computeStatus reports as zero_compute -- it is not an expired trial. EXPIRED - "expired" trial lapsed with no card -> downgraded to Community. CANCELED - "canceled" subscription cancelled / org deleted without converting. ENDING_SOON - "ending_soon" credit-based flavor, set when the credit_balance_dropped signal fires while the trial is still live. The time-based "ending soon" flavor is derived downstream by consumers from trialEndsAt.

computeStatus'full' | 'zero_compute'

Two-tier entitlement / zero-compute state (see WS2/WS3).

FULL - "full" compute entitlement is intact. ZERO_COMPUTE - "zero_compute" compute is withdrawn (trial expired or cancelled without converting).

The full WS2/WS3 entitlement semantics land with WBC-766; here we expose a conservative two-tier value derived from the trial status so downstream consumers have the field available.

hasPaymentMethodboolean required

Changes