ContractSpec docs

OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

AI index

WhatsApp Twilio

Twilio WhatsApp support provides a durable fallback channel with signature verification and outbox-backed outbound dispatch.

Required secrets and config

// secret payload { "accountSid": "AC123", "authToken": "..." } // optional connection config { "fromNumber": "whatsapp:+15550002" }

Webhook ingress

  • Inbound Twilio form payloads are accepted on

    /webhooks/whatsapp/twilio

    .

  • Signatures are validated with

    x-twilio-signature

    and the configured auth token.

  • For deterministic verification, set the exact public webhook URL in

    WHATSAPP_TWILIO_WEBHOOK_URL

    .

Workspace mapping

CHANNEL_WORKSPACE_MAP_WHATSAPP_TWILIO={"AC123":"workspace-acme"}

Best practices

  • Use Twilio as fallback when Meta WhatsApp is your primary route.

  • Keep account SID mapping explicit to avoid tenant misrouting.

  • Protect internal dispatch endpoints with

    CHANNEL_DISPATCH_TOKEN

    .