Send
Sending an email
POST https://do.workzeal.com/mail/send
Request Body
Name
Type
Description
mail*
String
JSON
JSON
Object
{
"mail" : {
"account_id" : "4",
"to_address" : "[email protected]",
"subject" : "SGFwcHkh",
"body" : "SGVsbG8h"
}
}
Example
url --location --request POST 'https://do.workzeal.com/mail/send' \
--header 'Authorization: Bearer XXXXXX.XXXXXXXX.XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
"mail" : {
"account_id" : "4",
"to_address" : "[email protected]",
"subject" : "SGFwcHkh",
"body" : "SGVsbG8h"
}
}'<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://do.workzeal.com/mail/send',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"mail" : {
"account_id" : "4",
"to_address" : "[email protected]",
"subject" : "SGFwcHkh",
"body" : "SGVsbG8h"
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer XXXXXX.XXXXXXXX.XXXXXXXX',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;var request = require('request');
var options = {
'method': 'POST',
'url': 'https://do.workzeal.com/mail/send',
'headers': {
'Authorization': 'Bearer XXXXXXXX.XXXXXXXXXXX.XXXXXXX',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mail": {
"account_id": "4",
"to_address": "[email protected]",
"subject": "SGFwcHkh",
"body": "SGVsbG8h"
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Answer
{
"status": "success",
"error": null,
"code": "0",
"rows": 1,
"pages": 1,
"page": 1,
"value": ""
}