Skip to main content
Skip to main content

create - API Key Module Reference

This documentation provides a reference to the create method. This belongs to the API Key Module.

create(data, sharedContext?): Promise<ApiKeyDTO[]>

This method creates API keys.

Example

const apiKey = await apiKeyModuleService.create([
{
title: "Development API key",
type: "publishable",
created_by: "user_123",
},
])

Parameters

dataCreateApiKeyDTO[]Required
The API keys to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ApiKeyDTO[]>Required
The created API keys.

create(data, sharedContext?): Promise<ApiKeyDTO>

This method creates an API key.

Example

const apiKey = await apiKeyModuleService.create({
title: "Development API key",
type: "publishable",
created_by: "user_123"
})

Parameters

dataCreateApiKeyDTORequired
The API key to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ApiKeyDTO>Required
The created API key.
Was this section helpful?