Zum Hauptinhalt springen
POST
/
template
Create a response template
curl --request POST \
  --url https://demo.enneo.ai/api/mind/template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Zählerstand erfolgreich verarbeitet",
  "message": "<p>Wir haben deinen Stand {{intent.data.reading}} kWh erfasst.</p>",
  "tagId": 42,
  "subject": "Wir haben deinen Zählerstand",
  "emailTemplateId": 5,
  "exampleTicketIds": [
    9001
  ],
  "attachments": [
    {
      "base64": "SGVsbG8gd29ybGQ=",
      "name": "hinweis.txt"
    }
  ]
}
'
{
  "success": true,
  "id": 123,
  "tagId": 42,
  "emailTemplateId": 5,
  "description": "Zählerstand erfolgreich verarbeitet",
  "message": "<p>Wir haben deinen Stand {{intent.data.reading}} kWh erfasst.</p>",
  "subject": "Wir haben deinen Zählerstand",
  "exampleTicketIds": [
    9001
  ],
  "attachments": []
}

Authorizations

Authorization
string
header
required

JWT-based authentication

Body

application/json
message
string
required

The template body in HTML/Handlebars format. Must contain the actual customer-facing text.

Example:

"<p>Hallo {{contract.firstName}}, bitte sende uns den Stand.</p>"

description
string

Human readable description of the template.

Example:

"Reminder: missing meter reading"

tagId
integer | null

Optional tag used to categorize the template.

emailTemplateId
integer | null

Wrapper template ID used for greetings/signature. Defaults to the generic template configured in settings.

subject
string | null

Optional subject used for proactive emails.

exampleTicketIds
integer[]

Ticket IDs that showcase how this template is used.

attachments
object[]

Files that should be attached when inserting the template.

Response

Template created successfully

id
integer

The id of the template

Example:

1

tagId
integer

The id of the tag that the template belongs to

Example:

1

emailTemplateId
integer

The id of the email template that is used for wrapping

Example:

1

description
string

The description of the intent template

Example:

"Zählerstand erfolgreich hinterlegt"

message
string

The template itself

Example:

"<p>Wir haben den Zählerstand von {{intent.data.reading}} kWh für den {{formatDateDE intent.data.date}} erfasst und im System hinterlegt.</p>"

subject
string

The subject of the email for outgoing emails

Example:

"Wir brauchen Deine Unterstützung"

exampleTicketIds
integer[]

The ids of the tickets that are used as examples for the intent template

mergedTemplate
string

The merged template

Example:

"Wir haben den Zählerstand von 123 kWh für den 01.01.2022 erfasst und im System hinterlegt."

template
string

The template itself

Example:

"<p>Wir haben den Zählerstand von 123 kWh für den 01.01.2022 erfasst und im System hinterlegt.</p>"

success
boolean

If true, the template is successful

Example:

true