Eviworx
Docs

Email Signatures API

The Email Signatures API manages multilingual email signatures appended to outgoing ticket emails. Signatures are assigned per mailbox or fall back to a default signature, support inline images (CID-embedded) and variable placeholders.

✍️
Features
✓ Multilingual (translations per language)
✓ At most one default signature
✓ Overridable per mailbox
✓ 5 variables (e.g. {{agentName}})
✓ Inline images for logos (CID)
✓ HTML sanitization on save
✓ Activate and deactivate
✓ Deletion via soft delete
✓ Immediate effect (next outgoing email)
✓ Test email to your own address

🔐 Auth: Logged-in users only (cookie session); API keys are rejected. Rights via emailSignatures.*. See RBAC →.

Endpoints

Method Endpoint Description Permission
GET/api/email-signaturesList — { data, pagination } (pagination, search)view
GET/api/email-signatures/:idSingle signatureview
GET/api/email-signatures/:id/previewRendered preview (query language?)view
POST/api/email-signaturesCreate (201)create
PUT/api/email-signatures/:idUpdateedit
DELETE/api/email-signatures/:idSoft-delete → 204delete
POST/api/email-signatures/:id/set-defaultSet as default (the previous default is unset) → signature objectsetDefault
POST/api/email-signatures/:id/activateActivate → signature objectedit
POST/api/email-signatures/:id/deactivateDeactivate → signature objectedit
POST/api/email-signatures/:id/test-emailTest email to own address (body language?) → { queued, recipient }edit

List query: page (default 1), limit (default 25, max 100), search, isActive (true/false). The mailbox assignment itself is done via the mailbox configuration (separate right emailSignatures.assignToMailbox).

  • Unknown fields in the body are rejected with 400. The language parameters of preview and test email accept only the five system languages; the language keys inside translations stay deliberately free-form (2–5 chars), so existing data with additional languages is preserved.
  • The test email requires an active email channel — if sending is globally disabled or under maintenance, the route answers 400 EMAIL_SYSTEM_DISABLED instead of putting a mail into a halted queue. Sending itself is asynchronous; { queued: true } means "accepted", not "delivered".

Create Signature

POST /api/email-signatures
{
  "name": "Support-Team",
  "isDefault": false,
  "isActive": true,
  "translations": {
    "de": {
      "html": "<p>Mit freundlichen Grüßen<br>{{agentName}} — {{companyName}}</p>",
      "plainText": "Mit freundlichen Grüßen\n{{agentName}} — {{companyName}}"
    },
    "en": {
      "html": "<p>Best regards<br>{{agentName}} — {{companyName}}</p>",
      "plainText": "Best regards\n{{agentName}} — {{companyName}}"
    }
  }
}

translations is a record (at least one language, key 2–5 chars), each entry with html + plainText (both required). name 1–100 chars. Setting isDefault=true automatically unsets other defaults. The HTML is sanitized on save.

Placeholders (five, in html and plainText): {{agentName}}, {{agentEmail}}, {{agentPhone}}, {{companyName}} and {{appUrl}}. In a ticket reply, {{agentName}} and {{agentEmail}} stand for the name and email address of the replying agent; in system notifications {{agentName}} stands for the application name and {{agentEmail}} stays empty. {{companyName}} comes from the general settings, {{appUrl}} is the address of the application. The preview fills all five with sample data. Unknown placeholders remain as text; lines left empty by an empty value are dropped.

Resolution on Email Sending

When a ticket reply is sent, the matching signature is determined: first the one assigned to the mailbox, otherwise the default signature. Embedded images are sent as CID attachments with the email so they display without being loaded externally.

Permissions (emailSignatures)

Permission Description
emailSignatures.viewList/details/preview
emailSignatures.createCreate signature
emailSignatures.editEdit, activate/deactivate, test email
emailSignatures.deleteDelete (soft-delete)
emailSignatures.setDefaultSet default signature
emailSignatures.assignToMailboxAssign signature to a mailbox (mailbox configuration)
Related Pages
Integrations →

Email sending, mailboxes, CID inline images

Notifications →

Notification templates (separate from signatures)