This guide explains how use the API to send emails.
- List email templates (optional)
/public/template/email/list/
This endpoint retrieves the list of email templates. You need a templateId to send a specific email template. These are the same templates that are available in the back office under Configuratie > Mail Templates.
If you already know the templateId of the email template you want to use, you can skip this step and proceed directly to step 3.
- Get email template (optional)
/public/template/email/get?templateId=...
If you want to view the content of an email template, you can retrieve it using this endpoint. It returns the details of a specific email template.
If you already know the templateId of the email template you want to use, you can skip this step and proceed directly to step 3.
- Send task email
/public/task/email/send
Use this endpoint to send an email.
Provide the following parameters in the request:
templateId: The ID of the email template you want to send (retrieved in step 1).
- taskId: The ID of the task for which email should be sent.
- recipientAliases: An array containing one or more recipients of the email. Supported values are:
- plannedForUser
- client
- billingClient
For example, to send the email to both the plannedForUser and the client:
{
"recipientAliases": [
"plannedForUser",
"client"
]
}Rate limits
Sending emails through the task/email/send endpoint is subject to the following rate limits:
- Maximum 10 requests per 60 seconds
- Maximum 2 concurrent requests
- Maximum 1 email send request per task every 10 minutes