← All guides

ALACTIC COMMUNICATION 24/7

Receive events reliably

Verify signatures, deduplicate deliveries and inspect retries without exposing private endpoints.

Create an endpoint

Select a project, enter a public HTTPS URL and choose event types. The receiver must be on port 443. Private, loopback, metadata, reserved and mixed public/private DNS answers are rejected. Host resolution is checked for each delivery and the validated address is pinned for that connection. Redirects are not followed.

The signing secret is shown once. Save it in your receiver’s secret store. Use the portal’s synthetic test before enabling real customer processing.

Event envelope

{
  "id": "unique-event-id",
  "type": "message.received",
  "createdAt": "2026-10-22T09:00:00Z",
  "projectId": "your-project-id",
  "data": {
    "phone": "12025550123",
    "messageId": "provider-message-id",
    "text": "Example inbound message",
    "status": "received"
  }
}
TypeMeaning
message.receivedAn inbound customer message was observed.
message.sentAn outbound message was observed or accepted.
message.statusMeta delivery/read/failure status changed.
template.statusA Meta template status update was observed.
webhook.testSynthetic portal test; never treat it as a customer message.

Verify the raw bytes

The X-Alactic-Signature header contains t=timestamp,v1=signature. Compute HMAC-SHA256 using your secret over the timestamp, a dot and the unchanged raw JSON bytes. Compare in constant time. Reject timestamps outside a short tolerance, such as five minutes. Each retry has a fresh timestamp and signature but the same event ID.

const crypto = require('node:crypto');
function verify(raw, header, secret) {
  const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
  if (!/^\d+$/.test(parts.t || '') ||
      Math.abs(Date.now()/1000 - Number(parts.t)) > 300 ||
      !/^[a-f0-9]{64}$/.test(parts.v1 || '')) return false;
  const expected = crypto.createHmac('sha256', secret)
    .update(parts.t + '.').update(raw).digest();
  return crypto.timingSafeEqual(expected, Buffer.from(parts.v1, 'hex'));
}

Acknowledge and deduplicate

Store the event ID in a unique database column or key before applying side effects. Return 2xx after durable acceptance, then process asynchronously. A delivery may repeat if the connection ends before Alactic receives your acknowledgement. Do not send a second customer message just because the same webhook arrives twice.

Your receiver has a ten-second delivery timeout. Responses are bounded; a redirect or non-2xx status is a failed attempt. Automatic retry uses increasing delays, starting at 30 seconds and capped at one hour, for up to eight attempts. Failed retained events can be requeued in the portal.

Priority and retention

Scale deliveries are selected ahead of ordinary queued deliveries. This is queue priority, not a guaranteed latency or delivery SLA. Delivery history follows the plan’s 7-, 30- or 90-day retention. Disable an endpoint to stop new deliveries to it; a network attempt already in progress may still finish.

Delivery history includes customer event payloads needed for retries. Apply the same privacy controls you use for conversations. The source event bridge depends on the running WhatsApp integration; use reconciliation and your own durable processing for business-critical workflows.