Email

Create an email rule

from_name, reply_to, to, cc, bcc, subject, html and text use the template language with the document's context (data keys, data, render including render.invoice) plus files and download_links; condition is an expression. Every field must compile, else 422 email_template_error with errors[].path, line and column. A from_email the provider hasn't verified is saved with the warning email_sender_unverified.

post/v1/templates/{template_id}/email-rules

Request

  • Base URL: https://api-eu.dynamicdocumentapi.com
  • URL: https://api-eu.dynamicdocumentapi.com/v1/templates/{template_id}/email-rules
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

template_idstring required

Template id (tpl_…).

Headers

Idempotency-Keystring

Replays the stored response for 24 h; a different body with the same key → 422.

Request body

attach_formatsstring[]

Only files of these formats; empty = every file.

attachments'attach_or_link' | 'attach' | 'link' | 'none'
  • attach_or_link - Attach Or Link
  • attach - Attach
  • link - Link
  • none - None
bccstring nullable
ccstring nullable
conditionstring nullable

An expression; the rule sends when it is true. Empty = always.

connection_idstring required

emc_… of this workspace.

enabledboolean
from_emailstring nullable

Literal; empty = the connection's default sender. One the provider hasn't verified is saved with the warning email_sender_unverified.

from_namestring nullable

Template source; one line after rendering.

htmlstring nullable

Template source, values HTML-escaped (≤ 256 KiB).

namestring required
positioninteger

0 to 4; the others move. Default: the end.

reply_tostring nullable

Template source; one line after rendering.

subjectstring nullable

Template source; required unless a provider template gives it.

textstring nullable

Template source; empty = derived from html.

tostring nullable

Template source rendering to addresses separated by , ; or line breaks.

Response

attach_formatsstring[] required
attachments'attach_or_link' | 'attach' | 'link' | 'none' required
  • attach_or_link - Attach Or Link
  • attach - Attach
  • link - Link
  • none - None
bccstring required
ccstring required
conditionstring required
connection_idstring required
created_atstring date-time required
enabledboolean required
from_emailstring nullable required

null = the connection's default sender.

from_namestring required
htmlstring required
idstring required

emr_…

namestring required
objectstring
positioninteger required

0 to 4: the order the template's rules send in.

reply_tostring required
subjectstring required
template_idstring required
textstring required
tostring required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 2 revisions of this API.