Update assigned plan for an organization
Changes the plan assigned to a customer organization. The change takes effect immediately. The previous subscription is marked as upgraded and a new active subscription is created with the selected plan. If the organization is already on the requested plan, no change is made.
Use the plans endpoint to see available plan slugs and commitment options.
Authorization
DistributorApiKey Long-lived distributor API key scoped to a channel partner on the shared smao instance.
In: header
Path Parameters
MongoDB ObjectId of the organization.
^[a-fA-F0-9]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/organizations/665abc123def456789012345/plan" \ -H "Content-Type: application/json" \ -d '{ "plan": { "slug": "professional", "commitment": "yearly" } }'{ "status": "success", "organization": { "id": "69c175970f3e28310926a1aa", "name": "string", "industry": "string", "timezone": "string", "channelPartner": "acme", "externalCustomerId": "string", "externalContractId": "string", "partnerId": "665abc123def456789012345", "ownerEmail": "user@example.com", "createdAt": "2019-08-24T14:15:22Z", "plan": { "id": "6967b1c7138bed3e7f6bf7e6", "slug": "string", "name": "string", "commitment": "none", "currency": "string", "baseFee": 0 } }}List assignable plans GET
Returns all SMAO plans available for assignment to customer organizations. Trial and enterprise plans are excluded. Each plan includes its **slug**, **commitment** (monthly/yearly), **baseFee** in the smallest currency unit, and a **usage** array showing included units and overage cost per service.
Get billing summary for a single organization GET
Returns usage for the requested date window compared against the organization's current subscription plan. The date range must not exceed 31 days. Usage is compared against the plan's included allowances and any overages are calculated with the plan's per-unit overage cost.