Skip to content

Start an organisation’s trial

POST
/billing/admin/orgs/{orgId}/trial
curl --request POST \
--url https://api.sloose.com/billing/admin/orgs/org_9f3c/trial \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "endsAt": "2026-11-30" }'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. The same eligibility rules as the customer-facing route — once per organisation, and no Stripe subscription, live at Stripe included — and the organisation’s open plan Checkouts are expired first, as there. Without a body it is the standard trial, Business for 14 days with 200 credits; endsAt ends it on a day staff choose, its credits scaled to its length — and more can be granted with POST /entitlements/admin/orgs/{orgId}/credits. A start is written down as org.trial, with the end chosen (endsOn, null for the standard trial), when it ends and the credits it grants.

orgId
required

The organisation id.

string
Example
org_9f3c

The organisation id.

Media typeapplication/json
object
endsAt

The day the trial ends on, YYYY-MM-DD: today or later and at most 90 days from today, in UTC. The trial runs through the end of that day in UTC, as an override’s expiry chosen in the backoffice does, and grants 200 credits for every 30 days of it begun: 200 up to 30 days, 400 up to 60. Omitted, null or empty, it is the standard trial: 14 days with 200 credits.

Example
2026-11-30
key
additional properties

Not eligible, and which rule refused it.

Media typeapplication/json
object
started
required
boolean
reason
required
string
Allowed values: ORG_ALREADY_TRIALED NOT_ON_FREE_PLAN HAS_SUBSCRIPTION RESERVATION_LAPSED OWES_INVOICE
key
additional properties
Example
{
"started": false,
"reason": "ORG_ALREADY_TRIALED"
}

Trial started.

Media typeapplication/json
object
started
required
boolean
trialId
required
string
endsAt
required

When the trial ends, in UTC.

string
credits
required

The AI credits it grants.

number
key
additional properties
Example
{
"started": true
}

endsAt is not a calendar day written YYYY-MM-DD (TRIAL_END_NOT_A_DAY), is before today (TRIAL_END_PAST), or is more than 90 days from today (TRIAL_END_TOO_FAR), all in UTC; or a JSON body that is not an object (INVALID_BODY, with issues). An endsAt that is not text is TRIAL_END_NOT_A_DAY. Nothing is started. For the first three, error says which in the words the backoffice shows as the day is typed.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: TRIAL_END_NOT_A_DAY TRIAL_END_PAST TRIAL_END_TOO_FAR INVALID_BODY
key
additional properties
Example
{
"code": "TRIAL_END_NOT_A_DAY"
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Stripe refused or was unavailable while the trial asked it whether the organisation pays already (PAYMENT_PROVIDER_REFUSED, PAYMENT_PROVIDER_UNAVAILABLE), and the trial did not start. Any open plan Checkout of the organisation closed before the failure stays closed: the trial closes them first, and a Checkout can be made again from Plan. Stripe’s own words are logged, not returned.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: PAYMENT_PROVIDER_REFUSED PAYMENT_PROVIDER_UNAVAILABLE
key
additional properties
Example
{
"code": "PAYMENT_PROVIDER_REFUSED"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com