← Docs / Quickstart
Quickstart cURL
Para testes rápidos, scripts shell ou integração CI/CD. Substitua $SIMPLESMAIL_KEY pela sua chave.
1. Instalação
shell
# Nada para instalar. cURL já vem em macOS/Linux/WSL.
export SIMPLESMAIL_KEY=sm_live_...2. Hello world — enviar 1 email
shell
curl -X POST https://api.simplesmail.itbooster.com.br/v1/messages \
-H "Authorization: Bearer $SIMPLESMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "no-reply@suaempresa.com.br",
"fromName": "Sua Empresa",
"to": "cliente@exemplo.com",
"subject": "Bem-vindo!",
"html": "<h1>Olá!</h1><p>Sua conta foi criada.</p>"
}'3. Listar mensagens
shell
curl "https://api.simplesmail.itbooster.com.br/v1/messages?limit=50&status=delivered" \
-H "Authorization: Bearer $SIMPLESMAIL_KEY"4. Criar API key
shell
curl -X POST https://api.simplesmail.itbooster.com.br/v1/api-keys \
-H "Authorization: Bearer $SIMPLESMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Produção webhook"}'
# IMPORTANTE: o campo "key" só aparece nesta resposta. Guarde com segurança.5. Verificar domínio
shell
# 1) Cadastrar domínio
curl -X POST https://api.simplesmail.itbooster.com.br/v1/domains \
-H "Authorization: Bearer $SIMPLESMAIL_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "suaempresa.com.br"}'
# Resposta inclui dnsRecords (DKIM, SPF, DMARC) — publique todos no DNS.
# 2) Após publicar, forçar verificação:
curl -X POST https://api.simplesmail.itbooster.com.br/v1/domains/<DOMAIN_ID>/verify \
-H "Authorization: Bearer $SIMPLESMAIL_KEY"A resposta inclui os registros DNS (DKIM CNAME, SPF, DMARC) que você precisa publicar no provedor do domínio. Depois de publicar, chame POST /v1/domains/{id}/verify para forçar a verificação.
Próximos passos
- · Referência completa OpenAPI
- · Migrando do Resend, Postmark, SendGrid ou Mailgun
- · Webhooks de eventos (delivered, bounced, complained, opened, clicked) — disponíveis em
GET /v1/events