Skip to main content

Templates

Refer to our template definition for more information.

Create

POST /templates.create

Sample request

{
"name": "my template name",
"source": "chatplugin",
"content": {
"message": {
"text": "[[salutation]]!"
}
}
}

Sample response

{
id: "TEMPLATE-UUID"
}

List

POST /templates.list

Filtering

This endpoint allows you to query templates, filtering by name.

Sample request

Find templates whose name contains "Ada":

{
"source": "chatplugin",
"name": "Ada" // optional
}

Sample response

{
"data": [
{
"id": "TEMPLATE-UUID",
"name": "Template for Ada Lovelance day",
"source": "chatplugin",
"content": {
"message": {
"text": "[[salutation]]!"
}
}
}
]
}

Info

POST /templates.info

{
"id": "TEMPLATE-UUID"
}

Sample response

{
"id": "TEMPLATE-UUID",
"name": "{String}",
"source": "chatplugin",
"content": {
"message": {
"text": "[[salutation]]!"
}
}
}

Update

POST /templates.update

{
"id": "template id",
"name": "my template name",
"source_type": "chatplugin",
"content": {
"message": {
"text": "[[salutation]]!"
}
}
}

Sample Response

This endpoint returns 200 if successful.

Delete

POST /templates.delete

{
"id": "TEMPLATE-UUID"
}

Sample Response

This endpoint returns 200 if successful.