Skip to main content
Version: Node SDK

Create License

This method creates an ad hoc license

Code Sample

Create one

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

const salable = new Salable('{{API_KEY}}', 'v2');

const license = await salable.licenses.create({
planUuid: '60f4f073-f6df-43cf-b394-2d373802863d',
member: 'orgId_1234',
granteeId: 'userId_1',
status: 'ACTIVE',
endTime: '2025-07-06T12:00:00.000Z',
});

Parameters

createAdHocLicenseParams (required)

Type: CreateAdhocLicenseInput

OptionTypeDescriptionRequired
planUuidstringThe UUID of the plan associated with the license. The planUuid can be found on the Plan view in the Salable dashboard
memberstringThe ID of the member who will manage the license.
granteeIdstringThe grantee ID for the license.
statusstringThe status of the created license, e.g. "ACTIVE" "TRIALING"
endTimestringProvide a custom end time for the license; this will override the plan's default interval.

Return Type

For more information about this request see our API documentation on License Object