Create Template

This document contains the /api/v1/template endpoint details, including required headers, a request body example, and a response example.

Method

Method
POST

URL

/api/v1/template

Authorization

Bearer {token}

content-type

application/json

mailboxUuid

{uuid}

Body

“{“”access””:””mailbox””,””categories””:[],””data””:””string””}”

JSON Body

{
"access":"mailbox",
"categories":[],
"data":"<template>
    <info>
            <name>Template name</name>
            <description>Template description</description>
            <subject/>
            <message/>
            <expire/>
    </info>
    <documents>
            <document id=\"4a61f258-fd9d-406c-b47e-81c90d4e5c47\">
                    <info>
                            <title>New document</title>
                    </info>
                    <body>
                            <div class=\"editor-div\">Structured document</div>
                            <div class=\"editor-div\">This data depends on text in your documents and dynamic fields which was added to this document
                                    <field type=\"text\" name=\"text field\" roleId=\"b811f2b6-1656-42aa-9420-a9b8addb0246\" placeholder=\"text field\"/>
                            </div>
                    </body>
            </document>
    </documents>
    <flow>
            <roles>
                    <role id=\"23f20eec-adad-4325-b553-1bde4be29198\" title=\"Sender\" type=\"sender\" order=\"0\"/>
                    <role id=\"b811f2b6-1656-42aa-9420-a9b8addb0246\" title=\"Assignee\" type=\"assignee\" order=\"1\"/>
            </roles>
    </flow>
</template>"
}

Depending on your needs, you can add different types of fields.

RESPONSE