Skip to content
Endless Documentation
Billing

Preview plan change

GET
/organizations/{organization_id}/subscription/preview

Preview plan change. Scoped to the organization named by organization_id.

Authorization

headerAuthorizationBearer <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

Path Parameters

organization_id*string
Match^org_

Query Parameters

price_id*string
Length1 <= length

Header Parameters

Endless-Api-Version?string

Pin 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.

Response Body

OK

application/json
  1. response
is_upgrade*boolean
current_plan*
new_plan*
current_period_end*string|null
immediate_charge*number
effective_at?string
next_billing_at?string|null
new_grant?
Example Request
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"  }}