/api/orgs/{org_id}/identities/{identity_id}/customer-plan顧客プランを割り当て
プロビジョニングキーが割り当てられるのは、管理者がそのキーに委任したプランだけです。プランの削除(plan_key: null)はダッシュボードからのみ行えます。effective=immediateを指定しない限り、変更は翌月から有効になります。カウンターはリビジョンをまたいで引き継がれます。expected_revisionで保護されます(古い場合は409)。
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメーター
org_idstring必須お客様の組織ID(uuid)。
GET /api/whoamiで取得できます。identity_idstring必須アイデンティティID。
リクエストボディ
plan_keystring | null必須nullでプランを削除します(セッションの管理者のみ)。
plan_versioninteger | null必須plan_keyと一緒に設定するか、両方nullにします。expected_revisioninteger必須割り当ての現在の
revision(ない場合は0)。effectiveenumbudget_periodobject | null省略すると現在の期間を維持します。変更するにはプランと
effective=immediateが必要です。
レスポンス
200割り当て。
レスポンス
org_idstring必須identity_idstring必須revisioninteger必須次のPUTで
expected_revisionとして渡します。plan_keystring | null必須plan_versioninteger | null必須pending_plan_keystring | null必須pending_plan_versioninteger | null必須pending_effective_atstring | null必須updated_atstring必須budget_periodobjectいずれか
object
kindstring必須
object
kindstring必須source_period_idstring必須startstring必須endstring必須
401APIキーがない、不明、または失効しています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
403このポリシー変更の権限がない、または顧客プランのキーです。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
404不明な組織、アイデンティティ、またはプランです。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
409expected_revisionが古いか、このデプロイ環境では顧客プランの適用が無効です。レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
422ボディの検証に失敗した、またはポリシーが無効です。
リクエスト
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/customer-plan' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"plan_key": "starter",
"plan_version": 2,
"expected_revision": 3,
"effective": "next_month"
}'レスポンス
{
"org_id": "3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10",
"identity_id": "acme-support",
"revision": 4,
"plan_key": "starter",
"plan_version": 2,
"pending_plan_key": "starter",
"pending_plan_version": 2,
"pending_effective_at": "2026-12-01T00:00:00Z",
"updated_at": "2026-11-10T16:00:00Z",
"budget_period": {
"kind": "calendar_month_utc"
}
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/customer-plan