{
  "info": {
    "name": "SendCloud API",
    "description": "Coleção completa da API REST do SendCloud — plataforma de email transacional. Base URL: https://api.sendcloud.dev.br\n\nAutenticação: todas as requisições exigem o header `Authorization: Bearer {{apiKey}}`.\n\nConfigure as variáveis de ambiente `baseUrl` e `apiKey` antes de usar.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.sendcloud.dev.br", "type": "string" },
    { "key": "apiKey",  "value": "sk_live_SUA_CHAVE_AQUI",       "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{apiKey}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Signup",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/auth/signup", "host": ["{{baseUrl}}"], "path": ["v1","auth","signup"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Minha Empresa\",\n  \"email\": \"contato@minhaempresa.com.br\",\n  \"password\": \"senhaSegura123\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/auth/login", "host": ["{{baseUrl}}"], "path": ["v1","auth","login"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"contato@minhaempresa.com.br\",\n  \"password\": \"senhaSegura123\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Esqueci a senha",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/auth/forgot-password", "host": ["{{baseUrl}}"], "path": ["v1","auth","forgot-password"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"contato@minhaempresa.com.br\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Redefinir senha",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/auth/reset-password", "host": ["{{baseUrl}}"], "path": ["v1","auth","reset-password"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"token\": \"TOKEN_DO_EMAIL\",\n  \"newPassword\": \"novaSenhaSegura123\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        }
      ]
    },
    {
      "name": "Emails",
      "item": [
        {
          "name": "Enviar email",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/emails/send", "host": ["{{baseUrl}}"], "path": ["v1","emails","send"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"destinatario@exemplo.com\",\n  \"from\": \"noreply@seudominio.com\",\n  \"subject\": \"Assunto do email\",\n  \"html\": \"<h1>Olá!</h1><p>Corpo do email.</p>\",\n  \"tags\": [\"transacional\"],\n  \"metadata\": { \"userId\": \"123\" }\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Enviar com template",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/emails/send", "host": ["{{baseUrl}}"], "path": ["v1","emails","send"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"destinatario@exemplo.com\",\n  \"from\": \"noreply@seudominio.com\",\n  \"templateId\": \"tpl_abc123\",\n  \"templateData\": { \"nome\": \"João\", \"link\": \"https://exemplo.com/confirmar\" }\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Enviar agendado",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/emails/send", "host": ["{{baseUrl}}"], "path": ["v1","emails","send"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"destinatario@exemplo.com\",\n  \"from\": \"noreply@seudominio.com\",\n  \"subject\": \"Email agendado\",\n  \"html\": \"<p>Enviado no horário certo!</p>\",\n  \"scheduledFor\": \"2026-06-01T09:00:00.000Z\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Envio em lote (batch)",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/emails/batch", "host": ["{{baseUrl}}"], "path": ["v1","emails","batch"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"noreply@seudominio.com\",\n  \"templateId\": \"tpl_abc123\",\n  \"recipients\": [\n    { \"to\": \"joao@exemplo.com\", \"templateData\": { \"nome\": \"João\" } },\n    { \"to\": \"maria@exemplo.com\", \"templateData\": { \"nome\": \"Maria\" } }\n  ]\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Listar emails",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/emails?page=1&limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["v1","emails"],
              "query": [
                { "key": "page",   "value": "1" },
                { "key": "limit",  "value": "20" },
                { "key": "status", "value": "delivered", "disabled": true },
                { "key": "search", "value": "",           "disabled": true }
              ]
            }
          }
        },
        {
          "name": "Detalhe do email",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/emails/:id", "host": ["{{baseUrl}}"], "path": ["v1","emails",":id"], "variable": [{ "key": "id", "value": "EMAIL_ID" }] }
          }
        },
        {
          "name": "Linha do tempo do email",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/emails/:id/events", "host": ["{{baseUrl}}"], "path": ["v1","emails",":id","events"], "variable": [{ "key": "id", "value": "EMAIL_ID" }] }
          }
        },
        {
          "name": "Reenviar email",
          "request": {
            "method": "POST",
            "url": { "raw": "{{baseUrl}}/v1/emails/:id/resend", "host": ["{{baseUrl}}"], "path": ["v1","emails",":id","resend"], "variable": [{ "key": "id", "value": "EMAIL_ID" }] }
          }
        },
        {
          "name": "Cancelar email agendado",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/emails/:id", "host": ["{{baseUrl}}"], "path": ["v1","emails",":id"], "variable": [{ "key": "id", "value": "EMAIL_ID" }] }
          }
        },
        {
          "name": "Exportar CSV",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/emails/export",
              "host": ["{{baseUrl}}"],
              "path": ["v1","emails","export"],
              "query": [
                { "key": "status", "value": "bounced", "disabled": true },
                { "key": "from",   "value": "2026-01-01T00:00:00Z", "disabled": true },
                { "key": "to",     "value": "2026-01-31T23:59:59Z", "disabled": true }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Templates",
      "item": [
        {
          "name": "Criar template",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/templates", "host": ["{{baseUrl}}"], "path": ["v1","templates"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Boas-vindas\",\n  \"subject\": \"Bem-vindo, {{nome}}!\",\n  \"htmlContent\": \"<h1>Olá, {{nome}}!</h1><p>Obrigado por se cadastrar.</p>\",\n  \"textContent\": \"Olá, {{nome}}! Obrigado por se cadastrar.\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Listar templates",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/templates", "host": ["{{baseUrl}}"], "path": ["v1","templates"] }
          }
        },
        {
          "name": "Preview do template",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/templates/:id/preview", "host": ["{{baseUrl}}"], "path": ["v1","templates",":id","preview"], "variable": [{ "key": "id", "value": "TEMPLATE_ID" }] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"data\": {\n    \"nome\": \"João\",\n    \"link\": \"https://exemplo.com/confirmar/abc123\"\n  }\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Excluir template",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/templates/:id", "host": ["{{baseUrl}}"], "path": ["v1","templates",":id"], "variable": [{ "key": "id", "value": "TEMPLATE_ID" }] }
          }
        }
      ]
    },
    {
      "name": "Domínios",
      "item": [
        {
          "name": "Adicionar domínio",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/domains", "host": ["{{baseUrl}}"], "path": ["v1","domains"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"domain\": \"minhaempresa.com.br\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Listar domínios",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/domains", "host": ["{{baseUrl}}"], "path": ["v1","domains"] }
          }
        },
        {
          "name": "Verificar domínio",
          "request": {
            "method": "POST",
            "url": { "raw": "{{baseUrl}}/v1/domains/:id/verify", "host": ["{{baseUrl}}"], "path": ["v1","domains",":id","verify"], "variable": [{ "key": "id", "value": "DOMAIN_ID" }] }
          }
        },
        {
          "name": "Excluir domínio",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/domains/:id", "host": ["{{baseUrl}}"], "path": ["v1","domains",":id"], "variable": [{ "key": "id", "value": "DOMAIN_ID" }] }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Criar webhook",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/webhooks", "host": ["{{baseUrl}}"], "path": ["v1","webhooks"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://suaapi.com/webhook\",\n  \"events\": [\"delivered\", \"bounced\", \"opened\", \"clicked\", \"unsubscribed\"]\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Listar webhooks",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/webhooks", "host": ["{{baseUrl}}"], "path": ["v1","webhooks"] }
          }
        },
        {
          "name": "Atualizar webhook",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/webhooks/:id", "host": ["{{baseUrl}}"], "path": ["v1","webhooks",":id"], "variable": [{ "key": "id", "value": "WEBHOOK_ID" }] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"active\": false\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Excluir webhook",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/webhooks/:id", "host": ["{{baseUrl}}"], "path": ["v1","webhooks",":id"], "variable": [{ "key": "id", "value": "WEBHOOK_ID" }] }
          }
        }
      ]
    },
    {
      "name": "API Keys",
      "item": [
        {
          "name": "Listar API Keys",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/api-keys", "host": ["{{baseUrl}}"], "path": ["v1","api-keys"] }
          }
        },
        {
          "name": "Criar API Key",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/api-keys", "host": ["{{baseUrl}}"], "path": ["v1","api-keys"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Produção\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Excluir API Key",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/api-keys/:id", "host": ["{{baseUrl}}"], "path": ["v1","api-keys",":id"], "variable": [{ "key": "id", "value": "KEY_ID" }] }
          }
        }
      ]
    },
    {
      "name": "Supressões",
      "item": [
        {
          "name": "Listar supressões",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/suppressions?page=1&limit=50",
              "host": ["{{baseUrl}}"],
              "path": ["v1","suppressions"],
              "query": [
                { "key": "page",  "value": "1" },
                { "key": "limit", "value": "50" }
              ]
            }
          }
        },
        {
          "name": "Adicionar supressão",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/suppressions", "host": ["{{baseUrl}}"], "path": ["v1","suppressions"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"usuario@exemplo.com\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        },
        {
          "name": "Remover supressão",
          "request": {
            "method": "DELETE",
            "url": { "raw": "{{baseUrl}}/v1/suppressions/:id", "host": ["{{baseUrl}}"], "path": ["v1","suppressions",":id"], "variable": [{ "key": "id", "value": "SUPPRESSION_ID" }] }
          }
        }
      ]
    },
    {
      "name": "Analytics",
      "item": [
        {
          "name": "Totais e taxas",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/analytics",
              "host": ["{{baseUrl}}"],
              "path": ["v1","analytics"],
              "query": [
                { "key": "from", "value": "2026-01-01T00:00:00Z", "disabled": true },
                { "key": "to",   "value": "2026-01-31T23:59:59Z", "disabled": true }
              ]
            }
          }
        },
        {
          "name": "Volume diário",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/analytics/daily?days=14",
              "host": ["{{baseUrl}}"],
              "path": ["v1","analytics","daily"],
              "query": [{ "key": "days", "value": "14" }]
            }
          }
        }
      ]
    },
    {
      "name": "Fila",
      "item": [
        {
          "name": "Estatísticas da fila",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/queue/stats", "host": ["{{baseUrl}}"], "path": ["v1","queue","stats"] }
          }
        }
      ]
    },
    {
      "name": "Workspace",
      "item": [
        {
          "name": "Dados do workspace",
          "request": {
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/v1/workspace", "host": ["{{baseUrl}}"], "path": ["v1","workspace"] }
          }
        },
        {
          "name": "Atualizar workspace",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": { "raw": "{{baseUrl}}/v1/workspace", "host": ["{{baseUrl}}"], "path": ["v1","workspace"] },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Minha Empresa Atualizada\"\n}",
              "options": { "raw": { "language": "json" } }
            }
          }
        }
      ]
    },
    {
      "name": "Health",
      "item": [
        {
          "name": "Health check",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "url": { "raw": "{{baseUrl}}/health", "host": ["{{baseUrl}}"], "path": ["health"] }
          }
        }
      ]
    }
  ]
}
