nylas
    Preparing search index...

    Interface Message

    Interface representing a Nylas Message object.

    interface Message {
        attachments?: Attachment[];
        bcc?: EmailName[];
        body?: string;
        cc?: EmailName[];
        date: number;
        folders: string[];
        from?: EmailName[];
        grantId: string;
        headers?: MessageHeaders[];
        id: string;
        metadata?: Record<string, unknown>;
        object: "message";
        rawMime?: string;
        replyTo?: EmailName[];
        scheduleId?: string;
        sendAt?: number;
        snippet?: string;
        starred?: boolean;
        subject?: string;
        threadId?: string;
        to: EmailName[];
        trackingOptions?: MessageTrackingOptions;
        unread?: boolean;
        useDraft?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    attachments?: Attachment[]

    An array of files attached to the message.

    bcc?: EmailName[]

    An array of bcc recipients.

    body?: string

    The full HTML message body. Messages with only plain-text representations are up-converted to HTML.

    cc?: EmailName[]

    An array of cc recipients.

    date: number

    Unix timestamp of when the message was received by the mail server. This may be different from the unverified Date header in raw message object.

    folders: string[]

    The ID of the folder(s) the message appears in.

    from?: EmailName[]

    An array of message senders.

    grantId: string

    Grant ID of the Nylas account.

    headers?: MessageHeaders[]

    The message headers. Only present if the 'fields' query parameter is set to includeHeaders.

    id: string

    The unique identifier for the message.

    metadata?: Record<string, unknown>

    A list of key-value pairs storing additional data.

    object: "message"

    The type of object.

    rawMime?: string

    A Base64url-encoded string containing the message data (including the body content). Only present if the 'fields' query parameter is set to raw_mime. When this field is requested, only grant_id, object, id, and raw_mime fields are returned.

    replyTo?: EmailName[]

    An array of name and email pairs that override the sent reply-to headers.

    scheduleId?: string

    The unique identifier for the scheduled message.

    sendAt?: number

    Unix timestamp to send the message at.

    snippet?: string

    A short snippet of the message body. This is the first 100 characters of the message body, with any HTML tags removed.

    starred?: boolean

    Whether or not the message has been starred by the user.

    subject?: string

    The message subject.

    threadId?: string

    A reference to the parent thread object. If this is a new draft, the thread will be empty.

    to: EmailName[]

    An array of message recipients.

    trackingOptions?: MessageTrackingOptions

    The message tracking options. Only present if the 'fields' query parameter is set to include_tracking_options.

    unread?: boolean

    Whether or not the message has been read by the user.

    useDraft?: boolean

    Whether or not to use draft support. This is primarily used when dealing with large attachments.