Skip to content

List templates

GET
/mail/templates
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.

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."
}