Skip to content

Sending an e-mail

This REST call allows you to send an e-mail. The REST call may only be executed by administrators.





URL parameters
Parameter Type Required Description
environmentId String Yes The ID of the environment.
Header Parameters
Parameter Type Required Description
Content-Type String Yes Provide the content type of your call. Only application/json is supported.
X-User-Id String Yes The ID of the user who wants to trigger the REST action. This ID is returned by the authentication call
X-Auth-Token String Yes The authentication token that the authentication call returned.

A JSON object with information about the e-mail to be sent. The object can contain the following fields:

Field Type Required Description
documentId String Yes The ID of the document that should be sent.
subject String Yes This is the subject line of an Email. BizzStream Expressions such as {!placeholder!} are allowed.
content String Yes This is the name of the template that is used to generate the e-mail.
attachmentNames String Array No An array the names of the templates that are attached to the e-mail.
recipientAccessGroupNames String Array No An array with the names of the access groups that should receive the e-mail.
otherRecipients String No This is where you can create a list of e-mail addresses when you want to send the Email to a person that is not assigned to an access group. All Email addresses have to be separated by a comma. You may use BizzStream expressions in this field.
attachmentFieldNames Array No An array of attachment header field names whose attachments you want attached to the e-mail.

A JSON object with the status code of the HTTP response and possibly error information.


curl /api/v1/email?environmentId=a83rh4aX5nzBsGL3S
    -H "X-Auth-Token: 6IrqyFhbKjpyJZ_NX6dwLmRNxWk0OVffE8aBfauNKUG"
    -H "X-User-Id: a6gA9rYaGTFKPrT5P"
    -H "Content-Type: application/json"
    -X POST
    -d '{
        "documentId": "d2DR7beWx5KZijf4o",
        "subject": "An e-mail from BizzStream",
        "content": "order",
        "from": "",
        "attachmentNames": ["order"],
        "recipientAccessGroupNames": ["chiefs"],
        "otherRecipients": ",",
        "attachmentFieldNames": ["picture"]