Drafts
Create a Draft
Changed onCreates 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.
post/v3/grants/{grant_id}/drafts
Request
- Base URLhttps://api.us.nylas.com
- Auth
- HTTP bearer
- or HTTP bearer
Request body
Example request
{
"bcc": [
{
"email": "brandon.carson@example.com",
"name": ""
}
],
"body": "Hi, Welcome to Nylas!",
"cc": [
{
"email": "clivescounters@example.com",
"name": ""
}
],
"tracking_options": {
"domain_name": "tracking.example.com"
},
"attachments": [
{
"content_disposition": "inline; filename=\"some-image.jpeg\""
}
],
"from": [
{
"email": "leyah@example.com",
"name": "Leyah Miller"
}
],
"reply_to": [
{
"email": "healthcare.demo@example.com",
"name": ""
}
],
"reply_to_message_id": "1t8tv3890q4vgmwq6pmdwm8qg",
"subject": "Invitation: Welcome! @ Thu Oct 28, 2021 7am - 8am (EDT) - Toronto",
"to": [
{
"email": "demo@example.com",
"name": ""
},
{
"email": "realestate.demo@example.com",
"name": ""
}
],
"template": {
"id": "b79c82b2-a51b-4c54-8469-28006a43551a",
"strict": true,
"variables": {
"user": {
"name": "Leyah",
"surname": "Miller"
}
}
},
"signature_id": "sig_abc123"
}Response
Draft
Example response
{
"request_id": "5fa64c92-e840-4357-86b9-2aa364d35b88"
}Changes
- info
added the optional property
/to the response with the status
- info