Download OpenAPI specification:
Empower Your Apps with RustMailer's Blazing-Fast REST & gRPC Email APIs
[- {
- "token": "string",
- "accounts": [
- {
- "id": 0,
- "email": "string"
}
], - "created_at": 0,
- "updated_at": 0,
- "description": "string",
- "access_scopes": [
- "Api"
], - "last_access_at": 0,
- "acl": {
- "ip_whitelist": [
- "string"
], - "rate_limit": {
- "interval": 0,
- "quota": 0
}
}
}
]
Requires root privileges.
account_id required | integer <uint64> The ID of the account whose tokens are to be retrieved. |
[- {
- "token": "string",
- "accounts": [
- {
- "id": 0,
- "email": "string"
}
], - "created_at": 0,
- "updated_at": 0,
- "description": "string",
- "access_scopes": [
- "Api"
], - "last_access_at": 0,
- "acl": {
- "ip_whitelist": [
- "string"
], - "rate_limit": {
- "interval": 0,
- "quota": 0
}
}
}
]
Requires root privileges.
token required | string The access token to be updated. |
The request payload.
accounts | Array of integers <uint64> [ items <uint64 > ] A set of account information associated with the token. |
description | string <= 255 characters An optional description of the token's purpose or usage. |
access_scopes | Array of strings (AccessTokenScope) Items Enum: "Api" "Metrics" A set of scopes defining the token's access permissions. |
object (AccessControl) Optional access control settings |
{- "accounts": [
- 0
], - "description": "string",
- "access_scopes": [
- "Api"
], - "acl": {
- "ip_whitelist": [
- "string"
], - "rate_limit": {
- "interval": 0,
- "quota": 0
}
}
}
{- "message": "string",
- "code": 0
}
Requires root privileges.
The request payload
accounts required | Array of integers <uint64> [ items <uint64 > ] A set of account information associated with the token. |
description | string <= 255 characters An optional description of the token's purpose or usage. |
access_scopes required | Array of strings (AccessTokenScope) Items Enum: "Api" "Metrics" A set of scopes defining the token's access permissions. |
object (AccessControl) Optional access control settings |
{- "accounts": [
- 0
], - "description": "string",
- "access_scopes": [
- "Api"
], - "acl": {
- "ip_whitelist": [
- "string"
], - "rate_limit": {
- "interval": 0,
- "quota": 0
}
}
}
{- "message": "string",
- "code": 0
}
{- "id": 0,
- "imap": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "smtp": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "enabled": true,
- "email": "string",
- "name": "string",
- "minimal_sync": true,
- "capabilities": [
- "string"
], - "dsn_capable": true,
- "date_since": {
- "fixed": "string",
- "relative": {
- "unit": "Days",
- "value": 1
}
}, - "sync_folders": [
- "string"
], - "full_sync_interval_min": 0,
- "incremental_sync_interval_sec": 0,
- "known_folders": [
- "string"
], - "created_at": 0,
- "updated_at": 0
}
Account update request payload
enabled | boolean Represents the account activation status. If this value is |
name | string Display name for the account (optional) |
object (ImapConfig) IMAP server configuration | |
object (SmtpConfig) SMTP server configuration | |
object (DateSince) Controls initial synchronization time range When dealing with large mailboxes, this restricts scanning to:
Use Cases
| |
sync_folders | Array of strings Configuration for selective folder synchronization Defaults to standard folders ( |
full_sync_interval_min | integer <int64> [ 10 .. 10080 ] Full sync interval (minutes) |
incremental_sync_interval_sec | integer <int64> [ 10 .. 3600 ] Incremental sync interval (seconds) |
{- "enabled": true,
- "name": "string",
- "imap": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "smtp": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "date_since": {
- "fixed": "string",
- "relative": {
- "unit": "Days",
- "value": 1
}
}, - "sync_folders": [
- "string"
], - "full_sync_interval_min": 10,
- "incremental_sync_interval_sec": 10
}
{- "message": "string",
- "code": 0
}
Account creation request payload
email required | string Email address associated with this account This field represents the user's email address and is required for account creation. Once set during account creation, the email address cannot be modified. |
name | string Display name for the account (optional) |
required | object (ImapConfig) IMAP server configuration |
required | object (SmtpConfig) SMTP server configuration |
enabled required | boolean Represents the account activation status. If this value is |
object (DateSince) Controls initial synchronization time range When dealing with large mailboxes, this restricts scanning to:
Use Cases
| |
minimal_sync required | boolean Minimal sync mode flag When enabled (
|
full_sync_interval_min | integer <int64> [ 10 .. 10080 ] Full sync interval (minutes), default 30m |
incremental_sync_interval_sec | integer <int64> [ 10 .. 3600 ] Incremental sync interval (seconds), default 60s |
{- "email": "string",
- "name": "string",
- "imap": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "smtp": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "enabled": true,
- "date_since": {
- "fixed": "string",
- "relative": {
- "unit": "Days",
- "value": 1
}
}, - "minimal_sync": true,
- "full_sync_interval_min": 10,
- "incremental_sync_interval_sec": 10
}
{- "id": 0,
- "imap": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "smtp": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "enabled": true,
- "email": "string",
- "name": "string",
- "minimal_sync": true,
- "capabilities": [
- "string"
], - "dsn_capable": true,
- "date_since": {
- "fixed": "string",
- "relative": {
- "unit": "Days",
- "value": 1
}
}, - "sync_folders": [
- "string"
], - "full_sync_interval_min": 0,
- "incremental_sync_interval_sec": 0,
- "known_folders": [
- "string"
], - "created_at": 0,
- "updated_at": 0
}
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "imap": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "smtp": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl",
- "auth": {
- "auth_type": "Password",
- "password": "string"
}, - "use_proxy": 0
}, - "enabled": true,
- "email": "string",
- "name": "string",
- "minimal_sync": true,
- "capabilities": [
- "string"
], - "dsn_capable": true,
- "date_since": {
- "fixed": "string",
- "relative": {
- "unit": "Days",
- "value": 1
}
}, - "sync_folders": [
- "string"
], - "full_sync_interval_min": 0,
- "incremental_sync_interval_sec": 0,
- "known_folders": [
- "string"
], - "created_at": 0,
- "updated_at": 0
}
], - "total_pages": 0
}
{- "account_id": 0,
- "last_full_sync_start": 0,
- "last_full_sync_end": 0,
- "last_incremental_sync_start": 0,
- "last_incremental_sync_end": 0,
- "errors": [
- {
- "error": "string",
- "at": 0
}
], - "is_initial_sync_completed": true,
- "initial_sync_folders": [
- "string"
], - "current_syncing_folder": "string",
- "current_batch_number": 0,
- "current_total_batches": 0,
- "initial_sync_start_time": 0,
- "initial_sync_end_time": 0
}
This endpoint provides a lightweight list of accounts containing only essential information (id and name). It's primarily designed for UI selectors/dropdowns when creating or associating resources with accounts.
[- {
- "id": 0,
- "email": "string"
}
]
{- "imap": {
- "host": "string",
- "port": 0,
- "encryption": "Ssl"
}, - "smtp": {
- "host": "string",
- "port": 0,
- "encryption": "Ssl"
}, - "oauth2": {
- "issuer": "string",
- "scope": [
- "string"
], - "auth_url": "string",
- "token_url": "string"
}
}
{- "id": 0,
- "account_id": 0,
- "email": "string",
- "description": "string",
- "created_at": 0,
- "updated_at": 0,
- "global": 0,
- "enabled": true,
- "hook_type": "Http",
- "http": {
- "target_url": "string",
- "http_method": "Post",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}, - "nats": {
- "host": "string",
- "port": 1,
- "auth_type": "None",
- "token": "string",
- "username": "string",
- "password": "string",
- "stream_name": "string",
- "namespace": "string"
}, - "vrl_script": "string",
- "call_count": 0,
- "success_count": 0,
- "failure_count": 0,
- "last_error": "string",
- "watched_events": [
- "EmailAddedToFolder"
], - "use_proxy": 0
}
Request Body
description | string Optional description providing additional context about the hook. |
enabled | boolean Indicates whether the hook is active and processing events upon creation. |
object (HttpConfig) Optional HTTP configuration for HTTP-based hook. | |
object (NatsConfig) Optional NATS configuration for NATS-based hook. | |
vrl_script | string Optional VRL (Vector Remap Language) script for customizing the hook payload. |
watched_events | Array of strings (EventType) Items Enum: "EmailAddedToFolder" "EmailFlagsChanged" "EmailSentSuccess" "EmailSendingError" "UIDValidityChange" "MailboxDeletion" "MailboxCreation" "AccountFirstSyncCompleted" "EmailBounce" "EmailFeedBackReport" "EmailOpened" "EmailLinkClicked" List of event types the hook is configured to monitor. |
use_proxy | integer <uint64> Indicates whether to use a SOCKS5 proxy for establishing the connection.
When set to |
{- "description": "string",
- "enabled": true,
- "http": {
- "target_url": "string",
- "http_method": "Post",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}, - "nats": {
- "host": "string",
- "port": 1,
- "auth_type": "None",
- "token": "string",
- "username": "string",
- "password": "string",
- "stream_name": "string",
- "namespace": "string"
}, - "vrl_script": "string",
- "watched_events": [
- "EmailAddedToFolder"
], - "use_proxy": 0
}
{- "message": "string",
- "code": 0
}
Request Body
account_id | integer <uint64> Unique identifier of the account associated with the hook. |
description | string Optional description providing additional context about the hook. |
enabled required | boolean Indicates whether the hook is active and processing events upon creation. |
hook_type required | string Enum: "Http" "Nats" The type of hook (e.g., HTTP or NATS). |
object (HttpConfig) Optional HTTP configuration for HTTP-based hook. | |
object (NatsConfig) Optional NATS configuration for NATS-based hook. | |
vrl_script | string Optional VRL (Vector Remap Language) script for customizing the hook payload. |
watched_events required | Array of strings (EventType) Items Enum: "EmailAddedToFolder" "EmailFlagsChanged" "EmailSentSuccess" "EmailSendingError" "UIDValidityChange" "MailboxDeletion" "MailboxCreation" "AccountFirstSyncCompleted" "EmailBounce" "EmailFeedBackReport" "EmailOpened" "EmailLinkClicked" List of event types the hook is configured to monitor. |
use_proxy | integer <uint64> Indicates whether to use a SOCKS5 proxy for establishing the connection.
When set to |
{- "account_id": 0,
- "description": "string",
- "enabled": true,
- "hook_type": "Http",
- "http": {
- "target_url": "string",
- "http_method": "Post",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}, - "nats": {
- "host": "string",
- "port": 1,
- "auth_type": "None",
- "token": "string",
- "username": "string",
- "password": "string",
- "stream_name": "string",
- "namespace": "string"
}, - "vrl_script": "string",
- "watched_events": [
- "EmailAddedToFolder"
], - "use_proxy": 0
}
{- "id": 0,
- "account_id": 0,
- "email": "string",
- "description": "string",
- "created_at": 0,
- "updated_at": 0,
- "global": 0,
- "enabled": true,
- "hook_type": "Http",
- "http": {
- "target_url": "string",
- "http_method": "Post",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}, - "nats": {
- "host": "string",
- "port": 1,
- "auth_type": "None",
- "token": "string",
- "username": "string",
- "password": "string",
- "stream_name": "string",
- "namespace": "string"
}, - "vrl_script": "string",
- "call_count": 0,
- "success_count": 0,
- "failure_count": 0,
- "last_error": "string",
- "watched_events": [
- "EmailAddedToFolder"
], - "use_proxy": 0
}
Requires root privileges.
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "account_id": 0,
- "email": "string",
- "description": "string",
- "created_at": 0,
- "updated_at": 0,
- "global": 0,
- "enabled": true,
- "hook_type": "Http",
- "http": {
- "target_url": "string",
- "http_method": "Post",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}, - "nats": {
- "host": "string",
- "port": 1,
- "auth_type": "None",
- "token": "string",
- "username": "string",
- "password": "string",
- "stream_name": "string",
- "namespace": "string"
}, - "vrl_script": "string",
- "call_count": 0,
- "success_count": 0,
- "failure_count": 0,
- "last_error": "string",
- "watched_events": [
- "EmailAddedToFolder"
], - "use_proxy": 0
}
], - "total_pages": 0
}
JSON body containing the script and input context.
program required | string The VRL script program to be tested. |
event | string Optional event data to be used as input for testing the VRL script. |
{- "program": "string",
- "event": "string"
}
{- "result": null,
- "error": "string"
}
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
status | string (TaskStatus) Enum: "Scheduled" "Running" "Success" "Failed" "Removed" "Stopped" Filter by task status (optional) |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "created_at": 0,
- "status": "Scheduled",
- "stopped_reason": "string",
- "error": "string",
- "last_duration_ms": 0,
- "retry_count": 0,
- "scheduled_at": 0,
- "account_id": 0,
- "account_email": "string",
- "event": null,
- "event_type": "EmailAddedToFolder"
}
], - "total_pages": 0
}
{- "id": 0,
- "created_at": 0,
- "status": "Scheduled",
- "stopped_reason": "string",
- "error": "string",
- "last_duration_ms": 0,
- "retry_count": 0,
- "scheduled_at": 0,
- "account_id": 0,
- "account_email": "string",
- "event": null,
- "event_type": "EmailAddedToFolder"
}
Initiates asynchronous removal of an event hook task by marking it for deletion. The task will be:
{- "message": "string",
- "code": 0
}
{- "id": "string",
- "issued_license_id": "string",
- "application_name": "string",
- "customer_name": "string",
- "created_at": 0,
- "license_type": "Trial",
- "expires_at": 0,
- "last_expires_at": 0,
- "license_content": "string",
- "max_accounts": 0
}
Requires root privileges.
Raw license key string (text/plain content-type)
{- "id": "string",
- "issued_license_id": "string",
- "application_name": "string",
- "customer_name": "string",
- "created_at": 0,
- "license_type": "Trial",
- "expires_at": 0,
- "last_expires_at": 0,
- "license_content": "string",
- "max_accounts": 0
}
This includes both local and optionally remote (e.g., IMAP) mailboxes.
remote | boolean If true, includes remote mailboxes from the server. |
[- {
- "id": 0,
- "account_id": 0,
- "name": "string",
- "delimiter": "string",
- "attributes": [
- {
- "attr": "NoInferiors",
- "extension": "string"
}
], - "flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "exists": 0,
- "unseen": 0,
- "permanent_flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "uid_next": 0,
- "uid_validity": 0,
- "highest_modseq": 0
}
]
This is not a synchronized list of mail folders, but rather the subscription list as maintained by the IMAP server. In the IMAP protocol, this list reflects which mailboxes the user has chosen to subscribe to on the server side.
[- {
- "id": 0,
- "account_id": 0,
- "name": "string",
- "delimiter": "string",
- "attributes": [
- {
- "attr": "NoInferiors",
- "extension": "string"
}
], - "flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "exists": 0,
- "unseen": 0,
- "permanent_flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "uid_next": 0,
- "uid_validity": 0,
- "highest_modseq": 0
}
]
This operation marks the mailbox as subscribed on the IMAP server side. It does not create or synchronize the mailbox, but only updates the server-maintained subscription list.
The name of the mailbox to subscribe to.
{- "message": "string",
- "code": 0
}
This operation removes the mailbox from the subscription list on the IMAP server. It does not delete the mailbox or stop synchronization, but only affects the server’s record of subscribed folders.
The name of the mailbox to unsubscribe from.
{- "message": "string",
- "code": 0
}
The rename payload including old and new mailbox names.
current_name required | string [ 1 .. 1024 ] characters The current name of the mailbox |
new_name required | string [ 1 .. 1024 ] characters The new name for the mailbox |
{- "current_name": "string",
- "new_name": "string"
}
{- "message": "string",
- "code": 0
}
specifying the source and destination mailboxes and messages
uids required | Array of integers <uint32> [ items <uint32 > ] A list of unique identifiers (UIDs) for the messages to be moved. |
current_mailbox required | string The name of the mailbox from which the messages will be moved. The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
target_mailbox required | string The name of the mailbox to which the messages will be moved. The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
{- "uids": [
- 0
], - "current_mailbox": "string",
- "target_mailbox": "string"
}
{- "message": "string",
- "code": 0
}
specifying the source and destination mailboxes and messages.
uids required | Array of integers <uint32> [ items <uint32 > ] A list of unique identifiers (UIDs) for the messages to be moved. |
current_mailbox required | string The name of the mailbox from which the messages will be moved. The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
target_mailbox required | string The name of the mailbox to which the messages will be moved. The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
{- "uids": [
- 0
], - "current_mailbox": "string",
- "target_mailbox": "string"
}
{- "message": "string",
- "code": 0
}
specifying the mailbox and messages to delete.
uids required | Array of integers <uint32> [ items <uint32 > ] A list of unique identifiers (UIDs) of the messages to be deleted. |
mailbox required | string The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
{- "uids": [
- 0
], - "mailbox": "string"
}
{- "message": "string",
- "code": 0
}
specifying the mailbox, messages, and flags to modify.
uids required | Array of integers <uint32> [ items <uint32 > ] A list of unique identifiers (UIDs) of the messages to be flagged or unflagged. |
mailbox required | string The name of the mailbox where the messages are located. The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
required | object (FlagAction) The action to be performed on the message flags. |
{- "uids": [
- 0
], - "mailbox": "string",
- "action": {
- "add": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "remove": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "overwrite": [
- {
- "flag": "Seen",
- "custom": "string"
}
]
}
}
{- "message": "string",
- "code": 0
}
mailbox required | string The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
remote | boolean fetches messages from the IMAP server; otherwise, uses local data. |
page required | integer <uint64> The page number for pagination (1-based). |
page_size required | integer <uint64> The number of messages per page. |
desc | boolean lists messages in descending order; otherwise, ascending. internal date |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "account_id": 0,
- "mailbox_id": 0,
- "mailbox_name": "string",
- "uid": 0,
- "internal_date": 0,
- "size": 0,
- "flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "flags_hash": 0,
- "bcc": [
- {
- "name": "string",
- "address": "string"
}
], - "cc": [
- {
- "name": "string",
- "address": "string"
}
], - "date": 0,
- "from": {
- "name": "string",
- "address": "string"
}, - "in_reply_to": "string",
- "sender": {
- "name": "string",
- "address": "string"
}, - "return_address": "string",
- "message_id": "string",
- "subject": "string",
- "thread_name": "string",
- "mime_version": "string",
- "references": [
- "string"
], - "reply_to": [
- {
- "name": "string",
- "address": "string"
}
], - "to": [
- {
- "name": "string",
- "address": "string"
}
], - "attachments": [
- {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
], - "body_meta": [
- {
- "id": "string",
- "part_type": "Plain",
- "path": {
- "segments": [
- 0
]
}, - "params": [
- {
- "key": "string",
- "value": "string"
}
], - "size": 0,
- "transfer_encoding": "None"
}
], - "received": {
- "from": "string",
- "by": "string",
- "with": "string",
- "date": 0
}
}
], - "total_pages": 0
}
specifying the mailbox and message to fetch.
mailbox required | string The name of the mailbox containing the message |
uid required | integer <uint32> The unique identifier of the message within the mailbox |
max_length | integer <uint64> Optional maximum length to retrieve for text parts (useful for large messages) |
required | Array of objects (EmailBodyPart) Specific email body parts to retrieve (e.g., TEXT, HTML) |
Array of objects (ImapAttachment) Optional list of attachments to include inline in the response |
{- "mailbox": "string",
- "uid": 0,
- "max_length": 0,
- "sections": [
- {
- "id": "string",
- "part_type": "Plain",
- "path": {
- "segments": [
- 0
]
}, - "params": [
- {
- "key": "string",
- "value": "string"
}
], - "size": 0,
- "transfer_encoding": "None"
}
], - "inline": [
- {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
]
}
{- "plain": {
- "content": "string",
- "truncated": true
}, - "html": "string"
}
specifying the mailbox, message, and attachment to fetch.
uid required | integer <uint32> The UID of the message containing the attachment. |
mailbox required | string The name of the mailbox where the message is located. |
required | object (ImapAttachment) The metadata describing the attachment to fetch. |
{- "uid": 0,
- "mailbox": "string",
- "attachment": {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
}
{- "message": "string",
- "code": 0
}
mailbox required | string The decoded, human-readable name of the mailbox containing the email (e.g., "INBOX"). This name is presented as it appears to users, with any encoding (e.g., UTF-7) automatically handled by the system, so no manual decoding is required. |
uid required | integer <uint32> The IMAP UID of the email to fetch. |
filename | string An optional filename for the attachment (defaults to a timestamped |
{- "message": "string",
- "code": 0
}
page required | integer <uint64> The page number for pagination (1-based). |
page_size required | integer <uint64> The number of messages per page. |
desc | boolean If |
specifying the search criteria (e.g., keywords, flags).
required | object The search criteria to apply (can be a simple condition or complex logical expression) |
mailbox required | string The name of the mailbox to search in |
{- "search": {
- "type": "Condition",
- "condition": "All",
- "value": "string"
}, - "mailbox": "string"
}
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "account_id": 0,
- "mailbox_id": 0,
- "mailbox_name": "string",
- "uid": 0,
- "internal_date": 0,
- "size": 0,
- "flags": [
- {
- "flag": "Seen",
- "custom": "string"
}
], - "flags_hash": 0,
- "bcc": [
- {
- "name": "string",
- "address": "string"
}
], - "cc": [
- {
- "name": "string",
- "address": "string"
}
], - "date": 0,
- "from": {
- "name": "string",
- "address": "string"
}, - "in_reply_to": "string",
- "sender": {
- "name": "string",
- "address": "string"
}, - "return_address": "string",
- "message_id": "string",
- "subject": "string",
- "thread_name": "string",
- "mime_version": "string",
- "references": [
- "string"
], - "reply_to": [
- {
- "name": "string",
- "address": "string"
}
], - "to": [
- {
- "name": "string",
- "address": "string"
}
], - "attachments": [
- {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
], - "body_meta": [
- {
- "id": "string",
- "part_type": "Plain",
- "path": {
- "segments": [
- 0
]
}, - "params": [
- {
- "key": "string",
- "value": "string"
}
], - "size": 0,
- "transfer_encoding": "None"
}
], - "received": {
- "from": "string",
- "by": "string",
- "with": "string",
- "date": 0
}
}
], - "total_pages": 0
}
{- "id": 0,
- "description": "string",
- "credentials": {
- "username": "string",
- "password": "string"
}, - "server": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl"
}, - "created_at": 0,
- "dsn_capable": true,
- "updated_at": 0,
- "last_access_at": 0,
- "use_proxy": 0
}
Requires root privileges.
The MTA update request payload.
description | string Optional descriptive text about the MTA. |
object (MTACredentials) Optional updated credentials. | |
object (SmtpServerConfig) Optional updated SMTP server configuration. | |
dsn_capable | boolean Optional updated DSN support flag. |
use_proxy | integer <uint64> Indicates whether to use a SOCKS5 proxy for establishing the connection.
When set to |
{- "description": "string",
- "credentials": {
- "username": "string",
- "password": "string"
}, - "server": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl"
}, - "dsn_capable": true,
- "use_proxy": 0
}
{- "message": "string",
- "code": 0
}
Requires root privileges.
The MTA creation request payload.
description | string Optional descriptive text about the MTA. |
required | object (MTACredentials) Credentials used for authenticating with the MTA server. |
required | object (SmtpServerConfig) SMTP server configuration details. |
dsn_capable required | boolean Whether the MTA supports DSN (Delivery Status Notification). |
use_proxy | integer <uint64> Indicates whether to use a SOCKS5 proxy for establishing the connection.
When set to |
{- "description": "string",
- "credentials": {
- "username": "string",
- "password": "string"
}, - "server": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl"
}, - "dsn_capable": true,
- "use_proxy": 0
}
{- "message": "string",
- "code": 0
}
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "description": "string",
- "credentials": {
- "username": "string",
- "password": "string"
}, - "server": {
- "host": "string",
- "port": 1,
- "encryption": "Ssl"
}, - "created_at": 0,
- "dsn_capable": true,
- "updated_at": 0,
- "last_access_at": 0,
- "use_proxy": 0
}
], - "total_pages": 0
}
request payload.
from required | string The email address of the sender (e.g., "no-reply@yourdomain.com"). |
to required | string The email address of a single recipient (e.g., "user@example.com"). |
subject required | string [ 1 .. 256 ] characters The subject line of the email. |
message required | string [ 1 .. 1024 ] characters The plain text body content of the email, sent as the text/plain part of the email. |
{- "from": "string",
- "to": "string",
- "subject": "string",
- "message": "string"
}
{- "message": "string",
- "code": 0
}
Requires root privileges. This endpoint fetches the OAuth2 configuration identified by the given name.
{- "id": 0,
- "description": "string",
- "client_id": "string",
- "client_secret": "string",
- "auth_url": "string",
- "token_url": "string",
- "redirect_uri": "string",
- "scopes": [
- "string"
], - "extra_params": {
- "property1": "string",
- "property2": "string"
}, - "enabled": true,
- "use_proxy": 0,
- "created_at": 0,
- "updated_at": 0
}
Requires root privileges. This endpoint updates the OAuth2 configuration identified by the specified name
A JSON payload containing the updated configuration details
description | string A description of what this configuration is used for. |
client_id | string The client ID used for authenticating the application with the OAuth2 provider. |
client_secret | string The client secret used in conjunction with the client ID. |
auth_url | string The URL to redirect users to for OAuth2 authorization. |
token_url | string The URL to exchange authorization codes for access tokens. |
redirect_uri | string The URI where the OAuth2 provider will redirect to after authorization. |
scopes | Array of strings The scopes of access that are being requested (e.g., email, profile). |
object Any additional parameters to include in the OAuth2 requests (e.g., access_type, prompt). | |
enabled | boolean Indicates whether this configuration is enabled or disabled. |
use_proxy | integer <uint64> route OAuth through proxy (when direct access is blocked) |
{- "description": "string",
- "client_id": "string",
- "client_secret": "string",
- "auth_url": "string",
- "token_url": "string",
- "redirect_uri": "string",
- "scopes": [
- "string"
], - "extra_params": {
- "property1": "string",
- "property2": "string"
}, - "enabled": true,
- "use_proxy": 0
}
{- "message": "string",
- "code": 0
}
Requires root privileges. This endpoint creates a new OAuth2 configuration based on the provided request data.
A JSON payload containing the details for the new OAuth2 configuration
description | string A description of what this configuration is used for. |
client_id required | string The client ID used for authenticating the application with the OAuth2 provider. |
client_secret required | string The client secret used in conjunction with the client ID. |
auth_url required | string The URL to redirect users to for OAuth2 authorization. |
token_url required | string The URL to exchange authorization codes for access tokens. |
redirect_uri required | string The URI where the OAuth2 provider will redirect to after authorization. |
scopes | Array of strings The scopes of access that are being requested (e.g., email, profile). |
object Any additional parameters to include in the OAuth2 requests (e.g., access_type, prompt). | |
enabled required | boolean Indicates whether this configuration is enabled or disabled. |
use_proxy | integer <uint64> route OAuth through proxy (when direct access is blocked) |
{- "description": "string",
- "client_id": "string",
- "client_secret": "string",
- "auth_url": "string",
- "token_url": "string",
- "redirect_uri": "string",
- "scopes": [
- "string"
], - "extra_params": {
- "property1": "string",
- "property2": "string"
}, - "enabled": true,
- "use_proxy": 0
}
{- "message": "string",
- "code": 0
}
This endpoint retrieves a paginated list of OAuth2 configurations, allowing for optional pagination and sorting parameters. It requires root access.
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "description": "string",
- "client_id": "string",
- "client_secret": "string",
- "auth_url": "string",
- "token_url": "string",
- "redirect_uri": "string",
- "scopes": [
- "string"
], - "extra_params": {
- "property1": "string",
- "property2": "string"
}, - "enabled": true,
- "use_proxy": 0,
- "created_at": 0,
- "updated_at": 0
}
], - "total_pages": 0
}
This endpoint fetches the OAuth2 access tokens associated with the given account ID.
{- "account_id": 0,
- "oauth2_id": 0,
- "access_token": "string",
- "refresh_token": "string",
- "created_at": 0,
- "updated_at": 0
}
This endpoint constructs and sends a new email based on the provided request data.
A JSON payload containing the details of the email to be sent
object (EmailAddress) The sender's email address. If not provided, a default sender address may be used based on the account configuration. | |
required | Array of objects (Recipient) The list of recipients for the email. This field is required and must contain at least one recipient. Each recipient in the list will be handled as a separate send task (e.g., To, Cc, or Bcc). |
subject | string The subject line of the email. This field is optional and may be omitted for emails without a subject. |
text | string The plain text body of the email. This field is optional and can be used for emails that support plain text content. |
html | string The HTML body of the email. This field is optional and can be used for emails that support HTML content. |
preview | string A preview text for the email. This optional field provides a short summary or preview of the email content, often displayed in email clients. |
eml | string The raw EML content of the email. This optional field allows specifying the email content in EML format, overriding other content fields if provided. |
template_id | integer <uint64> The name of a template to use for rendering the email. This optional field specifies a predefined email template to generate the email content. |
Array of objects (MailAttachment) A list of attachments to include in the email. This optional field allows adding file attachments to the email. | |
object Custom email headers to include in the email. This optional field allows specifying additional headers (e.g., Reply-To, X-Custom-Header) as key-value pairs. | |
required | object (SendControl) Configuration options for controlling the email sending process. This required field specifies settings such as scheduling, or retry policies for sending the email. |
{- "from": {
- "name": "string",
- "address": "string"
}, - "recipients": [
- {
- "to": [
- {
- "name": "string",
- "address": "string"
}
], - "cc": [
- {
- "name": "string",
- "address": "string"
}
], - "bcc": [
- {
- "name": "string",
- "address": "string"
}
], - "reply_to": [
- {
- "name": "string",
- "address": "string"
}
], - "template_params": null,
- "send_at": 0
}
], - "subject": "string",
- "text": "string",
- "html": "string",
- "preview": "string",
- "eml": "string",
- "template_id": 0,
- "attachments": [
- {
- "file_name": "string",
- "payload": {
- "base64_content": "string",
- "attachment_ref": {
- "mailbox_name": "string",
- "uid": 0,
- "attachment_data": {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
}
}, - "mime_type": "string",
- "inline": true,
- "content_id": "string"
}
], - "headers": {
- "property1": {
- "type": "Raw",
- "raw": "string"
}, - "property2": {
- "type": "Raw",
- "raw": "string"
}
}, - "send_control": {
- "envelope": {
- "from": "string",
- "recipients": [
- "string"
]
}, - "save_to_sent": true,
- "sent_folder": "string",
- "dry_run": true,
- "send_at": 0,
- "retry_policy": {
- "strategy": "Linear",
- "seconds": 0,
- "max_retries": 0
}, - "mta": 0,
- "dsn": {
- "ret": "Full",
- "envid": "string",
- "notify": [
- "Success"
], - "orcpt": "string"
}, - "campaign_id": "string",
- "enable_tracking": true
}
}
{- "message": "string",
- "code": 0
}
This endpoint constructs and sends a reply to an email based on the provided request data.
A JSON payload containing the details of the email reply
mailbox_name required | string The name of the mailbox containing the original message. This is used to locate the source message that is being replied to. |
uid required | integer <uint32> The UID of the message being replied to. This identifies the specific message in the mailbox. |
text | string The plain text body of the reply email. This field is optional and can be used to provide plain text content. |
html | string The HTML body of the reply email. This field is optional and can be used to provide HTML content. |
preview | string A preview text for the reply email. This optional field provides a short summary or preview of the reply content. |
object Custom email headers to include in the reply email. This optional field allows specifying additional headers as key-value pairs. | |
reply_all required | boolean Whether to reply to all original recipients (Reply-All). If true, the reply will be sent to all original recipients, including Cc. |
Array of objects (MailAttachment) A list of attachments to include in the reply. This optional field allows adding new file attachments to the reply email. | |
Array of objects (EmailAddress) A list of Cc recipients to include in the reply. This optional field allows explicitly specifying Cc recipients. | |
Array of objects (EmailAddress) A list of Bcc recipients to include in the reply. This optional field allows explicitly specifying Bcc recipients. | |
include_original required | boolean The sender's timezone (e.g., "Asia/Shanghai"). This optional field may be used for formatting date/time in the reply body. Whether to include the original message in the reply body. If true, the original message content will be quoted and included in the reply. |
include_all_attachments required | boolean Whether to include all original attachments in the reply. If true, all attachments from the original message will be included in the reply. |
timezone | string The sender's timezone (e.g., "Asia/Shanghai"). This optional field may be used for formatting date/time in the reply body. |
required | object (SendControl) Configuration options for controlling the email sending process. This required field specifies settings such as scheduling, or retry policies for sending the reply. |
{- "mailbox_name": "string",
- "uid": 0,
- "text": "string",
- "html": "string",
- "preview": "string",
- "headers": {
- "property1": {
- "type": "Raw",
- "raw": "string"
}, - "property2": {
- "type": "Raw",
- "raw": "string"
}
}, - "reply_all": true,
- "attachments": [
- {
- "file_name": "string",
- "payload": {
- "base64_content": "string",
- "attachment_ref": {
- "mailbox_name": "string",
- "uid": 0,
- "attachment_data": {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
}
}, - "mime_type": "string",
- "inline": true,
- "content_id": "string"
}
], - "cc": [
- {
- "name": "string",
- "address": "string"
}
], - "bcc": [
- {
- "name": "string",
- "address": "string"
}
], - "include_original": true,
- "include_all_attachments": true,
- "timezone": "string",
- "send_control": {
- "envelope": {
- "from": "string",
- "recipients": [
- "string"
]
}, - "save_to_sent": true,
- "sent_folder": "string",
- "dry_run": true,
- "send_at": 0,
- "retry_policy": {
- "strategy": "Linear",
- "seconds": 0,
- "max_retries": 0
}, - "mta": 0,
- "dsn": {
- "ret": "Full",
- "envid": "string",
- "notify": [
- "Success"
], - "orcpt": "string"
}, - "campaign_id": "string",
- "enable_tracking": true
}
}
{- "message": "string",
- "code": 0
}
This endpoint constructs and sends a forwarded email based on the provided request data.
A JSON payload containing the details of the email to be forwarded.
mailbox_name required | string The name of the mailbox containing the original message. This is used to locate the source message that is being forwarded. |
uid required | integer <uint32> The UID of the message being forwarded. This identifies the specific message in the mailbox. |
required | Array of objects (EmailAddress) The list of primary recipients to forward the email to. At least one recipient must be specified. |
Array of objects (EmailAddress) A list of Cc recipients to include in the forwarded email. This optional field allows explicitly specifying Cc recipients. | |
Array of objects (EmailAddress) A list of Bcc recipients to include in the forwarded email. This optional field allows explicitly specifying Bcc recipients. | |
text | string The plain text body of the forwarded email. This field is optional and can be used to provide additional comments or content. |
html | string The HTML body of the forwarded email. This field is optional and can be used to provide HTML-formatted content. |
preview | string A preview text for the forwarded email. This optional field provides a short summary or preview of the email content. |
object Custom email headers to include in the forwarded email. This optional field allows specifying additional headers as key-value pairs. | |
timezone | string The sender's timezone (e.g., "Asia/Shanghai"). This optional field may be used for formatting date/time in the forwarded content. |
Array of objects (MailAttachment) A list of new attachments to include in the forwarded email. This optional field allows adding additional attachments beyond the original ones. | |
include_original required | boolean Whether to include the original message in the forwarded email body. If true, the full original message content will be included in the body. |
include_all_attachments required | boolean Whether to include all original attachments in the forwarded email. If true, all attachments from the original message will be forwarded as well. |
required | object (SendControl) Configuration options for controlling the email sending process. This required field specifies settings such as scheduling or retry policies for sending the forwarded email. |
{- "mailbox_name": "string",
- "uid": 0,
- "to": [
- {
- "name": "string",
- "address": "string"
}
], - "cc": [
- {
- "name": "string",
- "address": "string"
}
], - "bcc": [
- {
- "name": "string",
- "address": "string"
}
], - "text": "string",
- "html": "string",
- "preview": "string",
- "headers": {
- "property1": {
- "type": "Raw",
- "raw": "string"
}, - "property2": {
- "type": "Raw",
- "raw": "string"
}
}, - "timezone": "string",
- "attachments": [
- {
- "file_name": "string",
- "payload": {
- "base64_content": "string",
- "attachment_ref": {
- "mailbox_name": "string",
- "uid": 0,
- "attachment_data": {
- "id": "string",
- "path": {
- "segments": [
- 0
]
}, - "filename": "string",
- "inline": true,
- "content_id": "string",
- "size": 0,
- "file_type": "string",
- "transfer_encoding": "None"
}
}
}, - "mime_type": "string",
- "inline": true,
- "content_id": "string"
}
], - "include_original": true,
- "include_all_attachments": true,
- "send_control": {
- "envelope": {
- "from": "string",
- "recipients": [
- "string"
]
}, - "save_to_sent": true,
- "sent_folder": "string",
- "dry_run": true,
- "send_at": 0,
- "retry_policy": {
- "strategy": "Linear",
- "seconds": 0,
- "max_retries": 0
}, - "mta": 0,
- "dsn": {
- "ret": "Full",
- "envid": "string",
- "notify": [
- "Success"
], - "orcpt": "string"
}, - "campaign_id": "string",
- "enable_tracking": true
}
}
{- "message": "string",
- "code": 0
}
This endpoint retrieves a paginated list of email tasks, filtered by accessible accounts and optionally by task status. It supports sorting in ascending or descending order by creation time.
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
status | string (TaskStatus) Enum: "Scheduled" "Running" "Success" "Failed" "Removed" "Stopped" Represents the status of a task in the system. This enum defines the lifecycle states that a task can be in, from initial scheduling to completion or removal. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "created_at": 0,
- "status": "Scheduled",
- "stopped_reason": "string",
- "error": "string",
- "last_duration_ms": 0,
- "retry_count": 0,
- "scheduled_at": 0,
- "account_id": 0,
- "account_email": "string",
- "subject": "string",
- "message_id": "string",
- "from": "string",
- "to": [
- "string"
], - "cc": [
- "string"
], - "bcc": [
- "string"
], - "attachment_count": 0,
- "cache_key": "string",
- "envelope": {
- "from": "string",
- "recipients": [
- "string"
]
}, - "save_to_sent": true,
- "sent_folder": "string",
- "send_at": 0,
- "mta": 0,
- "dsn": {
- "ret": "Full",
- "envid": "string",
- "notify": [
- "Success"
], - "orcpt": "string"
}, - "reply": true,
- "mailbox": "string",
- "uid": 0
}
], - "total_pages": 0
}
This endpoint fetches the details of an email task identified by the provided ID.
{- "id": 0,
- "created_at": 0,
- "status": "Scheduled",
- "stopped_reason": "string",
- "error": "string",
- "last_duration_ms": 0,
- "retry_count": 0,
- "scheduled_at": 0,
- "account_id": 0,
- "account_email": "string",
- "subject": "string",
- "message_id": "string",
- "from": "string",
- "to": [
- "string"
], - "cc": [
- "string"
], - "bcc": [
- "string"
], - "attachment_count": 0,
- "cache_key": "string",
- "envelope": {
- "from": "string",
- "recipients": [
- "string"
]
}, - "save_to_sent": true,
- "sent_folder": "string",
- "send_at": 0,
- "mta": 0,
- "dsn": {
- "ret": "Full",
- "envid": "string",
- "notify": [
- "Success"
], - "orcpt": "string"
}, - "reply": true,
- "mailbox": "string",
- "uid": 0
}
Initiates asynchronous removal of an email task by marking it for deletion. The task will be:
{- "message": "string",
- "code": 0
}
This endpoint returns a consolidated view of all critical system notifications including:
{- "release": {
- "latest": {
- "tag_name": "string",
- "published_at": "string",
- "body": "string",
- "html_url": "string"
}, - "is_newer": true,
- "error_message": "string"
}, - "license": {
- "expired": true,
- "days": 0
}
}
This endpoint returns a consolidated view of all key metrics including:
{- "pending_email_task_num": 0,
- "pending_hook_task_num": 0,
- "account_num": 0,
- "uptime": 0,
- "rustmailer_version": "string",
- "time_series": {
- "imap_traffic_sent": [
- {
- "timestamp": 0,
- "value": 0
}
], - "imap_traffic_received": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_sent_success": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_sent_failure": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_sent_bytes": [
- {
- "timestamp": 0,
- "value": 0
}
], - "new_email_arrival": [
- {
- "timestamp": 0,
- "value": 0
}
], - "mail_flag_change": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_opens": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_clicks": [
- {
- "timestamp": 0,
- "value": 0
}
], - "event_dispatch_success_http": [
- {
- "timestamp": 0,
- "value": 0
}
], - "event_dispatch_success_nats": [
- {
- "timestamp": 0,
- "value": 0
}
], - "event_dispatch_failure_http": [
- {
- "timestamp": 0,
- "value": 0
}
], - "event_dispatch_failure_nats": [
- {
- "timestamp": 0,
- "value": 0
}
], - "email_task_queue_length": [
- {
- "timestamp": 0,
- "value": 0
}
], - "hook_task_queue_length": [
- {
- "timestamp": 0,
- "value": 0
}
]
}
}
Returns the template if found, or a ResourceNotFound
error if no template matches the provided name.
{- "id": 0,
- "description": "string",
- "account": {
- "id": 0,
- "email": "string"
}, - "subject": "string",
- "preview": "string",
- "format": "Markdown",
- "text": "string",
- "html": "string",
- "created_at": 0,
- "updated_at": 0,
- "last_access_at": 0
}
Modifies the specified template with the provided update data if it exists and the client has access. Returns a ResourceNotFound
error if the template is not found.
JSON payload containing the updated template data.
description | string <= 1024 characters A brief description of the email template (optional). Maximum length is 1024 characters. |
subject | string <= 20480 characters The subject line of the email (optional). Maximum length is 20,480 characters. |
preview | string <= 256 characters Preview text for the email (optional), displayed in email clients. Maximum length is 256 characters. |
text | string <= 8388608 characters The plain text content of the email template (optional). Maximum length is 8,388,608 characters (approximately 8MB). |
html | string <= 8388608 characters The HTML content of the email template (optional). Maximum length is 8,388,608 characters (approximately 8MB). |
format | string Enum: "Markdown" "Html" Format of the HTML email content, either Markdown or HTML. Defaults to HTML if not specified. |
{- "description": "string",
- "subject": "string",
- "preview": "string",
- "text": "string",
- "html": "string",
- "format": "Markdown"
}
{- "message": "string",
- "code": 0
}
Saves a new email template based on the provided request data.
JSON payload containing the data needed to create a new email template
description | string <= 1024 characters A brief description of the email template (optional). Maximum length is 1024 characters. |
account_id | integer <uint64> The associated account information that created or uses this template (optional). |
subject required | string <= 20480 characters The subject line of the email. Maximum length is 20,480 characters. |
preview | string <= 256 characters Preview text for the email (optional), displayed in email clients. Maximum length is 256 characters. |
text | string <= 8388608 characters The plain text content of the email template (optional). Maximum length is 8,388,608 characters (approximately 8MB). |
html | string <= 8388608 characters The HTML content of the email template (optional). Maximum length is 8,388,608 characters (approximately 8MB). |
format | string Enum: "Markdown" "Html" Format of the HTML email content, either Markdown or HTML. Defaults to HTML if not specified. |
{- "description": "string",
- "account_id": 0,
- "subject": "string",
- "preview": "string",
- "text": "string",
- "html": "string",
- "format": "Markdown"
}
{- "message": "string",
- "code": 0
}
Retrieves a paginated list of all email templates. Requires root privileges.
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "description": "string",
- "account": {
- "id": 0,
- "email": "string"
}, - "subject": "string",
- "preview": "string",
- "format": "Markdown",
- "text": "string",
- "html": "string",
- "created_at": 0,
- "updated_at": 0,
- "last_access_at": 0
}
], - "total_pages": 0
}
Retrieves a paginated list of templates for the specified account ID. Requires access to the specified account.
page | integer <uint64> Optional. The page number to retrieve (starting from 1). |
page_size | integer <uint64> Optional. The number of items per page. |
desc | boolean Optional. Whether to sort the list in descending order. |
{- "current_page": 0,
- "page_size": 0,
- "total_items": 0,
- "items": [
- {
- "id": 0,
- "description": "string",
- "account": {
- "id": 0,
- "email": "string"
}, - "subject": "string",
- "preview": "string",
- "format": "Markdown",
- "text": "string",
- "html": "string",
- "created_at": 0,
- "updated_at": 0,
- "last_access_at": 0
}
], - "total_pages": 0
}
This endpoint allows sending a test email to verify template rendering and delivery.
request payload.
account_id required | integer <uint64> Account ID associated with the template and sending request |
recipient required | string Email address of the recipient who will receive the test email Must be a valid email address format (e.g., user@example.com) |
template_params | any Optional parameters to be used for template variable substitution When provided, should be a valid JSON object that matches the template's expected variables. Example: {"name": "John Doe", "order_id": 12345} |
{- "account_id": 0,
- "recipient": "string",
- "template_params": null
}
{- "message": "string",
- "code": 0
}