Send a message
POST {{baseUrl}}/v3/grants/:grant_id/messages/send
You can use the Send v3 API to send a message now, or schedule it to send later. To
send a message now, omit the send_at
field. To schedule a message, set the send_at
field to the epoch time when you want to send the message. See the Messages documentation for more information.
Request Body
{"subject"=>"Hey Reaching Out with Nylas", "body"=>"Hey I would like to track this link <a href='https://espn.com'>My Example Link</a>", "to"=>[{"name"=>"John Doe", "email"=>"john.doe@example.com"}], "tracking_options"=>{"opens"=>true, "links"=>true, "thread_replies"=>true, "label"=>"hey just testing"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"grant_id":"\u003cstring\u003e","data":{"bcc":[{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"},{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"}],"body":"\u003cstring\u003e","cc":[{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"},{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"}],"date":"\u003cinteger\u003e","attachments":[{"content_type":"\u003cstring\u003e","filename":"\u003cstring\u003e","grant_id":"\u003cstring\u003e","id":"\u003cstring\u003e","is_inline":"\u003cboolean\u003e","size":"\u003cinteger\u003e"},{"content_type":"\u003cstring\u003e","filename":"\u003cstring\u003e","grant_id":"\u003cstring\u003e","id":"\u003cstring\u003e","is_inline":"\u003cboolean\u003e","size":"\u003cinteger\u003e"}],"folders":["\u003cstring\u003e","\u003cstring\u003e"],"from":[{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"},{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"}],"grant_id":"\u003cstring\u003e","id":"\u003cstring\u003e","object":"\u003cstring\u003e","reply_to":[{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"},{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"}],"schedule_id":"\u003cstring\u003e","snippet":"\u003cstring\u003e","starred":"\u003cboolean\u003e","subject":"\u003cstring\u003e","thread_id":"\u003cstring\u003e","to":[{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"},{"email":"\u003cemail\u003e","name":"\u003cstring\u003e"}],"unread":"\u003cboolean\u003e","use_draft":"\u003cboolean\u003e"},"request_id":"\u003cstring\u003e"}