sendEmail (sdk.gen)

temps · email, email-sending, transactional-email, sdk-client

Generated SDK function that sends an email by POSTing JSON to /emails with bearer authentication.

export const sendEmail = <ThrowOnError extends boolean = false>(options: Options<SendEmailData, ThrowOnError>): RequestResult<SendEmailResponses, SendEmailErrors, ThrowOnError> => (options.client ?? client).post<SendEmailResponses, SendEmailErrors, ThrowOnError>({
    security: [{ scheme: 'bearer', type: 'http' }],
    url: '/emails',
    ...options,
    headers: {
        'Content-Type': 'application/json',
        ...options.headers
    }
});

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key