⚓️ Portcall

How to add features to a plan

Add unmetered features to plans using features + plan-features endpoints.

Use unmetered features for on/off access controls.

1) Create the feature

curl -sS -X POST "$PORTCALL_API_BASE/v1/features" \
  -H "x-api-key: $PORTCALL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"feature_id":"priority_support","is_metered":false}'

2) Attach feature to the plan

curl -sS -X POST "$PORTCALL_API_BASE/v1/plan-features" \
  -H "x-api-key: $PORTCALL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"plan_id":"plan_x","feature_id":"priority_support","interval":"none","quota":-1}'

Recommended values for unmetered features:

  • quota: -1 (unlimited)
  • interval: "none" (no periodic reset)

3) Verify for a user

After subscription, check entitlement state:

curl -sS "$PORTCALL_API_BASE/v1/entitlements/user_x/priority_support" \
  -H "x-api-key: $PORTCALL_API_KEY"