transactional_send
TransactionalSendMessageRequest
Bases: TypedDict
Request body for POST /v3/domains/{domain_name}/messages/send.
Use from_ for the sender; it is serialized as JSON from (from is a Python keyword).
Attributes:
| Name | Type | Description |
|---|---|---|
to |
Required[List[EmailName]]
|
Recipients (required by the API). |
from_ |
Required[EmailName]
|
Sender |
subject |
NotRequired[str]
|
Subject line. |
body |
NotRequired[str]
|
HTML or plain body depending on |
cc |
NotRequired[List[EmailName]]
|
CC recipients. |
bcc |
NotRequired[List[EmailName]]
|
BCC recipients. |
reply_to |
NotRequired[List[EmailName]]
|
Reply-To recipients. |
attachments |
NotRequired[List[CreateAttachmentRequest]]
|
File attachments. |
send_at |
NotRequired[int]
|
Unix timestamp to send the message later. |
reply_to_message_id |
NotRequired[str]
|
Message being replied to. |
tracking_options |
NotRequired[TrackingOptions]
|
Open/link tracking settings. |
custom_headers |
NotRequired[List[CustomHeader]]
|
Custom MIME headers. |
metadata |
NotRequired[Dict[str, Any]]
|
String-keyed metadata. |
is_plaintext |
NotRequired[bool]
|
Send body as plain text when true. |
template |
NotRequired[TransactionalTemplate]
|
Application template to render (optional vs. body/subject). |
Source code in nylas/models/transactional_send.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
TransactionalTemplate
Bases: TypedDict
Template selection for a transactional send request.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
Required[str]
|
The template ID. |
strict |
NotRequired[bool]
|
When true, Nylas returns an error if the template contains undefined variables. |
variables |
NotRequired[Dict[str, Any]]
|
Key/value pairs substituted into the template. |
Source code in nylas/models/transactional_send.py
10 11 12 13 14 15 16 17 18 19 20 21 22 | |