/api/orgs/{org_id}/identities/{identity_id}/customer-planAssign a customer plan
A provisioning key may assign only plans an admin delegated to that key; removing a plan (plan_key: null) is dashboard-only. Changes take effect next month unless effective=immediate; counters carry across revisions. Fenced by expected_revision (409 when stale).
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメータ
org_idstring必須Your organization id (uuid).
GET /api/whoamireturns it.identity_idstring必須Identity id.
リクエストボディ
plan_keystring | null必須Null removes the plan (session admins only).
plan_versioninteger | null必須Set together with
plan_key, or both null.expected_revisioninteger必須The assignment's current
revision(0 when none).effectiveenumbudget_periodobject | nullOmit to keep the current period. Changing it needs a plan and
effective=immediate.
レスポンス
200The assignment.
レスポンス
org_idstring必須identity_idstring必須revisioninteger必須Pass as
expected_revisionon the next PUT.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必須
401Missing, unknown or revoked API key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403Not authorized for this policy change, or a customer-plan key.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404Unknown organization, identity or plan.
レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
409Stale
expected_revision, or customer-plan enforcement is off on this deployment.レスポンス
errorstring必須Human-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422Body validation failed, or the policy is invalid.
リクエスト
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