This s a documentation page for our shiny new REST API - you weren't meant to find it. This API isn't ready for public use yet. We're chopping and changing it a LOT as we grow it. So if you build something that uses it then it's very likely to break in a future update. Don't say you weren't warned!
URL: | https://api.kashflow.com/v2/email |
Method(s): | post |
Response Formats: | JSON, XML |
Description: | This method allows you to send email. |
Parameters
Name | Type | Description |
---|---|---|
To | String | Comma or semicolon separated email “TO” addresses. |
Cc | String | Comma or semicolon separated email “CC” addresses. |
Bcc | String | Comma or semicolon separated email “BCC” addresses. |
Subject | String | Email subject |
Body | String | Email body |
Attachments | Object | Object containing information about two types of supported attachment types i.e. DocumentUrls, FileAttachments. Described in more details below. |
isHtml | Boolean | Flag indicating whether email body is in HTML format. If true then email body will be sent in HTML format. |
Attachment Supported
Attachment more than 5MB are not supported and 10MB is the maximum limit for all attachments.
1) DocumentUrls
Parameters
Name | Type | Description |
---|---|---|
FileName | String | Filename is mandatory it can be same as name specified in the document URL. If different name is given then it will overwrite the actual file name in the URL. |
Url | String | Document URL e.g. permalinks. |
2) FileAttachments
Parameters
Name | Type | Description |
---|---|---|
Name | String | Attachment filename. Filename is mandatory field. |
AttachmentContent | String | File content in BASE64 string format. This content can be obtained from online tools like base64Encoder |
POST Operation
Sends email with specified information.URL : /email?async=false
Request Parameters
Name | Description |
---|---|
async | Optional boolean value which indicates whether to send email asynchronously or synchronously. Email will be sent asynchronously if not specified. |
Example request for POST of Email
{
"Bcc" : "[email protected]",
"Body" : "Email content",
"Cc" : "[email protected]",
"IsHtml" : true,
"Subject" : "Test Email",
"To" : "[email protected]",
"Attachments" : {
"DocumentUrls" : [{
"FileName" : "best.pdf",
"Url" : "http://dev-api.kashflow.com/v2/documents/quote/75D04D79-87EB-48A8-8525-1D6315D07D5B"
}] ,
"FileAttachments" : [{
"Name" : "best.pdf",
"AttachmentContent" : " BASE64String"
}]
}
}
Example response for POST of Email
Status Code: 200