Get project email template
Get a custom email template for the specified locale and type.
/project/templates/email/{templateId}Scope templates.readSDK: @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.
Parameters
Section titled “Parameters”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.
Responses
Section titled “Responses”200Success400Invalid or missing parameter401No session, no permission on the resource or key without the scope404Resource in the path not found429Rate limitEvery 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});curl "https://cloud.owbase.dev/v1/project/templates/email/<TEMPLATE_ID>" \ -H "X-Owbase-Project: <PROJECT_ID>" \ -H "X-Owbase-Key: $OWBASE_API_KEY"{ "templateId": "verification", "locale": "en_us", "message": "Click on the link to verify your account.", "senderName": "My User", "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.