Skip to content

Delete a template

DELETE
/mail/templates/{emailTemplate}
curl --request DELETE \
--url https://mail.work.optidata.cloud/api/mail/templates/22 \
--header 'Authorization: Bearer <token>'

Delete a template and the inline images stored with it.

emailTemplate
required
integer

Id of the template.

The operation succeeded. The body is an empty JSON array ([]) — these endpoints acknowledge success with no payload.

Media typeapplication/json
Array
Examples
Exampleok
[]

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

The caller may not act on this mailbox, user or resource.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

No such resource, or it does not belong to the caller.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model."
}

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