create()
Creates a new machine.
function create(params: CreateMachineParams): Promise<Machine>- Name
name- Type
string- Description
The name of the machine.
- Name
scopedMachines?- Type
string[]- Description
Array of machine IDs that this machine will have access to.
- Name
defaultTokenTtl?- Type
number- Description
The default time-to-live (TTL) in seconds for tokens created by this machine.
const response = await clerkClient.machines.create({
name: 'Email Server',
})const response = await clerkClient.machines.create({
name: 'API Gateway',
scopedMachines: ['mch_123', 'mch_456'],
defaultTokenTtl: 3600,
})Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint POST/machines. See the BAPI reference for more information.
Feedback
Last updated on