curl --request GET \
--url https://api.jelou.ai/v1/bots/{botId}/templates \
--header 'Authorization: Basic <encoded-value>'{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}Recupere todos os templates HSM configurados no seu bot
curl --request GET \
--url https://api.jelou.ai/v1/bots/{botId}/templates \
--header 'Authorization: Basic <encoded-value>'{
"message": "<string>",
"statusMessage": "<string>",
"status": 123,
"error": {
"code": "<string>",
"key": "<string>",
"description": "<string>",
"developerMessages": {},
"clientMessages": {}
},
"validationError": {}
}GET /v1/bots/{botId}/templates
| Propriedade | Tipo | Descrição |
|---|---|---|
| botId | string | ID único do bot. Exemplo: 123456789 |
| Propriedade | Tipo | Descrição |
|---|---|---|
| query | string | Pesquisar templates por elementName |
| status | string | Pesquisar templates por status. Valores possíveis: PENDING, REJECTED, APPROVED |
| category | string | Pesquisar templates por categoria. Valores possíveis: UTILITY, MARKETING, AUTHENTICATION |
200 - Resposta bem-sucedida
{
"data": [
{
"template": "Hello! We are *Jelou*. \nWelcome _{{1}}_.",
"displayName": "Welcome",
"elementName": "welcome_customer",
"params": [
{"label": "Customer name", "param": "1"}
],
"paramsNumber": 1,
"isVisible": true,
"language": "EN",
"status": "APPROVED",
"category": "UTILITY",
"createdAt": "2021-01-28T15:08:38.492Z",
"updatedAt": "2021-01-28T15:08:38.492Z"
}
]
}
401 - Não Autorizado
{
"message": "Authentication failed"
}
404 - Não Encontrado
{
"message": ["The Bot could not be found at the moment."],
"statusMessage": "failed",
"error": {
"code": "E1019",
"key": "BOT_NOT_FOUND"
}
}
Basic authentication using Base64 encoded clientId:clientSecret
Buscar por elementName
PENDING, REJECTED, APPROVED UTILITY, MARKETING, AUTHENTICATION Plantillas recuperadas exitosamente
Esta página foi útil?