Manage your templates

Create a template

To create a new email template, send a POST request on /marketplace/emails endpoint and specify following properties:

Property
Description

type_id

Email provider id (didomi)

email_type

Email template id

properties.html

Email template (HTML)

properties.subject

Email subject

properties.reply_to

Email addresses set in the reply-to

POST https://api.didomi.io/marketplace/emails?organization_id=YOUR_ORGANIZATION_ID

{
    "type_id": "didomi",
    /**
    * Email types available are detailled above.
    * For instance, to verify user identity,
    * in context of a Privacy request collection 
    * you will be using `request-verify` email
    */    
    "email_type": "TEMPLATE_ID",
    "properties": {
        "html": "YOUR_HTML",
        "subject": "EMAIL_SUBJECT",
        "reply_to": ["EMAIL_ADDRESS"]
    }
}

💡 Note: this section only refers to didomi providers. You can also use your own provider: the workflow will look the same, however further configuration will be required. To fetch provider configuration schemas, send a GET request on /marketplace/emails/properties-schema.

List all templates

To list email templates, send a GET request on /marketplace/emails endpoint.

GET https://api.didomi.io/marketplace/emails?organization_id=YOUR_ORGANIZATION_ID

[
    {
        "type_id": "didomi",
        "email_type": "TEMPLATE_ID",
        "properties": {
            "html": "YOUR_HTML",
            "subject": "EMAIL_SUBJECT",
            "reply_to": ["EMAIL_ADDRESS"]
        }
    }
]

Last updated