Skip to main content
POST
/
webhooks
/
beehiiv
/
subscription
curl --request POST \
  --url https://backend.testeswaffle.org/webhooks/beehiiv/subscription \
  --header 'Content-Type: application/json' \
  --header 'X-Beehiiv-Signature: sha256=...' \
  --data '{
    "event": "subscriber.created",
    "data": {
      "id": "bhv_123456",
      "email": "novo@assinante.com",
      "status": "active",
      "created_at": "2024-01-15T10:30:00Z",
      "publication_id": "pub_thenews",
      "utm_source": "instagram",
      "utm_medium": "social",
      "utm_campaign": "janeiro_2024"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }'
{
  "success": true,
  "data": {
    "processed": true,
    "event_id": "evt_abc123def456",
    "metrics_updated": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.thenewscc.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Descrição

Endpoint para receber webhooks do Beehiiv sobre eventos de inscrição. Este endpoint processa automaticamente eventos como novas inscrições, cancelamentos e atualizações de status.

Headers

X-Beehiiv-Signature
string
required
Assinatura HMAC para validação da autenticidade do webhook

Request Body

event
string
required
Tipo do evento. Valores possíveis:
  • subscriber.created - Nova inscrição
  • subscriber.updated - Atualização de assinante
  • subscriber.unsubscribed - Cancelamento
  • subscriber.resubscribed - Reinscrição
data
object
required
Dados do evento
timestamp
string
required
Timestamp do evento (ISO 8601)

Response

success
boolean
Indica se o webhook foi processado com sucesso
data
object
curl --request POST \
  --url https://backend.testeswaffle.org/webhooks/beehiiv/subscription \
  --header 'Content-Type: application/json' \
  --header 'X-Beehiiv-Signature: sha256=...' \
  --data '{
    "event": "subscriber.created",
    "data": {
      "id": "bhv_123456",
      "email": "novo@assinante.com",
      "status": "active",
      "created_at": "2024-01-15T10:30:00Z",
      "publication_id": "pub_thenews",
      "utm_source": "instagram",
      "utm_medium": "social",
      "utm_campaign": "janeiro_2024"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }'
{
  "success": true,
  "data": {
    "processed": true,
    "event_id": "evt_abc123def456",
    "metrics_updated": true
  }
}

Headers

X-Beehiiv-Signature
string
required

Assinatura HMAC para validação

Body

application/json
event
enum<string>
required
Available options:
subscriber.created,
subscriber.updated,
subscriber.unsubscribed,
subscriber.resubscribed
data
object
required
timestamp
string<date-time>
required

Response

200 - application/json

Webhook processado

success
boolean
data
object