billing

POST /v1/trials

Start a free trial on a plan.

すべての billing エンドポイント

認証

ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。

組織 ID を入力する場所

このエンドポイントは、JSONボディのフィールドとして org_id を受け取ります。

組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

curl -X POST https://api.zinndigital.com/v1/trials \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "plan_code": <string> }'

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く

詳細

docs/20. **The endpoint the "Start trial" buttons had nowhere to point at.** Three admin trial endpoints existed — list templates, edit a template, staff-extend a trial — and no customer-facing one, so all 47 CTAs on the public pricing page linked to `?intent=register`: *register first*, which is the opposite of what the button says. ⛔ `plan_code`, never a product line. Eligibility is a property of the **plan** (owner ruling 2026-07-29): cloud and VPS live in the same line as plans that do carry a trial, so a line-shaped request could not express "never on billable per-instance compute" at all. One trial per organization, enforced by a database constraint as well as a check — so a double-click races safely and the loser is refused rather than granted a second trial.

リクエスト本文

名前タイプ必須これがその内容です
plan_codestringはい
org_idstringいいえRequired only when the caller bills for more than one organization. With exactly one it is unambiguous; with several it is asked for rather than guessed, because starting a rese…
auto_convert_opt_inbooleanいいえ⛔ Defaults to false — the direction that cannot take money nobody agreed to.

返信

名前タイプ必須これがその内容です
idstringはい
org_idstringはい
statusstring<active, expired, converted, canceled>はい
product_linestringはいThe line's CODE, not its display name — the dashboard renders the label from its own catalogue, so prose here would be a second, untranslated source of that word on the screen.
max_sitesintegerはい
started_atstringはい
ends_atstringはい
auto_convert_opt_inbooleanいいえWhether the customer agreed **at the start** that this may become a paid subscription when the period ends. Captured per trial rather than read from the template at expiry, so c…
days_remainingintegerいいえWhole days until `ends_at`, rounded UP and floored at zero. Computed on the server on purpose: a client doing `(ends_at - Date.now())` measures the **device** clock, so a laptop…
upgradeTrialUpgradeOfferいいえThe plan this trial invites the customer to buy, priced in their own currency (`X-Zinn-Currency`, falling back to the org default). ⛔ `null` when the template names no target or…

このエンドポイントが返すエラー

401 · 403 · 404 · 422