Create Plan

Create a new plan.

注意:credits 不接受请求传入,而是由 monthly_limit 反推(见 internal_plan_credits),保证"额度"与"积分"不会被人为配歪。 features 以 JSON 文本落库,ensure_ascii=False 是为了让中文特性名在库里可读。

副作用:写库 + 清套餐缓存(含 C 端公开套餐列表)。

post/admin/plans

Request

  • Base URL: https://api.twtapi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.twtapi.com/admin/plans
  • Auth: none declared

Request body

plan_typestring
namestring required
pricenumber
subscription_pricenumber
currencystring
monthly_limitinteger
rate_limit_per_secondinteger nullable
rate_limit_per_hourinteger nullable
featuresstring[]
is_popularboolean
button_textstring
button_stylestring
billing_modestring
trial_periodstring nullable
validity_periodstring
overage_price_per_callnumber nullable
sort_orderinteger
is_activeboolean

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.