Skip to content

Send or schedule a campaign

View .md
POST

Same review rules as POST /v1/broadcasts/{broadcastId}/send: a WhatsApp campaign on an approved template starts directly, email starts once automated review passes, other channels wait for a person. Omit scheduledAt to send now.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • campaignIdstringrequired

    Campaign ID. The same ID works as broadcastId on /v1.

Body

application/json · optional

  • scheduledAtstring<date-time>

    Schedule for future delivery. Omit to send immediately.

Responses

202Submitted for review, scheduled, or started.
  • campaignobjectrequired

    A campaign. The same object as a /v1 broadcast: its id works on /v1/broadcasts/{broadcastId}.

    26 properties
    • idstringrequired
    • namestringrequired
    • statusstringrequired

      Current status of the campaign. pending_review: in the automated content review. pending_admin_review: the automated review passed and it waits for a person, which is where every channel but a WhatsApp campaign on an approved template goes. rejected: the review refused it; edit it and send again, or escalate. scheduled and sending follow approval.

      One ofdraftpending_reviewpending_admin_reviewapprovedrejectedescalatedrejected_finalscheduledsendingpausedcompletedcancelledfailed
    • channelstringrequired

      Broadcast delivery channel. Use 'smart' for per-contact intelligent routing.

      One ofsmartsmssms_onewaywhatsapptelegramemail
    • messageTypestringrequired

      Type of message for broadcast.

      One oftextimagevideoaudiodocumenttemplate
    • textstring
    • contentobject

      Content for non-text broadcast message types.

      8 properties
      • mediaUrlstring

        URL of the media file.

      • mediaIdstring

        Media ID if already uploaded.

      • mimeTypestring

        MIME type of the media.

      • filenamestring

        Filename for documents.

      • templateIdstring

        Template ID for template messages.

      • templateVariablesobject

        Default body variables (can be overridden per contact). Key them to match the template body: by position (1, 2, ...) for positional templates, or by name (e.g. customer_name) for named templates. Zavu detects the template's format and sends the correct payload to Meta. Do not mix positional and named keys.

        1 properties
        • {key}string
      • templateButtonVariablesobject

        Default button variables for dynamic URL/OTP buttons. Keys are the button index (0, 1, 2). Per-contact values override these.

        1 properties
        • {key}string
      • templateHeaderVariablesobject

        Default value for a text-header variable, keyed by 1 (can be overridden per contact). If omitted, Zavu resolves the header from templateVariables by the header placeholder's name.

        1 properties
        • {key}string
    • emailSubjectstring
    • totalContactsintegerrequired

      Total number of contacts in the broadcast.

    • pendingCountinteger
    • sendingCountinteger
    • sentCountinteger

      Recipients whose message the provider accepted, without a confirmed delivery yet. Channels that never report delivery keep their recipients here.

    • deliveredCountinteger

      Recipients with confirmed delivery to the device.

    • failedCountinteger
    • estimatedCostnumbernullable

      Estimated total cost in USD.

    • reservedAmountnumbernullable

      Amount reserved from balance in USD.

    • actualCostnumbernullable

      Actual cost so far in USD.

    • scheduledAtstring<date-time>
    • startedAtstring<date-time>
    • completedAtstring<date-time>
    • metadataobject
      1 properties
      • {key}string
    • createdAtstring<date-time>required
    • updatedAtstring<date-time>
    • reviewResultobjectnullable

      AI content review result.

      5 properties
      • scorenumber

        Content safety score from 0.0 to 1.0, where 1.0 is completely safe.

      • categoriesstring[]

        Policy categories violated, if any.

      • reasoningstring

        Explanation of the review decision.

      • reviewedAtstring<date-time>
      • flaggedContentstring[]nullable

        Problematic text fragments, if any.

    • reviewAttemptsintegernullable

      Number of review attempts (max 3).

    • fromstringnullable

      The address the campaign is sent from, for its channel (the sender's first address when channel is smart).

400No recipients, invalid status, `template_not_approved`, or `sender_not_found` when the campaign's sender was deleted after it was created.
  • codestringrequired
  • messagestringrequired
  • detailsobject

    Machine-readable context. Keys that mean the same thing everywhere: - errors: present on every 400 invalid_request for an invalid body or query parameter, [{path, message, ...}], path naming the field (["to"], ["contacts", 2, "recipient"], ["limit"]). - recommendation: one sentence saying what to do next. - dashboardUrl: the dashboard screen that fixes it. - connect: on 409 no_channel, the channels this project can connect to reach the recipient, each {type, request, note, available, dashboardUrl?}; request is the exact call (POST /v2/channels with its body, or POST /v2/numbers), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). available: false says why in note (one-way SMS closed until business verification is approved). - address / from: the address the error is about, under the name the request used for it.

    1 properties
    • errorsobject[]
      3 properties
      • pathobject[]required
      • messagestringrequired
      • codestring
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject

    Machine-readable context. Keys that mean the same thing everywhere: - errors: present on every 400 invalid_request for an invalid body or query parameter, [{path, message, ...}], path naming the field (["to"], ["contacts", 2, "recipient"], ["limit"]). - recommendation: one sentence saying what to do next. - dashboardUrl: the dashboard screen that fixes it. - connect: on 409 no_channel, the channels this project can connect to reach the recipient, each {type, request, note, available, dashboardUrl?}; request is the exact call (POST /v2/channels with its body, or POST /v2/numbers), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). available: false says why in note (one-way SMS closed until business verification is approved). - address / from: the address the error is about, under the name the request used for it.

    1 properties
    • errorsobject[]
      3 properties
      • pathobject[]required
      • messagestringrequired
      • codestring
402`insufficient_balance`, with `details.availableBalance`; or `paid_plan_required`: an email campaign on the Free plan (`details.dashboardUrl`). Email campaigns need a paid plan; drafts can still be created and edited.
  • codestringrequired
  • messagestringrequired
  • detailsobject

    Machine-readable context. Keys that mean the same thing everywhere: - errors: present on every 400 invalid_request for an invalid body or query parameter, [{path, message, ...}], path naming the field (["to"], ["contacts", 2, "recipient"], ["limit"]). - recommendation: one sentence saying what to do next. - dashboardUrl: the dashboard screen that fixes it. - connect: on 409 no_channel, the channels this project can connect to reach the recipient, each {type, request, note, available, dashboardUrl?}; request is the exact call (POST /v2/channels with its body, or POST /v2/numbers), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). available: false says why in note (one-way SMS closed until business verification is approved). - address / from: the address the error is about, under the name the request used for it.

    1 properties
    • errorsobject[]
      3 properties
      • pathobject[]required
      • messagestringrequired
      • codestring
404Campaign not found, or it belongs to another project.
  • codestringrequired
  • messagestringrequired
  • detailsobject

    Machine-readable context. Keys that mean the same thing everywhere: - errors: present on every 400 invalid_request for an invalid body or query parameter, [{path, message, ...}], path naming the field (["to"], ["contacts", 2, "recipient"], ["limit"]). - recommendation: one sentence saying what to do next. - dashboardUrl: the dashboard screen that fixes it. - connect: on 409 no_channel, the channels this project can connect to reach the recipient, each {type, request, note, available, dashboardUrl?}; request is the exact call (POST /v2/channels with its body, or POST /v2/numbers), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). available: false says why in note (one-way SMS closed until business verification is approved). - address / from: the address the error is about, under the name the request used for it.

    1 properties
    • errorsobject[]
      3 properties
      • pathobject[]required
      • messagestringrequired
      • codestring