domain
Reference

Webhook events

Schema-v1 event names and the connection changes they represent.

Webhook delivery is optional. When configured, Domain0 sends connection events to your HTTPS endpoint. Verify the untouched delivery before parsing or using any field.

Envelope

Every verified event contains:

FieldMeaning
schemaVersionEnvelope contract version; currently 1
eventIdStable event identity for deduplication
typeEvent name from the catalog below
connectionIdConnection that produced the event
applicationIdOwning Domain0 application
tenantIdOwning tenant
sequencePositive connection event sequence
occurredAtISO timestamp for the domain event
attributesBounded string attributes for this event

Event catalog

TypeMeaning
connection.requestedA connection intent was created
provider.detection_startedProvider discovery started
provider.selectedA provider was detected or selected
authorization.requiredCustomer authorization is required
domain_connect.startedProvider-hosted Domain Connect consent started
domain_connect.submittedDomain Connect consent returned for verification
authorization.completedProvider authorization completed
connection.planning_startedCurrent DNS is being read for planning
connection.plan_preparedAn exact DNS change plan is ready
connection.planning_restartedPlanning restarted with current provider state
connection.already_configuredExisting DNS already satisfies the effective intent
connection.plan_confirmedThe customer confirmed the plan
connection.changes_appliedConfirmed provider changes were submitted
connection.propagation_checkedAuthoritative DNS was checked
connection.propagation_timed_outRequired DNS records did not propagate within 72 hours
connection.activatedEvery required record is authoritative
connection.manual_requiredGuided setup is required
connection.manual_submittedThe customer reported completing guided setup
connection.failed_retryableA classified temporary failure was saved
connection.retry_startedThe retry path resumed from its checkpoint
connection.cancelledThe connection was cancelled

Exhaustive handling

import type { Domain0WebhookEvent } from 'domain0/contracts'

function applyDomain0Event(event: Domain0WebhookEvent) {
  switch (event.type) {
    case 'connection.activated':
      return markDomainActive(event.connectionId)
    case 'connection.cancelled':
      return markDomainCancelled(event.connectionId)
    default:
      return recordConnectionProgress(event)
  }
}

Store eventId and your product mutation in one transaction. See the webhook guide for a receiver and webhook security for signature verification rules.

On this page