List templates
GET
/mail/templates
const url = 'https://mail.work.optidata.cloud/api/mail/templates';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://mail.work.optidata.cloud/api/mail/templates \ --header 'Authorization: Bearer <token>'The authenticated user’s message templates, as id and title only — the content of a template is fetched when it is actually applied.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The user’s templates.
Media typeapplication/json
Array<object>
object
id
required
integer
title
required
string | null
Examples
Examplelist
[ { "id": 10, "title": "Welcome" }, { "id": 22, "title": "Invoice reminder" }]Missing, malformed or expired authentication key.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}Rate limit exceeded. Retry after the window resets.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplethrottled
{ "message": "Too Many Attempts."}