---
title: "PUT /v2/agent/{agentId}/idle-actions"
method: PUT
path: "/v2/agent/{agentId}/idle-actions"
---

# PUT /v2/agent/{agentId}/idle-actions

`PUT /v2/agent/{agentId}/idle-actions`

Atualizar uma nova ação de inatividade

## Path parameters

- `agentId` string, required

## Request body

- object
  - `actions` object[] — Lista de ações configuradas
    - `instructions` string — Mensagem ou instruções da ação
    - `seconds` integer — Tempo de inatividade em segundos
    - `allowAllHours` boolean — Se true, ignora restrição de horário
    - `workingHours` object[], nullable — Lista de dias e horários em que a ação pode ser executada
      - `dayWeek` integer — Dia da semana (0=Domingo, 1=Segunda, ... 6=Sábado)
      - `active` boolean — Define se o dia está ativo
      - `hours` object[] — Faixas de horário do dia
        - `start` string
        - `end` string
  - `finishOn` object — Tempo para finalizar interação automaticamente
    - `seconds` integer — Tempo total em segundos

## Response `200`

Configuração de ações de inatividade atualizada com sucesso

- object
  - `actions` object[] — Lista de ações configuradas para inatividade
    - `id` string — Identificador único da ação
    - `type` 'SEND_MESSAGE' | 'FINISH_INTERACTION' — Tipo da ação
    - `instructions` string, nullable — Mensagem/instruções configuradas para a ação
    - `workingHours` object, nullable — Horários de funcionamento da ação (quando allowAllHours=false)
      - `id` string
      - `tenant` string
      - `tenantOwner` string
      - `createdAt` integer
      - `updatedAt` integer, nullable
      - `active` boolean
      - `days` object[]
        - `id` string
        - `tenant` string
        - `tenantOwner` string
        - `createdAt` integer
        - `updatedAt` integer, nullable
        - `active` boolean
        - `dayWeek` integer — 0=Domingo ... 6=Sábado
        - `hours` object[]
          - `id` string
          - `tenant` string
          - `tenantOwner` string
          - `createdAt` integer
          - `updatedAt` integer, nullable
          - `start` string
          - `end` string
          - `sequence` integer — Ordem do intervalo dentro do dia
    - `allowAllHours` boolean — Se a ação deve ignorar restrições de horário
    - `seconds` integer — Tempo em segundos para disparar a ação
  - `finishOn` object — Configuração de tempo total para finalizar automaticamente
    - `seconds` integer — Tempo em segundos para finalizar

## Other responses

- `400` — Erro inesperado
- `403` — Erro de token

---

[API](https://skmtc.net/gptmaker/apis/openapi-gpt-maker.md) · [All operations](https://skmtc.net/gptmaker/apis/openapi-gpt-maker/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gptmaker/openapi-gpt-maker/versions/bda09b3eba6e/schema)
