curl --request PUT \
--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
}
}Atualizar uma nova ação de inatividade
curl --request PUT \
--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
Atualização das ações de inatividade do assistente
Lista de ações configuradas
Show child attributes
Mensagem ou instruções da ação
Tempo de inatividade em segundos
Se true, ignora restrição de horário
Lista de dias e horários em que a ação pode ser executada
Show child attributes
Dia da semana (0=Domingo, 1=Segunda, ... 6=Sábado)
Define se o dia está ativo
Configuração de ações de inatividade atualizada com sucesso
Lista de ações configuradas para inatividade
Show child attributes
Identificador único da ação
Tipo da ação
SEND_MESSAGE, FINISH_INTERACTION Mensagem/instruções configuradas para a ação
Horários de funcionamento da ação (quando allowAllHours=false)
Show child attributes
Show child attributes
0=Domingo ... 6=Sábado
Show child attributes
"08:00"
"12:00"
Ordem do intervalo dentro do dia
Se a ação deve ignorar restrições de horário
Tempo em segundos para disparar a ação