Skip to content
v2.7

Get project email template

Get a custom email template for the specified locale and type.

GET/project/templates/email/{templateId}Scope templates.read

SDK: @owbase/node only

Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.

templateId ProjectEmailTemplateId required

Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery Values: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery.

locale ProjectEmailTemplateLocale

Custom email template locale. If left empty, the fallback locale (en) will be used. Values: af, ar-ae, ar-bh, ar-dz, ar-eg, ar-iq, ar-jo, ar-kw, ar-lb, ar-ly, ar-ma, ar-om, ar-qa, ar-sa, ar-sy, ar-tn, ar-ye, as, az, be, bg, bh, bn, bs, ca, cs, cy, da, de, de-at, de-ch, de-li, de-lu, el, en, en-au, en-bz, en-ca, en-gb, en-ie, en-jm, en-nz, en-tt, en-us, en-za, eo, es, es-ar, es-bo, es-cl, es-co, es-cr, es-do, es-ec, es-gt, es-hn, es-mx, es-ni, es-pa, es-pe, es-pr, es-py, es-sv, es-uy, es-ve, et, eu, fa, fi, fo, fr, fr-be, fr-ca, fr-ch, fr-lu, ga, gd, he, hi, hr, hu, id, is, it, it-ch, ja, ji, ko, ku, lt, lv, mk, ml, ms, mt, nb, ne, nl, nl-be, nn, no, pa, pl, pt, pt-br, rm, ro, ro-md, ru, ru-md, sb, sk, sl, sq, sr, sv, sv-fi, th, tn, tr, ts, ua, ur, ve, vi, xh, zh-cn, zh-hk, zh-sg, zh-tw, zu.

Access: API key with the templates.read scope.

200Success
400Invalid or missing parameter
401No session, no permission on the resource or key without the scope
404Resource in the path not found
429Rate limit

Every error comes as JSON with code, type and message: see Errors.

import { Client, Project, ProjectEmailTemplateId, ProjectEmailTemplateLocale } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const project = new Project(client);
const result = await project.getEmailTemplate({
templateId: ProjectEmailTemplateId.Verification,
locale: ProjectEmailTemplateLocale.Af, // optional
});
Response200 OK
{
"templateId": "verification",
"locale": "en_us",
"message": "Click on the link to verify your account.",
"senderName": "My User",
"senderEmail": "[email protected]",
"replyToEmail": "[email protected]",
"replyToName": "Support Team",
"subject": "Please verify your email address"
}

The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.

Was this page helpful?