{
  "info": {
    "name": "Pushfy API",
    "description": "Coleção oficial da API Pushfy (SMS, RCS, Voz, Status, Saldo). Defina as variáveis `baseUrl` e `token`.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{token}}", "type": "string" }]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://portal.pushfy.com" },
    { "key": "token", "value": "SEU_TOKEN" }
  ],
  "item": [
    {
      "name": "SMS: Enviar (POST /webapi)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{baseUrl}}/webapi", "host": ["{{baseUrl}}"], "path": ["webapi"] },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"messages\": [{\n    \"destinations\": [{ \"to\": \"5511999999999\" }],\n    \"from\": \"pushSMS\",\n    \"text\": \"Ola! Seu codigo Pushfy e 4823.\",\n    \"ext_id\": \"welcome-001\"\n  }]\n}"
        },
        "description": "Envia SMS. Resposta: { accepted, queued }."
      }
    },
    {
      "name": "Voz: Criar áudio (POST /audio)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{baseUrl}}/audio", "host": ["{{baseUrl}}"], "path": ["audio"] },
        "body": { "mode": "raw", "raw": "{\n  \"nome\": \"meu-audio\"\n}" },
        "description": "Sobe/registra um audio para uso em ligacoes de voz."
      }
    },
    {
      "name": "Voz: Enviar ligação (POST /webapi)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{baseUrl}}/webapi", "host": ["{{baseUrl}}"], "path": ["webapi"] },
        "body": { "mode": "raw", "raw": "{\n  \"messages\": [{\n    \"destinations\": [{ \"to\": \"5511999999999\" }],\n    \"from\": \"pushVoice\",\n    \"audio\": \"meu-audio\"\n  }]\n}" },
        "description": "Envia uma ligacao de voz tocando o audio informado."
      }
    },
    {
      "name": "RCS: Enviar (POST /rcs)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{baseUrl}}/rcs", "host": ["{{baseUrl}}"], "path": ["rcs"] },
        "body": { "mode": "raw", "raw": "{\n  \"messages\": [{\n    \"destinations\": [{ \"to\": \"5511999999999\" }],\n    \"text\": \"Mensagem RCS\"\n  }]\n}" },
        "description": "Envia RCS (Single/Basic)."
      }
    },
    {
      "name": "Contatos: Cadastrar (POST /contact)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": { "raw": "{{baseUrl}}/contact", "host": ["{{baseUrl}}"], "path": ["contact"] },
        "body": { "mode": "raw", "raw": "{\n  \"name\": \"Fulano\",\n  \"phone\": \"5511999999999\"\n}" }
      }
    },
    {
      "name": "Status: Consultar (GET /getstatus)",
      "request": {
        "method": "GET",
        "url": { "raw": "{{baseUrl}}/getstatus?ext_id=welcome-001", "host": ["{{baseUrl}}"], "path": ["getstatus"], "query": [{ "key": "ext_id", "value": "welcome-001" }] }
      }
    },
    {
      "name": "Relatório por data (GET /reportbydate)",
      "request": {
        "method": "GET",
        "url": { "raw": "{{baseUrl}}/reportbydate?date=2026-07-14", "host": ["{{baseUrl}}"], "path": ["reportbydate"], "query": [{ "key": "date", "value": "2026-07-14" }] }
      }
    },
    {
      "name": "Saldo SMS (GET /balance)",
      "request": {
        "method": "GET",
        "url": { "raw": "{{baseUrl}}/balance", "host": ["{{baseUrl}}"], "path": ["balance"] },
        "description": "Resposta: { status: 'success', balance: 1500 }."
      }
    },
    {
      "name": "Saldo Voz (GET /balancetvoz)",
      "request": {
        "method": "GET",
        "url": { "raw": "{{baseUrl}}/balancetvoz", "host": ["{{baseUrl}}"], "path": ["balancetvoz"] }
      }
    }
  ]
}
