Billing
Preview plan change
GET
Preview plan change. Scoped to the organization named by organization_id.
header
AuthorizationBearer <esk_live_…>A workspace API key created in workspace settings. It acts as the member who created it, narrowed to its abilities, projects and credit limit. Each operation names the ability it needs.
Scope: billing:read
organization_id*stringMatch
^org_price_id*stringLength
1 <= lengthEndless-Api-Version?stringPin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.
OK
application/json- response
is_upgrade*booleancurrent_plan*new_plan*current_period_end*string|nullimmediate_charge*numbereffective_at?stringnext_billing_at?string|nullnew_grant?curl -X GET 'https://api.endless.app/organizations/org_abc123/subscription/preview?price_id=string'Example Response
{ "is_upgrade": true, "current_plan": { "name": "string", "price": 0, "credits": 0 }, "new_plan": { "name": "string", "price": 0, "credits": 0 }, "current_period_end": "string", "immediate_charge": 0, "effective_at": "string", "next_billing_at": "string", "new_grant": { "credits": 0, "effective_at": "string", "expires_at": "string" }}