Manage seats
Add or remove seats from free plans or paid subscriptions.
Add seats
The process to add seats varies depending on whether it is a paid subscription or a free plan.
Free plan
Adding seats to a free plan is done by creating ad hoc licenses associated with the plan.
Paid subscription
All seats created are unassigned by default. If you want to assign them, you will need to update the licenses.
- Node.js
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key');
await salable.subscriptions.addSeats('your-subscription-uuid', {
increment: 2,
});
curl
-XPOST
-H 'x-api-key: your-salable-api-key'
-d '{ "increment": 2 }'
'https://api.salable.app/subscriptions/your-subscription-uuid/seats'
Remove seats
The process to remove seats varies depending on whether it is a paid subscription or a free license.
info
Only unassigned seats can be removed.
Free plan
- Node.js
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key');
await salable.licenses.cancelMany(['a-license-uuid', 'a-license-uuid']);
curl
-XDELETE
-H 'x-api-key: your-salable-api-key'
'https://api.salable.app/licenses/your-license-uuid'
Paid subscription
danger
Do not modify subscriptions directly through Stripe, always manage them through the Salable API/SDKs to avoid issues.
- Node.js
- cURL
import { Salable } from '@salable/node-sdk';
const salable = new Salable('your-salable-api-key');
await salable.subscriptions.removeSeats('your-subscription-uuid', {
decrement: 2,
});
curl
-XPUT
-H 'x-api-key: your-salable-api-key'
-d '{ "decrement": 2 }'
'https://api.salable.app/subscriptions/:subscriptionUuid/seats'
caution
Ensure that the number of seats being removed doesn't take the number of active seats below the minimum set on the plan.