> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview a campaign launch (dry run)

> Returns a read-only snapshot of what would happen if the campaign launched right now — resolved audience size with the suppressed / opted-out / unreachable / held-out / deliverable breakdown, projected cost against the wallet balance (from the same pricing lane the send path bills on), a quiet-hours skip estimate, the channel-fallback waterfall with provider readiness, personalization coverage, non-blocking warnings, and a `ready_to_launch` verdict. It never mutates state, never touches the wallet, and never enqueues a job — safe to call on every keystroke of the launch wizard. No request body fields are read.



## OpenAPI

````yaml /openapi.yaml post /api/v1/campaigns/{id}/dry-run
openapi: 3.1.0
info:
  title: Devotel CPaaS API
  description: Orbit by Devotel — Communications Platform as a Service API
  version: 1.0.0
  contact:
    name: Devotel
    url: https://devotel.io
    email: support@devotel.io
  license:
    name: Proprietary
servers:
  - url: https://api.orbit.devotel.io
    description: Production
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Messages
    description: >-
      Send and manage messages across all channels (SMS, WhatsApp, RCS, Email,
      Viber, etc.)
  - name: Fax
    description: >-
      List and track fax (MMS/T.38) transmissions on Telnyx-backed fax numbers
      (sending flows through the Messaging API)
  - name: Agents
    description: AI agent creation, configuration, and execution
  - name: Voice
    description: Voice calls, IVR, conferencing, and SIP trunking
  - name: OnCall
    description: On-call rotations and escalation policy planning for incident alerting
  - name: Webhooks
    description: Webhook endpoint management and delivery logs
  - name: Numbers
    description: Phone number search, provisioning, and configuration
  - name: Brand Identity
    description: >-
      Unified cross-channel brand trust posture (10DLC, toll-free, WhatsApp,
      RCS, branded calling, number KYC)
  - name: Contacts
    description: Contact management, segmentation, and lifecycle tracking
  - name: Campaigns
    description: Marketing campaign orchestration and analytics
  - name: Flows
    description: Automation flow builder and execution engine
  - name: Templates
    description: Message template management and approval workflows
  - name: Settings
    description: Organization, channel, and user preference settings
  - name: Verify
    description: OTP generation and verification across channels
  - name: Push
    description: Push notification delivery via FCM and APNs
  - name: Integrations
    description: Third-party service connections and OAuth management
  - name: CDP
    description: >-
      Customer Data Platform — activation surface (CRM object sync, streaming
      destinations, ad-audience activation)
  - name: Files
    description: >-
      Server-to-server media upload, listing, retrieval, and deletion
      (signed-URL backed)
  - name: Commerce
    description: >-
      Omnichannel conversational-commerce — persistent cart + checkout state
      machine, channel-agnostic hosted pay-by-link, native WhatsApp checkout,
      and AP2-style agent payment mandates.
  - name: Sync
    description: >-
      Real-time shared-state primitive (Twilio Sync parity) — Documents, Maps,
      Lists, and ephemeral Streams, with change events relayed over the
      /api/v1/ws/sync WebSocket gateway
  - name: Risk
    description: >-
      Unified cross-channel Trust & Fraud risk scoring — fuses SMS-pumping,
      URL-reputation, Verify Fraud Guard, and Voice Biometrics signals into one
      composite verdict queryable before a send or a call.
  - name: Orby
    description: >-
      In-dashboard Orby operator assistant: streamed assistant turns,
      conversation threads, product knowledge-base search, and the tool-action
      approval gate. Available to signed-in operators only (dashboard session
      auth — API-key requests are rejected).
paths:
  /api/v1/campaigns/{id}/dry-run:
    post:
      tags:
        - Campaigns
      summary: Preview a campaign launch (dry run)
      description: >-
        Returns a read-only snapshot of what would happen if the campaign
        launched right now — resolved audience size with the suppressed /
        opted-out / unreachable / held-out / deliverable breakdown, projected
        cost against the wallet balance (from the same pricing lane the send
        path bills on), a quiet-hours skip estimate, the channel-fallback
        waterfall with provider readiness, personalization coverage,
        non-blocking warnings, and a `ready_to_launch` verdict. It never mutates
        state, never touches the wallet, and never enqueues a job — safe to call
        on every keystroke of the launch wizard. No request body fields are
        read.
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              description: No body fields are read — send an empty object.
              additionalProperties: false
      responses:
        '200':
          description: >-
            Pre-launch preview — audience breakdown, projected cost, quiet-hours
            estimate, provider readiness, warnings, and the launch verdict.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      campaign_id:
                        type: string
                      channel:
                        type: string
                        nullable: true
                      evaluated_at:
                        type: string
                        format: date-time
                      audience:
                        type: object
                        properties:
                          total_in_audience:
                            type: integer
                          suppressed:
                            type: integer
                          opted_out:
                            type: integer
                          unreachable:
                            type: integer
                            description: >-
                              Contacts with no deliverable address for the
                              channel.
                          held_out:
                            type: integer
                            description: >-
                              Contacts carved into the campaign-level control
                              holdout.
                          deliverable:
                            type: integer
                            description: >-
                              Addressable, not-suppressed, not-opted-out,
                              not-held-out recipients.
                          audience_type:
                            type: string
                          audience_id:
                            type: string
                            nullable: true
                      cost:
                        type: object
                        nullable: true
                        description: >-
                          Null when no channel is selected or the deliverable
                          audience is 0.
                        properties:
                          unit_price_cents:
                            type: integer
                          total_cents:
                            type: integer
                          balance_cents:
                            type: integer
                          sufficient:
                            type: boolean
                          formatted_total_usd:
                            type: string
                          formatted_balance_usd:
                            type: string
                          currency:
                            type: string
                      quiet_hours:
                        type: object
                        description: >-
                          Recipient-local quiet-hours skip projection from a
                          bounded sample.
                        properties:
                          enabled:
                            type: boolean
                          skipped_estimate:
                            type: integer
                          sample_size:
                            type: integer
                          sample_skipped:
                            type: integer
                      channel_waterfall:
                        type: object
                        nullable: true
                        description: >-
                          Primary channel plus configured cross-channel fallback
                          chain with per-step provider/connection state.
                        properties:
                          primary:
                            type: string
                          primary_provider_available:
                            type: boolean
                            description: >-
                              Platform provider-class registration for the
                              primary channel — NOT the tenant's own connection
                              state.
                          primary_channel_connected:
                            type: boolean
                            nullable: true
                            description: >-
                              Whether THIS tenant has actually connected the
                              primary channel (a dedicated sending number for
                              SMS/MMS). `false` = not connected — the campaign
                              would send from the shared Devotel sender. `null`
                              = no connection signal for this channel
                              (WhatsApp/RCS/voice/email connection is gated by a
                              separate approval flow this preview does not
                              probe).
                          primary_sender:
                            type: object
                            nullable: true
                            description: >-
                              Resolved SMS/MMS sender identity the send path
                              would originate from. `null` for non-SMS/MMS
                              channels, whose recipient-visible sender (a
                              branded name, WABA, or email from-name) this
                              preview does not resolve.
                            properties:
                              identity:
                                type: string
                              type:
                                type: string
                                enum:
                                  - dedicated
                                  - shared
                          cross_channel_fallback:
                            type: array
                            items:
                              type: string
                          cross_channel_fallback_available:
                            type: array
                            items:
                              type: object
                              properties:
                                channel:
                                  type: string
                                provider_available:
                                  type: boolean
                                channel_connected:
                                  type: boolean
                                  nullable: true
                                  description: >-
                                    Whether THIS tenant has actually connected
                                    this fallback channel. `false` = not
                                    connected (the fallback would send from the
                                    shared sender); `null` = no connection
                                    signal for this channel.
                      personalization:
                        type: object
                        nullable: true
                        description: >-
                          Merge-tag ({{variable}}) validation for the message
                          body — which variables resolve, which are unresolved
                          (render blank), and per-field audience data coverage.
                        properties:
                          variables:
                            type: array
                            items:
                              type: string
                          unresolved:
                            type: array
                            items:
                              type: string
                            description: >-
                              {{…}} tokens that are not a recognised contact
                              field, {{coupon_code}}, or a campaign variable —
                              these render blank for every recipient.
                          coverage:
                            type: array
                            items:
                              type: object
                              properties:
                                variable:
                                  type: string
                                field:
                                  type: string
                                present:
                                  type: integer
                                  description: >-
                                    Count of sampled recipients whose contact
                                    row carries a value for this field.
                                sampled:
                                  type: integer
                      provider_readiness:
                        type: object
                        nullable: true
                        description: >-
                          Enumerated pre-launch provider-readiness check set
                          (channel selection, route/provider registration,
                          channel connection, sender identity, and each
                          configured fallback step). The aggregate `status`
                          fails CLOSED — any `fail` check makes it `blocked`,
                          any `unknown` check (or an empty check list) makes it
                          `unverified`; it is `pass` only when every enumerated
                          check passed. This is a read-only advisory: an
                          unconnected channel still sends via the shared Devotel
                          softswitch sender (invariant #45) and nothing here
                          gates the send path.
                        properties:
                          status:
                            type: string
                            enum:
                              - pass
                              - blocked
                              - unverified
                          checks:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                label:
                                  type: string
                                status:
                                  type: string
                                  enum:
                                    - pass
                                    - fail
                                    - unknown
                                detail:
                                  type: string
                                structural:
                                  type: boolean
                                  description: >-
                                    Set on an `unknown` check when the dimension
                                    is PERMANENTLY unverifiable for this channel
                                    (e.g. WhatsApp/RCS/voice/email connection,
                                    gated by a separate approval flow) as
                                    opposed to a transient probe failure that a
                                    re-run can resolve.
                      warnings:
                        type: array
                        items:
                          type: string
                      ready_to_launch:
                        type: boolean
                        description: >-
                          True only when there are no warnings, the deliverable
                          audience is non-empty, the wallet balance covers the
                          projected cost, and the provider_readiness check set
                          actually passed (status "pass") — an unverified or
                          blocked provider-readiness result can no longer ride
                          the "no warnings" conjunct into a green all-clear.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '404':
          description: Campaign not found.
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Dashboard JWT token from Clerk
    ApiKey:
      type: apiKey
      name: X-API-Key
      in: header
      description: Server-to-server API key (dv_live_sk_*)

````