{
  "info": {
    "name": "Connect — API nativa",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:3417"
    },
    {
      "key": "instance_id",
      "value": "PREENCHA"
    },
    {
      "key": "token",
      "value": "PREENCHA"
    },
    {
      "key": "test_phone",
      "value": "PREENCHA_DESTINO_AUTORIZADO"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Estado da instância",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/api/instances/{{instance_id}}",
        "header": []
      }
    },
    {
      "name": "Enviar texto autorizado",
      "request": {
        "method": "POST",
        "url": "{{base_url}}/api/instances/{{instance_id}}/messages",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "teste-postman-001"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"phone\": \"{{test_phone}}\",\n  \"type\": \"text\",\n  \"text\": \"Teste de integra\\u00e7\\u00e3o autorizado\"\n}"
        }
      }
    },
    {
      "name": "Mensagens enviadas",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/api/instances/{{instance_id}}/messages",
        "header": []
      }
    },
    {
      "name": "Mensagens recebidas",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/api/instances/{{instance_id}}/incoming",
        "header": []
      }
    },
    {
      "name": "Eventos",
      "request": {
        "method": "GET",
        "url": "{{base_url}}/api/instances/{{instance_id}}/events",
        "header": []
      }
    }
  ]
}
