> ## Documentation Index
> Fetch the complete documentation index at: https://developer.gptmaker.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Listar Ações

> Listar as ações de inatividade



## OpenAPI

````yaml GET /v2/agent/{agentId}/idle-actions
openapi: 3.0.1
info:
  title: OpenAPI GPT Maker
  description: Documentação completa da API do GPT Maker
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.gptmaker.ai
security:
  - bearerAuth: []
paths:
  /v2/agent/{agentId}/idle-actions:
    get:
      description: Listar as ações de inatividade
      parameters:
        - name: agentId
          in: path
          description: Id do agente
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lista as configurações de ações de inatividade
          content:
            application/json:
              schema:
                type: object
                properties:
                  actions:
                    type: array
                    description: Lista de ações configuradas para inatividade
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Identificador da ação
                        type:
                          type: string
                          enum:
                            - SEND_MESSAGE
                            - FINISH_INTERACTION
                          description: Tipo da ação de inatividade
                        instructions:
                          type: string
                          nullable: true
                          description: Mensagem ou instruções da ação
                        workingHours:
                          type: object
                          nullable: true
                          description: >-
                            Horários de funcionamento permitidos para execução
                            da ação
                          properties:
                            id:
                              type: string
                            tenant:
                              type: string
                            tenantOwner:
                              type: string
                            createdAt:
                              type: integer
                              description: Timestamp de criação
                            updatedAt:
                              type: integer
                              nullable: true
                              description: Timestamp de atualização
                            active:
                              type: boolean
                            days:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  tenant:
                                    type: string
                                  tenantOwner:
                                    type: string
                                  createdAt:
                                    type: integer
                                  updatedAt:
                                    type: integer
                                    nullable: true
                                  active:
                                    type: boolean
                                  dayWeek:
                                    type: integer
                                    description: Dia da semana (0=Domingo, 1=Segunda, ...)
                                  hours:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        tenant:
                                          type: string
                                        tenantOwner:
                                          type: string
                                        createdAt:
                                          type: integer
                                        updatedAt:
                                          type: integer
                                          nullable: true
                                        start:
                                          type: string
                                          example: '08:00'
                                        end:
                                          type: string
                                          example: '12:00'
                                        sequence:
                                          type: integer
                                          description: Ordem do intervalo
                        allowAllHours:
                          type: boolean
                          description: >-
                            Indica se a ação pode ser executada em qualquer
                            horário
                        seconds:
                          type: integer
                          description: >-
                            Tempo de inatividade (em segundos) para disparar a
                            ação
                  finishOn:
                    type: object
                    description: Configuração de tempo para finalizar interação
                    properties:
                      seconds:
                        type: integer
                        description: Tempo total em segundos para finalizar
        '400':
          description: Erro inesperado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Erro de token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
components:
  schemas:
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    Error403:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````