v1
latestOpenAPI 3.1.02026-07-14159142161.9 KBemailService
Add Letter to Send Queue
Adds a letter to the specified folder's send queue. The emailFolderId parameter must reference a folder with the is_pending flag set to true. In the request body, the destination_folder_id must reference a folder with the is_sent flag set to true.
post/email/v1/letters/by_folder/{folderId}
Path parameters
folderIdinteger required
Example:61
The ID of the email folder
Request body
Example request
{
"destination_folder_id": 12,
"signature_id": 1,
"subject": "Pitch deck",
"body": "Pitch deck description",
"body_html": "<div dir=\"ltr\">Pitch deck description</div>\r\n",
"parent_message_id": "imap_parent_message_id",
"main_message_id": "imap_main_message_id",
"is_read": true,
"contacts": [
{
"email": "to@gmail.com",
"name": "To",
"contact_type": "to"
},
{
"email": "from@gmail.com",
"name": "From",
"contact_type": "from"
},
{
"email": "cc@gmail.com",
"name": "CC",
"contact_type": "cc"
}
],
"crm_entities": {
"leads": [
{
"table_id": 3,
"title": "Lead title"
}
],
"deals": [
{
"table_id": 3,
"title": "Deal title"
}
],
"companies": [
{
"table_id": 3,
"title": "Deal title"
}
],
"contatcs": [
{
"table_id": 3,
"title": "Contact title"
}
]
}
}Response
OK
Example response
{
"destination_folder_id": null,
"subject": "Pitch deck",
"body": "Pitch deck description",
"body_html": "<div dir=\"ltr\">Pitch deck description</div>\r\n",
"parent_message_id": "imap_parent_message_id",
"main_message_id": "imap_main_message_id",
"is_read": true,
"contacts": [
{
"email": "to@gmail.com",
"name": "To",
"contact_type": "to"
},
{
"email": "from@gmail.com",
"name": "From",
"contact_type": "from"
},
{
"email": "cc@gmail.com",
"name": "CC",
"contact_type": "cc"
}
],
"crm_entities": {
"leads": [
{
"table_id": 3,
"title": "Lead title"
}
],
"deals": [
{
"table_id": 3,
"title": "Deal title"
}
],
"companies": [
{
"table_id": 3,
"title": "Deal title"
}
],
"contatcs": [
{
"table_id": 3,
"title": "Contact title"
}
]
}
}