PostMailinglists
Function: postMailinglists()
postMailinglists<
ThrowOnError>(options?):RequestResult<PostMailinglistsResponses,PostMailinglistsErrors,ThrowOnError>
Defined in: app/api/sdk.gen.ts:451
Creates a new mailing list. This endpoint allows authorized users to create a new mailing list by providing the necessary details in the request body, encapsulated in the PostMailinglistDTO. The method calls the CreateMailinglist function of the IMailinglistService, passing the DTO, user ID, and cancellation token to handle the creation logic. If the mailing list is successfully created, it returns an HTTP 201 Created response with the details of the newly created mailing list. The endpoint also handles exceptions, returning a 403 Forbidden response for unauthorized access and a 400 Bad Request response for other errors. This functionality is essential for users to expand their communication channels by adding new mailing lists as needed.
Type Parameters
ThrowOnError
ThrowOnError *extends* boolean = false
Parameters
options?
Options<PostMailinglistsData, ThrowOnError>
Returns
RequestResult<PostMailinglistsResponses, PostMailinglistsErrors, ThrowOnError>