Start the trial
const url = 'https://api.sloose.com/orgs/org_9f3c/billing/trial';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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://api.sloose.com/orgs/org_9f3c/billing/trial \ --header 'Authorization: Bearer <token>'Starts the Business trial if the org is eligible: once per org, on Free, with no Stripe subscription — named by the org, or live at Stripe before its webhook has named it. Any plan Checkout the org has open at Stripe is expired first: starting the trial is choosing it over them, and none can then be paid under it. Answers 200 with started: false when it was not eligible — not an error, just an answer.
Session only: billing is a person’s to manage, never an org’s API token’s (D5).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
Responses
Section titled “Responses”Not eligible. reason says which rule refused it; entitlements is unchanged.
object
Everything the widget needs to know about what this org may do.
object
object
object
object
CRM users allowed to use the widget; null = unlimited.
Connections the org may hold — a sandbox is a connection like any other; null = unlimited. A file is not one.
Import runs per period, each counted once at the first row it sends to be written, whether or not the CRM takes that row; null = unlimited (fair use). Dry runs never count, and neither does a free retry (Retry failed of a run with failed rows, at most three in a row).
Imports that may be running in the org at once, dry runs aside; null or absent = no limit. A run past it is refused at authorise with LIMIT_RUNS_CONCURRENT.
The most rows one import set may declare. Checked before anything is written.
Server-side runs only. Browser runs are never refused on it.
USD per 1,000 rows beyond rows_per_month, server-side runs only; null = not offered.
object
object
object
Runs counted this period, through any of the org’s connections: each once, at the first row it sent to be written, whether or not the CRM took that row.
AI credits. Included credits reset each period; purchased ones do not.
object
Included + purchased − reserved
Applies right now regardless of the action.
Example
{ "started": false, "reason": "ORG_ALREADY_TRIALED", "entitlements": { "plan": { "key": "free" }, "status": "free", "warnings": [ "LIMIT_ROWS" ] }}Trial started.
object
Everything the widget needs to know about what this org may do.
object
object
object
object
CRM users allowed to use the widget; null = unlimited.
Connections the org may hold — a sandbox is a connection like any other; null = unlimited. A file is not one.
Import runs per period, each counted once at the first row it sends to be written, whether or not the CRM takes that row; null = unlimited (fair use). Dry runs never count, and neither does a free retry (Retry failed of a run with failed rows, at most three in a row).
Imports that may be running in the org at once, dry runs aside; null or absent = no limit. A run past it is refused at authorise with LIMIT_RUNS_CONCURRENT.
The most rows one import set may declare. Checked before anything is written.
Server-side runs only. Browser runs are never refused on it.
USD per 1,000 rows beyond rows_per_month, server-side runs only; null = not offered.
object
object
object
Runs counted this period, through any of the org’s connections: each once, at the first row it sent to be written, whether or not the CRM took that row.
AI credits. Included credits reset each period; purchased ones do not.
object
Included + purchased − reserved
Applies right now regardless of the action.
Example
{ "started": true, "entitlements": { "plan": { "key": "free" }, "status": "free", "warnings": [ "LIMIT_ROWS" ] }}No bearer, or one that is expired, revoked or no longer resolves to a member.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low, it was issued for a different org, it is an API token (SESSION_REQUIRED), or it is a staff member’s view of the org (IMPERSONATION_REFUSED; a read-only view is refused before this, IMPERSONATION_READ_ONLY): billing spends and changes the org’s money, and a view would do it in the member’s name.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}Stripe refused or was unavailable while the trial asked it whether the org pays already (PAYMENT_PROVIDER_REFUSED, PAYMENT_PROVIDER_UNAVAILABLE), and the trial did not start. Any open plan Checkout of the org 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.
object
Example
{ "code": "PAYMENT_PROVIDER_REFUSED"}