Skip to main content
GET
/
subscription
/
summary
curl --request GET \
  --url 'https://backend.testeswaffle.org/subscription/summary?format=executive' \
  --header 'Authorization: Bearer seu-token-jwt'
{
  "success": true,
  "data": {
    "overview": {
      "total_subscribers": 45230,
      "active_rate": 93.2,
      "monthly_growth": 7.8,
      "churn_rate": 2.1
    },
    "highlights": {
      "best_performing_newsletter": "thenews",
      "top_acquisition_source": "referral",
      "engagement_score": 82
    },
    "trends": {
      "growth_trend": "increasing",
      "seasonality": "higher_on_weekdays",
      "forecast_next_month": 48500
    },
    "recommendations": [
      {
        "priority": "high",
        "action": "Intensificar programa de referências",
        "impact": "Aumento de 15% em novas inscrições"
      },
      {
        "priority": "medium",
        "action": "Otimizar horário de envio para fins de semana",
        "impact": "Melhoria de 5% na taxa de abertura"
      }
    ],
    "generated_at": "2024-01-15T14:30:00Z"
  }
}

Descrição

Retorna um resumo consolidado das métricas de inscrição, ideal para dashboards e visões executivas. Requer autenticação e permissão subscription-metrics.view.

Query Parameters

format
string
Formato do resumo. Valores aceitos:
  • executive - Resumo executivo (padrão)
  • detailed - Resumo detalhado
  • minimal - Resumo mínimo

Headers

Authorization
string
required
Token JWT no formato: Bearer <token>\

Response

success
boolean
Indica se a operação foi bem-sucedida
data
object
Dados do resumo
curl --request GET \
  --url 'https://backend.testeswaffle.org/subscription/summary?format=executive' \
  --header 'Authorization: Bearer seu-token-jwt'
{
  "success": true,
  "data": {
    "overview": {
      "total_subscribers": 45230,
      "active_rate": 93.2,
      "monthly_growth": 7.8,
      "churn_rate": 2.1
    },
    "highlights": {
      "best_performing_newsletter": "thenews",
      "top_acquisition_source": "referral",
      "engagement_score": 82
    },
    "trends": {
      "growth_trend": "increasing",
      "seasonality": "higher_on_weekdays",
      "forecast_next_month": 48500
    },
    "recommendations": [
      {
        "priority": "high",
        "action": "Intensificar programa de referências",
        "impact": "Aumento de 15% em novas inscrições"
      },
      {
        "priority": "medium",
        "action": "Otimizar horário de envio para fins de semana",
        "impact": "Melhoria de 5% na taxa de abertura"
      }
    ],
    "generated_at": "2024-01-15T14:30:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

format
enum<string>
default:executive

Formato do resumo

Available options:
executive,
detailed,
minimal

Response

200 - application/json

Resumo obtido

success
boolean
data
object