{
  "info": {
    "_postman_id": "d1a57170-994d-404c-99a7-5f28a8ccbfc0",
    "name": "S4ilor API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "29816337",
    "_collection_link": "https://go.postman.co/collection/29816337-d1a57170-994d-404c-99a7-5f28a8ccbfc0?source=collection_link"
  },
  "item": [
    {
      "name": "Usuários",
      "item": [
        {
          "name": "Buscar usuários",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/users",
              "host": ["{{base_url}}"],
              "path": ["users"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "name",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar usuário por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/users/{{user_id}}",
              "host": ["{{base_url}}"],
              "path": ["users", "{{user_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Clientes",
      "item": [
        {
          "name": "Buscar clientes",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/clients",
              "host": ["{{base_url}}"],
              "path": ["clients"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "createdAt",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "desc",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar cliente por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/clients/{{client_id}}",
              "host": ["{{base_url}}"],
              "path": ["clients", "{{client_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Criar cliente",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"João da Silva\",\n    \"phone\": \"5511999998888\",\n    \"cpf\": \"12345678901\",\n    \"observations\": \"Cliente VIP\",\n    \"extraData\": { \"plano\": \"gold\", \"idade\": 30, \"ativo\": true },\n    \"tagIds\": [\"{{tag_id}}\"],\n    \"departmentId\": \"{{department_id}}\",\n    \"operatorIds\": [\"{{operator_id}}\"]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/clients",
              "host": ["{{base_url}}"],
              "path": ["clients"]
            }
          },
          "response": []
        },
        {
          "name": "Editar cliente",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"João da Silva Editado\",\n    \"observations\": \"Cliente VIP atualizado\",\n    \"extraData\": { \"plano\": \"gold\", \"idade\": 30, \"ativo\": true },\n    \"extraDataMode\": \"merge\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/clients/{{client_id}}",
              "host": ["{{base_url}}"],
              "path": ["clients", "{{client_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar cliente",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/clients/{{client_id}}",
              "host": ["{{base_url}}"],
              "path": ["clients", "{{client_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tags",
      "item": [
        {
          "name": "Buscar tags",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/tags",
              "host": ["{{base_url}}"],
              "path": ["tags"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "name",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar tag por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/tags/{{tag_id}}",
              "host": ["{{base_url}}"],
              "path": ["tags", "{{tag_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Criar tag",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Urgente\",\n    \"color\": \"#FF0000\",\n    \"icon\": \"AlertTriangle\",\n    \"description\": \"Atendimentos prioritários\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/tags",
              "host": ["{{base_url}}"],
              "path": ["tags"]
            }
          },
          "response": []
        },
        {
          "name": "Editar tag",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Urgente Editado\",\n    \"color\": \"#FF3321\",\n    \"icon\": \"Tag\",\n    \"description\": \"Descrição atualizada\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/tags/{{tag_id}}",
              "host": ["{{base_url}}"],
              "path": ["tags", "{{tag_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar tag",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/tags/{{tag_id}}",
              "host": ["{{base_url}}"],
              "path": ["tags", "{{tag_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Departamentos",
      "item": [
        {
          "name": "Buscar departamentos",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/departments",
              "host": ["{{base_url}}"],
              "path": ["departments"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "name",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar departamento por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/departments/{{department_id}}",
              "host": ["{{base_url}}"],
              "path": ["departments", "{{department_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Criar departamento",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Suporte\",\n    \"color\": \"#3B82F6\",\n    \"description\": \"Equipe de suporte técnico\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/departments",
              "host": ["{{base_url}}"],
              "path": ["departments"]
            }
          },
          "response": []
        },
        {
          "name": "Editar departamento",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Suporte Editado\",\n    \"color\": \"#3B82F6\",\n    \"description\": \"Descrição atualizada\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/departments/{{department_id}}",
              "host": ["{{base_url}}"],
              "path": ["departments", "{{department_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar departamento",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/departments/{{department_id}}",
              "host": ["{{base_url}}"],
              "path": ["departments", "{{department_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Atalhos",
      "item": [
        {
          "name": "Buscar atalhos",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/shortcuts",
              "host": ["{{base_url}}"],
              "path": ["shortcuts"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "title",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar atalho por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/shortcuts/{{shortcut_id}}",
              "host": ["{{base_url}}"],
              "path": ["shortcuts", "{{shortcut_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Criar atalho",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"title\": \"Saudação\",\n    \"key\": \"/saudacao\",\n    \"message\": \"Olá! Como posso ajudar você hoje?\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/shortcuts",
              "host": ["{{base_url}}"],
              "path": ["shortcuts"]
            }
          },
          "response": []
        },
        {
          "name": "Editar atalho",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"title\": \"Saudação Editada\",\n    \"key\": \"/saudacao\",\n    \"message\": \"Olá! Em que posso ajudar?\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/shortcuts/{{shortcut_id}}",
              "host": ["{{base_url}}"],
              "path": ["shortcuts", "{{shortcut_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar atalho",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/shortcuts/{{shortcut_id}}",
              "host": ["{{base_url}}"],
              "path": ["shortcuts", "{{shortcut_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Robôs",
      "item": [
        {
          "name": "Buscar robôs",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/robots",
              "host": ["{{base_url}}"],
              "path": ["robots"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "name",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar robô por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/robots/{{robot_id}}",
              "host": ["{{base_url}}"],
              "path": ["robots", "{{robot_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Criar robô",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Assistente de Vendas\",\n    \"color\": \"#10B981\",\n    \"description\": \"Robô para atendimento de vendas\",\n    \"basePrompt\": \"Você é um assistente de vendas...\",\n    \"model\": \"gpt-5-mini\",\n    \"canTag\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/robots",
              "host": ["{{base_url}}"],
              "path": ["robots"]
            }
          },
          "response": []
        },
        {
          "name": "Editar robô",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Robô Editado\",\n    \"color\": \"#10B981\",\n    \"description\": \"Descrição atualizada\",\n    \"basePrompt\": \"Você é um agente de IA...\",\n    \"notes\": \"Seja cordial...\",\n    \"security\": \"Não solicite CPFs\",\n    \"messageDelay\": \"5s\",\n    \"model\": \"gpt-5-mini\",\n    \"canTag\": true,\n    \"canDepartment\": true,\n    \"canSearchWeb\": true,\n    \"canClose\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/robots/{{robot_id}}",
              "host": ["{{base_url}}"],
              "path": ["robots", "{{robot_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar robô",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/robots/{{robot_id}}",
              "host": ["{{base_url}}"],
              "path": ["robots", "{{robot_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Conexão",
      "item": [
        {
          "name": "Dados da conexão",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/connection",
              "host": ["{{base_url}}"],
              "path": ["connection"]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar conexão",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"WhatsApp Principal\",\n    \"color\": \"#25D366\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/connection",
              "host": ["{{base_url}}"],
              "path": ["connection"]
            }
          },
          "response": []
        },
        {
          "name": "Pausar/Despausar conexão",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "url": {
              "raw": "{{base_url}}/connection/toggle",
              "host": ["{{base_url}}"],
              "path": ["connection", "toggle"]
            }
          },
          "response": []
        },
        {
          "name": "Sincronizar templates",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/connection/sync-templates",
              "host": ["{{base_url}}"],
              "path": ["connection", "sync-templates"]
            }
          },
          "response": []
        },
        {
          "name": "Gerar QRCode",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/connection/qrcode",
              "host": ["{{base_url}}"],
              "path": ["connection", "qrcode"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar conexão",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/connection",
              "host": ["{{base_url}}"],
              "path": ["connection"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Conversas",
      "item": [
        {
          "name": "Buscar conversas",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/chats",
              "host": ["{{base_url}}"],
              "path": ["chats"],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "20",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "open",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Criar conversa",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"clientId\": \"{{client_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/chats",
              "host": ["{{base_url}}"],
              "path": ["chats"]
            }
          },
          "response": []
        },
        {
          "name": "Buscar conversa por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/chats/{{chat_id}}",
              "host": ["{{base_url}}"],
              "path": ["chats", "{{chat_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Atualizar conversa",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"status\": \"closed\",\n    \"tagIds\": [],\n    \"operatorIds\": [],\n    \"departmentId\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/chats/{{chat_id}}",
              "host": ["{{base_url}}"],
              "path": ["chats", "{{chat_id}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Mensagens",
      "item": [
        {
          "name": "Buscar mensagens",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/chats/{{chat_id}}/messages",
              "host": ["{{base_url}}"],
              "path": ["chats", "{{chat_id}}", "messages"],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "50",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "before",
                  "value": "",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "after",
                  "value": "",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Enviar mensagem de texto",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"content\": \"Olá! Como posso ajudar?\",\n    \"type\": \"text\",\n    \"tempId\": \"temp-123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/chats/{{chat_id}}/messages",
              "host": ["{{base_url}}"],
              "path": ["chats", "{{chat_id}}", "messages"]
            }
          },
          "response": []
        },
        {
          "name": "Enviar mensagem de template",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"type\": \"template\",\n    \"templateId\": \"{{template_id}}\",\n    \"variables\": { \"1\": \"João\" },\n    \"tempId\": \"temp-456\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/chats/{{chat_id}}/messages",
              "host": ["{{base_url}}"],
              "path": ["chats", "{{chat_id}}", "messages"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Bases Complexas",
      "item": [
        {
          "name": "Buscar bases complexas",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases",
              "host": ["{{base_url}}"],
              "path": ["complexBases"],
              "query": [
                {
                  "key": "listSearch",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "name",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "asc",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "perPage",
                  "value": "20",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Criar base complexa",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Produtos\",\n    \"color\": \"#3B82F6\",\n    \"icon\": \"Database\",\n    \"description\": \"Catálogo de produtos\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases",
              "host": ["{{base_url}}"],
              "path": ["complexBases"]
            }
          },
          "response": []
        },
        {
          "name": "Buscar base complexa por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}",
              "host": ["{{base_url}}"],
              "path": ["complexBases", "{{complex_base_id}}"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "createdAt",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "desc",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "perPage",
                  "value": "20",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "filters",
                  "value": "",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Editar base complexa",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Produtos Editado\",\n    \"color\": \"#10B981\",\n    \"icon\": \"Box\",\n    \"description\": \"Descrição atualizada\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}",
              "host": ["{{base_url}}"],
              "path": ["complexBases", "{{complex_base_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Deletar base complexa",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}",
              "host": ["{{base_url}}"],
              "path": ["complexBases", "{{complex_base_id}}"]
            }
          },
          "response": []
        },
        {
          "name": "Listar objetos",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects",
              "host": ["{{base_url}}"],
              "path": ["complexBases", "{{complex_base_id}}", "objects"],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "createdAt",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "direction",
                  "value": "desc",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "perPage",
                  "value": "20",
                  "type": "text",
                  "disabled": true
                },
                {
                  "key": "filters",
                  "value": "",
                  "type": "text",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Criar objeto",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"data\": {\n        \"nome\": \"Camiseta\",\n        \"preco\": 49.9,\n        \"estoque\": 120\n    },\n    \"externalId\": \"SKU-001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects",
              "host": ["{{base_url}}"],
              "path": ["complexBases", "{{complex_base_id}}", "objects"]
            }
          },
          "response": []
        },
        {
          "name": "Buscar objeto por ID",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/{{object_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "{{object_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Editar objeto",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"data\": {\n        \"preco\": 39.9,\n        \"estoque\": 80\n    },\n    \"externalId\": \"SKU-001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/{{object_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "{{object_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Deletar objeto",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/{{object_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "{{object_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Buscar objeto por externalId",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/byExternalId/{{external_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "byExternalId",
                "{{external_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Upsert objeto por externalId",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "PUT",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"data\": {\n        \"nome\": \"Camiseta\",\n        \"preco\": 49.9,\n        \"estoque\": 120\n    }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/byExternalId/{{external_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "byExternalId",
                "{{external_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Deletar objeto por externalId",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/byExternalId/{{external_id}}",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "byExternalId",
                "{{external_id}}"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Consultar objetos (query)",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{s4ilor_token}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"filter\": { \"data.estoque\": { \"$gt\": 0 } },\n    \"sort\": { \"data.preco\": 1 },\n    \"limit\": 50,\n    \"skip\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/complexBases/{{complex_base_id}}/objects/query",
              "host": ["{{base_url}}"],
              "path": [
                "complexBases",
                "{{complex_base_id}}",
                "objects",
                "query"
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [""]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [""]
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": ""
    },
    {
      "key": "s4ilor_token",
      "value": ""
    },
    {
      "key": "user_id",
      "value": ""
    },
    {
      "key": "client_id",
      "value": ""
    },
    {
      "key": "tag_id",
      "value": ""
    },
    {
      "key": "department_id",
      "value": ""
    },
    {
      "key": "shortcut_id",
      "value": ""
    },
    {
      "key": "robot_id",
      "value": ""
    },
    {
      "key": "chat_id",
      "value": ""
    },
    {
      "key": "template_id",
      "value": ""
    },
    {
      "key": "complex_base_id",
      "value": ""
    },
    {
      "key": "object_id",
      "value": ""
    },
    {
      "key": "external_id",
      "value": ""
    }
  ]
}
