Skip to main content

Update a license grantee

Update the granteeId of the license to assign it to a new grantee.

info

If you want to unassign the license, you can set the granteeId to null.

import { Salable } from '@salable/node-sdk';

const salable = new Salable('your-salable-api-key');

const updatedLicenses = await salable.licenses.updateMany([
{ granteeId: 'new_userId_1', uuid: 'your-license-uuid' },
{ granteeId: null, uuid: 'your-license-uuid' }, // this license will be unassigned
]);