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

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

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

Cria uma nova ação de inatividade

## Path parameters

- `agentId` string, required

## Request body

- object
  - `actions` object[]
    - `instructions` string — Mensagem ou instruções da ação
    - `seconds` integer — Tempo em segundos de inatividade para disparar a ação
    - `allowAllHours` boolean — Define se deve ser executada em qualquer horário ou não, se for true não colocamos workingHours
    - `workingHours` object[], nullable
      - `dayWeek` integer — 0=Domingo, 1=Segunda, ..., 6=Sábado
      - `active` boolean — Define se o dia está ativo
      - `hours` object[]
        - `start` string
        - `end` string
  - `finishOn` object
    - `seconds` integer — Tempo total (em segundos) para finalizar a interação

## Response `200`

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

- object
  - `actions` object[] — Lista de ações configuradas para inatividade
    - `id` string — Identificador da ação criada
    - `type` 'SEND_MESSAGE' | 'TEMP_BLOCK' | 'FINISH_INTERACTION' — Tipo da ação de inatividade
    - `instructions` string, nullable — Mensagem/instruções da ação
    - `workingHours` object, nullable — Horários de funcionamento aplicáveis à ação
      - `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
    - `allowAllHours` boolean — Indica se a ação pode ocorrer em qualquer horário
    - `seconds` integer — Tempo de inatividade (s) para disparo da ação
  - `finishOn` object — Configuração para finalização automática
    - `seconds` integer — Tempo total (s) para finalizar a interação

## 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)
