Gmail
Create Draft
POST
/
projects
/
{project_id}
/
actions
/
#GMAIL_CREATE_DRAFT
curl --request POST \
--url 'https://actionkit.useparagon.com/projects/{project_id}/actions/#GMAIL_CREATE_DRAFT' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"action": "GMAIL_CREATE_DRAFT",
"parameters": {
"toRecipients": [
"<string>"
],
"from": "<string>",
"subject": "<string>",
"messageContent": "<string>",
"attachments": "<string>",
"additionalHeaders": {}
}
}'
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Your Paragon Project ID
Body
application/json
To : Specify the recipients as either a single string or a JSON array. (example: "[ "[email protected]", "[email protected]" ]")
From : Specify the email of the sender.
Subject : Specify the subject of the message.
Message Content : Specify the content of the email message as plain text or HTML.
Attachments : Accepts either a single file object or a JSON array of file objects (example: "[{file object}, {file object}]")
Additional Headers : Specify any additional header fields here. (example: "{ "reply-to": "Sender Name [email protected]", }")
Response
200
Success
Was this page helpful?
curl --request POST \
--url 'https://actionkit.useparagon.com/projects/{project_id}/actions/#GMAIL_CREATE_DRAFT' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"action": "GMAIL_CREATE_DRAFT",
"parameters": {
"toRecipients": [
"<string>"
],
"from": "<string>",
"subject": "<string>",
"messageContent": "<string>",
"attachments": "<string>",
"additionalHeaders": {}
}
}'