Create email
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/messaging/messages/email
Description
Create a new email message.
Required scopes
Authentication
setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.Parameters
Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Email Subject.
Email Content.
List of Topic IDs.
List of User IDs.
List of Targets IDs.
Array of target IDs to be added as CC.
Array of target IDs to be added as BCC.
Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
Is message a draft
Is content of type HTML
Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
Message
Message ID.
Message creation time in ISO 8601 format.
Message update date in ISO 8601 format.
Message provider type.
Topic IDs set as recipients.
User IDs set as recipients.
Target IDs set as recipients.
The scheduled time for message.
The time when the message was delivered.
Delivery errors if any.
Number of recipients the message was delivered to.
Data of the message.
Status of delivery.
const sdk = require('node-appwrite');
const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new sdk.Messaging(client);
const result = await messaging.createEmail({ messageId: '<MESSAGE_ID>', subject: '<SUBJECT>', content: '<CONTENT>', topics: [], // optional users: [], // optional targets: [], // optional cc: [], // optional bcc: [], // optional attachments: [], // optional draft: false, // optional html: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional});Messaging
messages
logs
providers
subscribers
topics
Create email
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/messaging/messages/email
Description
Create a new email message.
Required scopes
Authentication
setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.Parameters
Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Email Subject.
Email Content.
List of Topic IDs.
List of User IDs.
List of Targets IDs.
Array of target IDs to be added as CC.
Array of target IDs to be added as BCC.
Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
Is message a draft
Is content of type HTML
Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
Message
Message ID.
Message creation time in ISO 8601 format.
Message update date in ISO 8601 format.
Message provider type.
Topic IDs set as recipients.
User IDs set as recipients.
Target IDs set as recipients.
The scheduled time for message.
The time when the message was delivered.
Delivery errors if any.
Number of recipients the message was delivered to.
Data of the message.
Status of delivery.
const sdk = require('node-appwrite');
const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new sdk.Messaging(client);
const result = await messaging.createEmail({ messageId: '<MESSAGE_ID>', subject: '<SUBJECT>', content: '<CONTENT>', topics: [], // optional users: [], // optional targets: [], // optional cc: [], // optional bcc: [], // optional attachments: [], // optional draft: false, // optional html: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional});