POST
/
template
/
preview
curl --request POST \
  --url https://demo.enneo.ai/api/mind/template/preview \
  --header 'Content-Type: application/json' \
  --data '{
  "templateText": "<p>vielen Dank für die Meldung deines Zählerstandes.</p>\\n\\n<p>Wir haben den Zählerstand von {{intent.data.reading}} kWh für den {{formatDateDE intent.data.date}} erfasst und im System hinterlegt.</p>",
  "ticketId": 20,
  "contractId": 1234
}'
{
  "success": true,
  "preview": "<p>vielen Dank für die Meldung deines Zählerstandes.</p>\\n\\n<p>Wir haben den Zählerstand von 20112 kWh für den 31.01.2023 erfasst und im System hinterlegt.</p>",
  "variables": {
    "intent": {},
    "contract": {}
  }
}

Authorizations

connect.sid
string
cookie
required

Cookie-based authentication

Body

application/json
templateText
string

The template to preview

Example:

"<p>vielen Dank für die Meldung deines Zählerstandes.</p>\\n\\n<p>Wir haben den Zählerstand von {{intent.data.reading}} kWh für den {{formatDateDE intent.data.date}} erfasst und im System hinterlegt.</p>"

ticketId
number

The ticketId for which to tailor the response to, if provided variables will be replaced with the values from the ticket

Example:

20

contractId
number

The contractId for which to tailor the response to, if provided variables will be replaced with the values from the contract

Example:

1234

Response

200
application/json
Successful operation
success
boolean

If true, the intent template preview was successfully generated

Example:

true

preview
string

The preview of the intent template

Example:

"<p>vielen Dank für die Meldung deines Zählerstandes.</p>\\n\\n<p>Wir haben den Zählerstand von 20112 kWh für den 31.01.2023 erfasst und im System hinterlegt.</p>"

variables
object

The variables that could be used in the template, only if ticketId was provided