Skip to main content

What it is

The Email API sends one email to one or more recipients. Use it for transactional notifications, account updates, receipts, and personalized messages.

Before you begin

  • Store your YCloud API key in YCLOUD_API_KEY.
  • Register and activate the sender domain in your YCloud account.
  • Use a sender address from the activated domain.
  • Prepare HTML or plain-text content no larger than 150 KB.

How it works

Send the email with POST /emails. The response confirms that YCloud accepted the email and returns its id. Delivery happens separately for each address in to, cc, and bcc. Subscribe to email.delivery.updated to receive recipient-level states such as sent, delivered, undelivered, and failed.

Request

POST /emails

Request fields

Example request

Response

A successful response returns the created email object. Acceptance does not mean that every recipient has received the email.

Example response

Response fields

Personalize content

Place variables between # characters in the content. Provide one variable object for each address in to.

Delivery status

Subscribe to email.delivery.updated. Each event identifies the email and the specific recipientAddress, because recipients can have different final states. text/plain messages do not generate click or open tracking events.

Limits and troubleshooting

  • The sender domain must be activated before sending.
  • to supports at most 100 addresses.
  • subject supports at most 255 characters.
  • content supports at most 150 KB.
  • A successful API response can still be followed by an undelivered or failed recipient event.
  • Use the email id, recipient address, and externalId when investigating delivery.