apime

module
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT

README

🇺🇸 Read in English

Api em Go para orquestrar múltiplas instâncias.

Baseada na biblioteca WhatsMeow com dashboard e eventos via Webhooks.

  1. Configurar o ambiente:

    cp .env.example .env
    

    (Edite o .env conforme necessário).

  2. Iniciar os containers:

    docker compose up -d
    

    Importante: As migrations e o usuário administrador inicial são criados automaticamente no primeiro boot.

Acesso

  • Dashboard: http://localhost:8080/dashboard
  • Email: admin@apime.local
  • Senha: admin123

Para começar com outro e-mail e senha, defina ADMIN_EMAIL e ADMIN_PASSWORD no .env antes do primeiro boot. Em servidor exposto à internet, faça isso ou troque a senha no primeiro acesso.

Imagem pronta

Cada push na main gera uma release e publica ghcr.io/open-apime/apime:<versão> (amd64 e arm64). As notas de cada versão ficam em Releases.

  • API Specification: openapi.yaml

SDK oficial (Node/TypeScript)

Cliente tipado para quem integra em Node, com retry, verificação de webhook e as 66 operações da API: @open-apime/sdk.

npm install @open-apime/sdk
import { Apime } from "@open-apime/sdk";

const conexao = Apime.withInstanceToken(
  { token: process.env.INSTANCE_TOKEN!, instanceId: "abc-123" },
  { baseUrl: "https://apime.example.com" },
);

await conexao.messages.sendText(
  { to: "5511999999999", text: "Olá" },
  { idempotencyKey: mensagem.id },
);

Sem Node, a API é HTTP comum: o openapi.yaml descreve tudo.

Documentação

Doc Assunto
docs/dashboard.md interface web, autenticação e rotas de admin
docs/webhook-payloads.md envelope, assinatura HMAC e os tipos de evento
docs/idempotency.md repetir envio sem duplicar mensagem
docs/users.md usuários e tokens
docs/media.md mídia
docs/phone-numbers.md números e JIDs
docs/whatsapp-advanced.md grupos, newsletters e privacidade
docs/health-check.md health check

Directories

Path Synopsis
cmd
api command
migrate command
internal
app
pkg/sentryx
Package sentryx is a thin wrapper over github.com/getsentry/sentry-go that centralizes initialization, silent no-op when SENTRY_DSN is not set, capture of whatsmeow errors (via zap hook) and the Gin middleware.
Package sentryx is a thin wrapper over github.com/getsentry/sentry-go that centralizes initialization, silent no-op when SENTRY_DSN is not set, capture of whatsmeow errors (via zap hook) and the Gin middleware.
voip
Package voip holds the call types shared by the session manager (which drives the engine) and the webhook layer (which turns them into call.* events), so neither has to import the other.
Package voip holds the call types shared by the session manager (which drives the engine) and the webhook layer (which turns them into call.* events), so neither has to import the other.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL