curl --request POST \
--url https://api.gptmaker.ai/v2/agent/{agentId}/idle-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"instructions": "<string>",
"seconds": 123,
"allowAllHours": true,
"workingHours": [
{
"dayWeek": 123,
"active": true,
"hours": [
{
"start": "08:00",
"end": "12:00"
}
]
}
]
}
],
"finishOn": {
"seconds": 123
}
}
'{
"actions": [
{
"id": "<string>",
"type": "SEND_MESSAGE",
"instructions": "<string>",
"workingHours": {
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"active": true,
"days": [
{
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"active": true,
"dayWeek": 123,
"hours": [
{
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"start": "08:00",
"end": "12:00",
"sequence": 123
}
]
}
]
},
"allowAllHours": true,
"seconds": 123
}
],
"finishOn": {
"seconds": 123
}
}Cria uma nova ação de inatividade
curl --request POST \
--url https://api.gptmaker.ai/v2/agent/{agentId}/idle-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"instructions": "<string>",
"seconds": 123,
"allowAllHours": true,
"workingHours": [
{
"dayWeek": 123,
"active": true,
"hours": [
{
"start": "08:00",
"end": "12:00"
}
]
}
]
}
],
"finishOn": {
"seconds": 123
}
}
'{
"actions": [
{
"id": "<string>",
"type": "SEND_MESSAGE",
"instructions": "<string>",
"workingHours": {
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"active": true,
"days": [
{
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"active": true,
"dayWeek": 123,
"hours": [
{
"id": "<string>",
"tenant": "<string>",
"tenantOwner": "<string>",
"createdAt": 123,
"updatedAt": 123,
"start": "08:00",
"end": "12:00",
"sequence": 123
}
]
}
]
},
"allowAllHours": true,
"seconds": 123
}
],
"finishOn": {
"seconds": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Id do agente
Configuração de ações de inatividade a ser criada/atualizada
Show child attributes
Mensagem ou instruções da ação
Tempo em segundos de inatividade para disparar a ação
Define se deve ser executada em qualquer horário ou não, se for true não colocamos workingHours
Show child attributes
Configuração de ações de inatividade criada com sucesso
Lista de ações configuradas para inatividade
Show child attributes
Identificador da ação criada
Tipo da ação de inatividade
SEND_MESSAGE, TEMP_BLOCK, FINISH_INTERACTION Mensagem/instruções da ação
Horários de funcionamento aplicáveis à ação
Show child attributes
Show child attributes
0=Domingo ... 6=Sábado
Show child attributes
"08:00"
"12:00"
Indica se a ação pode ocorrer em qualquer horário
Tempo de inatividade (s) para disparo da ação