Capability Sources

Create an Outlook draft as the calling member

Changed on

Creates a draft in the calling member's mailbox. It never sends the message. Microsoft requires delegated Mail.ReadWrite for draft creation.

post/v1/capabilities/microsoft-365/mail-drafts

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

Microsoft365MailDraftBody required
to, string[] required
cc, string[]
bcc, string[]
subject, string required
body, string required
bodyContentType, 'text' | 'html'

How Outlook stores body: text (default) or html. Use html for links, line breaks, tables, or an HTML signature; markup sent as text shows as literal tags.

Response

Outlook draft created.

Microsoft365MailDraftResponse required
ok, true required
draft, Microsoft365MailMessage required

Changes

    • info

      added the new optional request property bodyContentType

    • warning

      changed the pattern of the request property bcc/items from ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ to ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$

    • warning

      changed the pattern of the request property cc/items from ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ to ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$

    1 more change in this revision