RustMailerApi (1.0.0)

Download OpenAPI specification:

Empower Your Apps with RustMailer's Blazing-Fast REST & gRPC Email APIs

AccessToken

Lists all access tokens in the system.

Requires root privileges.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

Lists access tokens for a specific account.

Requires root privileges.

path Parameters
account_id
required
integer <uint64>

The ID of the account whose tokens are to be retrieved.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

Deletes a specific access token.

Requires root privileges.

path Parameters
token
required
string

The access token to be deleted

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Updates an existing access token.

Requires root privileges.

path Parameters
token
required
string

The access token to be updated.

Request Body schema: application/json; charset=utf-8
required

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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "accounts": [
    ],
  • "description": "string",
  • "access_scopes": [
    ],
  • "acl": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Creates a new access token.

Requires root privileges.

Request Body schema: application/json; charset=utf-8
required

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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "accounts": [
    ],
  • "description": "string",
  • "access_scopes": [
    ],
  • "acl": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Regenerates the root access token.

Requires root privileges.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Authenticates a user with root credentials.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Account

Get account details by account ID

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "imap": {
    },
  • "smtp": {
    },
  • "enabled": true,
  • "email": "string",
  • "name": "string",
  • "minimal_sync": true,
  • "capabilities": [
    ],
  • "dsn_capable": true,
  • "date_since": {
    },
  • "sync_folders": [
    ],
  • "full_sync_interval_min": 0,
  • "incremental_sync_interval_sec": 0,
  • "known_folders": [
    ],
  • "created_at": 0,
  • "updated_at": 0
}

Delete an account by ID - WARNING: This permanently removes the account and all associated resources

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Update an existing account

Request Body schema: application/json; charset=utf-8
required

Account update request payload

enabled
boolean

Represents the account activation status.

If this value is false, all account-related resources will be unavailable and any attempts to access them should return an error indicating the account is inactive.

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:

  • Messages after specified starting point
  • Or within sliding window

Use Cases

  • Event-driven systems (only sync recent actionable emails)
  • First-time sync optimization for large accounts
  • Reducing server load during resyncs
sync_folders
Array of strings

Configuration for selective folder synchronization

Defaults to standard folders (INBOX, Sent) if empty. Modified folders will be automatically synced on next update.

full_sync_interval_min
integer <int64> [ 10 .. 10080 ]

Full sync interval (minutes)

incremental_sync_interval_sec
integer <int64> [ 10 .. 3600 ]

Incremental sync interval (seconds)

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "enabled": true,
  • "name": "string",
  • "imap": {
    },
  • "smtp": {
    },
  • "date_since": {
    },
  • "sync_folders": [
    ],
  • "full_sync_interval_min": 10,
  • "incremental_sync_interval_sec": 10
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Create a new account

Request Body schema: application/json; charset=utf-8
required

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 false, all account-related resources will be unavailable and any attempts to access them should return an error indicating the account is inactive.

object (DateSince)

Controls initial synchronization time range

When dealing with large mailboxes, this restricts scanning to:

  • Messages after specified starting point
  • Or within sliding window

Use Cases

  • Event-driven systems (only sync recent actionable emails)
  • First-time sync optimization for large accounts
  • Reducing server load during resyncs
minimal_sync
required
boolean

Minimal sync mode flag

When enabled (true), only the most essential metadata will be synchronized: Recommended for:

  • Extremely resource-constrained environments
  • Accounts where only new message notification is needed
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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "email": "string",
  • "name": "string",
  • "imap": {
    },
  • "smtp": {
    },
  • "enabled": true,
  • "date_since": {
    },
  • "minimal_sync": true,
  • "full_sync_interval_min": 10,
  • "incremental_sync_interval_sec": 10
}

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "imap": {
    },
  • "smtp": {
    },
  • "enabled": true,
  • "email": "string",
  • "name": "string",
  • "minimal_sync": true,
  • "capabilities": [
    ],
  • "dsn_capable": true,
  • "date_since": {
    },
  • "sync_folders": [
    ],
  • "full_sync_interval_min": 0,
  • "incremental_sync_interval_sec": 0,
  • "known_folders": [
    ],
  • "created_at": 0,
  • "updated_at": 0
}

List accounts with optional pagination parameters

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Get the running state of an account

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "account_id": 0,
  • "last_full_sync_start": 0,
  • "last_full_sync_end": 0,
  • "last_incremental_sync_start": 0,
  • "last_incremental_sync_end": 0,
  • "errors": [
    ],
  • "is_initial_sync_completed": true,
  • "initial_sync_folders": [
    ],
  • "current_syncing_folder": "string",
  • "current_batch_number": 0,
  • "current_total_batches": 0,
  • "initial_sync_start_time": 0,
  • "initial_sync_end_time": 0
}

Get a minimal list of active accounts for use in selectors when creating account-related resources

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.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

AutoConfig

Retrieve mail server configuration for a given email address

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "imap": {
    },
  • "smtp": {
    },
  • "oauth2": {
    }
}

Hook

Retrieve an event hook configuration

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "account_id": 0,
  • "email": "string",
  • "description": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "global": 0,
  • "enabled": true,
  • "hook_type": "Http",
  • "http": {
    },
  • "nats": {
    },
  • "vrl_script": "string",
  • "call_count": 0,
  • "success_count": 0,
  • "failure_count": 0,
  • "last_error": "string",
  • "watched_events": [
    ],
  • "use_proxy": 0
}

Delete an event hook configuration

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Update an event hook

Request Body schema: application/json; charset=utf-8
required

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 true, the client will attempt to connect to the hook target via the configured proxy address.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "enabled": true,
  • "http": {
    },
  • "nats": {
    },
  • "vrl_script": "string",
  • "watched_events": [
    ],
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Create a new event hook

Request Body schema: application/json; charset=utf-8
required

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 true, the client will attempt to connect to the hook target via the configured proxy address.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "account_id": 0,
  • "description": "string",
  • "enabled": true,
  • "hook_type": "Http",
  • "http": {
    },
  • "nats": {
    },
  • "vrl_script": "string",
  • "watched_events": [
    ],
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "account_id": 0,
  • "email": "string",
  • "description": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "global": 0,
  • "enabled": true,
  • "hook_type": "Http",
  • "http": {
    },
  • "nats": {
    },
  • "vrl_script": "string",
  • "call_count": 0,
  • "success_count": 0,
  • "failure_count": 0,
  • "last_error": "string",
  • "watched_events": [
    ],
  • "use_proxy": 0
}

List event hooks (root)

Requires root privileges.

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Get event examples

Responses

Response samples

Content type
application/json; charset=utf-8
null

Test and debug VRL transformation scripts

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "program": "string",
  • "event": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "result": null,
  • "error": "string"
}

List hook tasks

query Parameters
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)

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Get hook task details

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "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"
}

Mark a hook task for deletion from queue

Initiates asynchronous removal of an event hook task by marking it for deletion. The task will be:

  1. Immediately marked as "cancelled" in the system
  2. Prevented from any further execution attempts
  3. Physically removed by background cleanup processes

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

License

Retrieve current license information

Requires root privileges.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "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
}

Upload and activate a new license

Requires root privileges.

Request Body schema: text/plain; charset=utf-8
required

Raw license key string (text/plain content-type)

string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "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
}

Mailbox

Returns all available mailboxes for the given account.

This includes both local and optionally remote (e.g., IMAP) mailboxes.

query Parameters
remote
boolean

If true, includes remote mailboxes from the server.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

Returns a list of mailboxes that the user is currently subscribed to.

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.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

Subscribes to a mailbox with the specified name.

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.

Request Body schema: text/plain; charset=utf-8
required

The name of the mailbox to subscribe to.

string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Unsubscribes from a mailbox with the specified name.

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.

Request Body schema: text/plain; charset=utf-8
required

The name of the mailbox to unsubscribe from.

string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Creates a new mailbox for a given account.

Request Body schema: text/plain; charset=utf-8
required

The name of the mailbox to create.

string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Deletes an existing mailbox from the specified account.

Request Body schema: text/plain; charset=utf-8
required

The name of the mailbox to delete.

string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Renames an existing mailbox under the specified account.

Request Body schema: application/json; charset=utf-8
required

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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "current_name": "string",
  • "new_name": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Message

Moves messages from one mailbox to another for the specified account.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "uids": [
    ],
  • "current_mailbox": "string",
  • "target_mailbox": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Copies messages from one mailbox to another for the specified account.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "uids": [
    ],
  • "current_mailbox": "string",
  • "target_mailbox": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Deletes messages from a mailbox or moves them to the trash for the specified account.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "uids": [
    ],
  • "mailbox": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Updates flags on messages in a mailbox for the specified account.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "uids": [
    ],
  • "mailbox": "string",
  • "action": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Lists messages in a specified mailbox for the given account.

query Parameters
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

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Fetches the content of a specific email for the given account.

Request Body schema: application/json; charset=utf-8
required

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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "mailbox": "string",
  • "uid": 0,
  • "max_length": 0,
  • "sections": [
    ],
  • "inline": [
    ]
}

Response samples

Content type
application/json; charset=utf-8
{
  • "plain": {
    },
  • "html": "string"
}

Fetches an attachment from a specific email for the given account.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "uid": 0,
  • "mailbox": "string",
  • "attachment": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Fetches the full content of a specific email for the given account.

query Parameters
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 .elm file).

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Searches for messages in mailboxes for the specified account. performs the search on the IMAP server;

query Parameters
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 true, lists results in descending order; otherwise, ascending.

Request Body schema: application/json; charset=utf-8
required

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

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "search": {
    },
  • "mailbox": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Mta

Retrieves the MTA (Mail Transfer Agent) configuration by its unique name.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "description": "string",
  • "credentials": {
    },
  • "server": {
    },
  • "created_at": 0,
  • "dsn_capable": true,
  • "updated_at": 0,
  • "last_access_at": 0,
  • "use_proxy": 0
}

Deletes an existing MTA configuration identified by its name.

Requires root privileges.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Updates an existing MTA configuration by its name.

Requires root privileges.

Request Body schema: application/json; charset=utf-8
required

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 true, the client will attempt to connect to the MTA server via the configured proxy address.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "credentials": {
    },
  • "server": {
    },
  • "dsn_capable": true,
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Creates a new MTA configuration.

Requires root privileges.

Request Body schema: application/json; charset=utf-8
required

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 true, the client will attempt to connect to the MTA server via the configured proxy address.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "credentials": {
    },
  • "server": {
    },
  • "dsn_capable": true,
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Retrieves a list of all MTA

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Sends a test email using the specified Mail Transfer Agent (MTA).

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "from": "string",
  • "to": "string",
  • "subject": "string",
  • "message": "string"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

OAuth2

Retrieves the OAuth2 configuration for a specified name.

Requires root privileges. This endpoint fetches the OAuth2 configuration identified by the given name.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "description": "string",
  • "client_id": "string",
  • "client_secret": "string",
  • "auth_url": "string",
  • "token_url": "string",
  • "redirect_uri": "string",
  • "scopes": [
    ],
  • "extra_params": {
    },
  • "enabled": true,
  • "use_proxy": 0,
  • "created_at": 0,
  • "updated_at": 0
}

Deletes an OAuth2 configuration by name.

Requires root privileges. This endpoint removes the OAuth2 configuration identified by the specified name.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Updates an existing OAuth2 configuration.

Requires root privileges. This endpoint updates the OAuth2 configuration identified by the specified name

Request Body schema: application/json; charset=utf-8
required

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)

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "client_id": "string",
  • "client_secret": "string",
  • "auth_url": "string",
  • "token_url": "string",
  • "redirect_uri": "string",
  • "scopes": [
    ],
  • "extra_params": {
    },
  • "enabled": true,
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Creates a new OAuth2 configuration.

Requires root privileges. This endpoint creates a new OAuth2 configuration based on the provided request data.

Request Body schema: application/json; charset=utf-8
required

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)

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "client_id": "string",
  • "client_secret": "string",
  • "auth_url": "string",
  • "token_url": "string",
  • "redirect_uri": "string",
  • "scopes": [
    ],
  • "extra_params": {
    },
  • "enabled": true,
  • "use_proxy": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Lists OAuth2 configurations with pagination and sorting options.

This endpoint retrieves a paginated list of OAuth2 configurations, allowing for optional pagination and sorting parameters. It requires root access.

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Generates an OAuth2 authorization URL for a specific account.

This endpoint creates an authorization URL for the specified OAuth2 configuration and account ID. It requires root access and returns the URL as plain text.

Request Body schema: application/json; charset=utf-8
required

A JSON payload containing the OAuth2 configuration name and account ID.

account_id
required
integer <uint64>

The ID of the account for which the authorization URL is generated.

oauth2_id
required
integer <uint64>

The name of the OAuth2 configuration to use for generating the authorization URL.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "account_id": 0,
  • "oauth2_id": 0
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Retrieves OAuth2 access tokens for a specified account.

This endpoint fetches the OAuth2 access tokens associated with the given account ID.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "account_id": 0,
  • "oauth2_id": 0,
  • "access_token": "string",
  • "refresh_token": "string",
  • "created_at": 0,
  • "updated_at": 0
}

SendMail

Sends a new email for a specified account.

This endpoint constructs and sends a new email based on the provided request data.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "from": {
    },
  • "recipients": [
    ],
  • "subject": "string",
  • "text": "string",
  • "html": "string",
  • "preview": "string",
  • "eml": "string",
  • "template_id": 0,
  • "attachments": [
    ],
  • "headers": {
    },
  • "send_control": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Sends a reply to an existing email for a specified account.

This endpoint constructs and sends a reply to an email based on the provided request data.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "mailbox_name": "string",
  • "uid": 0,
  • "text": "string",
  • "html": "string",
  • "preview": "string",
  • "headers": {
    },
  • "reply_all": true,
  • "attachments": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "include_original": true,
  • "include_all_attachments": true,
  • "timezone": "string",
  • "send_control": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Forwards an existing email for a specified account.

This endpoint constructs and sends a forwarded email based on the provided request data.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "mailbox_name": "string",
  • "uid": 0,
  • "to": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "text": "string",
  • "html": "string",
  • "preview": "string",
  • "headers": {
    },
  • "timezone": "string",
  • "attachments": [
    ],
  • "include_original": true,
  • "include_all_attachments": true,
  • "send_control": {
    }
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Lists email tasks with pagination, sorting, and optional status filtering.

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.

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Retrieves a specific email task by its ID.

This endpoint fetches the details of an email task identified by the provided ID.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "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": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "attachment_count": 0,
  • "cache_key": "string",
  • "envelope": {
    },
  • "save_to_sent": true,
  • "sent_folder": "string",
  • "send_at": 0,
  • "mta": 0,
  • "dsn": {
    },
  • "reply": true,
  • "mailbox": "string",
  • "uid": 0
}

Mark a email task for deletion from queue

Initiates asynchronous removal of an email task by marking it for deletion. The task will be:

  1. Immediately marked as "cancelled" in the system
  2. Prevented from any further execution attempts
  3. Physically removed by background cleanup processes

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

System

Retrieves important system notifications for the RustMail service.

This endpoint returns a consolidated view of all critical system notifications including:

  • Available version updates
  • License expiration warnings

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "release": {
    },
  • "license": {
    }
}

Retrieves an overview of RustMail service metrics.

This endpoint returns a consolidated view of all key metrics including:

  • IMAP traffic (sent and received)
  • Email sent counts (success and failure)
  • Email sent bytes
  • New email arrivals
  • Mail flag changes
  • Email opens
  • Email clicks
  • Event dispatch counts (success and failure for HTTP and NATS)

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "pending_email_task_num": 0,
  • "pending_hook_task_num": 0,
  • "account_num": 0,
  • "uptime": 0,
  • "rustmailer_version": "string",
  • "time_series": {
    }
}

Get the full list of SOCKS5 proxy configurations.

Responses

Response samples

Content type
application/json; charset=utf-8
[
  • {
    }
]

Delete a specific proxy configuration by ID. Requires root permission.

path Parameters
id
required
integer <uint64>

The name of the OAuth2 configuration to retrieve

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Retrieve a specific proxy configuration by ID

path Parameters
id
required
integer <uint64>

The name of the OAuth2 configuration to retrieve

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "url": "string",
  • "created_at": 0,
  • "updated_at": 0
}

Update the URL of a specific proxy by ID. Requires root permission.

path Parameters
id
required
integer <uint64>
Request Body schema: text/plain; charset=utf-8
required
string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Create a new proxy configuration. Requires root permission.

Request Body schema: text/plain; charset=utf-8
required
string

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Template

Retrieves an email template by its name.

Returns the template if found, or a ResourceNotFound error if no template matches the provided name.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "id": 0,
  • "description": "string",
  • "account": {
    },
  • "subject": "string",
  • "preview": "string",
  • "format": "Markdown",
  • "text": "string",
  • "html": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "last_access_at": 0
}

Deletes an email template by its name.

Removes the specified template if it exists and the client has access. Returns a ResourceNotFound error if the template is not found.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Updates an existing email template by its name.

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.

Request Body schema: application/json; charset=utf-8
required

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "subject": "string",
  • "preview": "string",
  • "text": "string",
  • "html": "string",
  • "format": "Markdown"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Creates a new email template.

Saves a new email template based on the provided request data.

Request Body schema: application/json; charset=utf-8
required

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). None indicates a public template.

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.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "description": "string",
  • "account_id": 0,
  • "subject": "string",
  • "preview": "string",
  • "text": "string",
  • "html": "string",
  • "format": "Markdown"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Lists all email templates with pagination.

Retrieves a paginated list of all email templates. Requires root privileges.

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Lists email templates associated with a specific account.

Retrieves a paginated list of templates for the specified account ID. Requires access to the specified account.

query Parameters
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.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "current_page": 0,
  • "page_size": 0,
  • "total_items": 0,
  • "items": [
    ],
  • "total_pages": 0
}

Deletes all email templates associated with a specific account.

Removes all templates linked to the specified account ID. Requires access to the specified account.

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}

Send a test email using a specific template

This endpoint allows sending a test email to verify template rendering and delivery.

Request Body schema: application/json; charset=utf-8
required

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}

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "account_id": 0,
  • "recipient": "string",
  • "template_params": null
}

Response samples

Content type
application/json; charset=utf-8
{
  • "message": "string",
  • "code": 0
}