https://api.us.nylas.com/v3/grants/{grant_id}/draftsCreate a Draft
Creates a draft.
If you provide tracking_options.domain_name, Nylas validates the custom hostname and stores its
canonical value with the draft's link click and message open tracking settings. If you omit the
field, Nylas uses its regional tracking hostname when it creates tracking URLs.
domain_nameThe custom hostname to use for link click and message open tracking. The hostname must be registered to the authenticated organization in the Nylas Dashboard and have an active certificate.
Custom tracking hostnames are available on select plans. Contact your Nylas account representative or the Nylas Sales team to enable this feature for your organization.
Nylas trims surrounding whitespace, removes one trailing dot, and converts ASCII letters to lowercase before looking up the hostname. Provide an ASCII fully qualified hostname without a URL scheme, path, port, or wildcard.
You must enable links, opens, or both when you provide this field. A custom tracking hostname
does not support thread_replies by itself. If you omit this field, Nylas uses its regional
tracking hostname. Invalid, inactive, blocked, deleted, and unowned hostnames return the same
generic 400 response. If Nylas cannot complete the explicit ownership and certificate lookup, it
returns a 5xx response without falling back to a Nylas hostname.
attachmentsAn array of file attachments to include in the draft. You can use either the
application/json or multipart/form-data schema, depending on the size of the
attachment.
The application/json schema is limited to 3MB, including the message body. The content
must be Base64-encoded.
The multipart/form-data schema is limited by the provider to 25MB. See the
Attachments references for more information.
content_typeThe MIME type of the attachment, used by the email client to determine how to display the attachment. If you don't provide a type, Nylas infers it from the file name.
signature_idThe ID of a signature to append to the draft body. Nylas inserts the signature after a line break at the end of the body. Only one signature can be used per draft.