> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# campaignSend

> Send a campaign now, as Send now in the Redo app does: it schedules the campaign for the current time and starts the send at once. It works on a draft and on a campaign scheduled for later whose send has not started; the new time replaces the old schedule, and `scheduledAtTimeZone` is left as it was. Nothing is saved when the send is refused. It fails with `CAMPAIGN_NOT_SENDABLE` (400) when the campaign has no segment, an email variant lacks a subject or preview text, or marketing billing is off for its channel (`campaignSendCheck` lists them), and with `CAMPAIGN_SEND_STARTED` (400) when the send has already started. There is no idempotency key because the campaign is the key: repeating the call after the send started fails with `CAMPAIGN_SEND_STARTED`, so read the campaign's `status` to see the outcome. An SMS campaign sent outside texting hours, 8:00 to 20:00 in part of the continental US, fails with `SMS_QUIET_HOURS` (400) unless `sendDuringQuietHours` is true; that acknowledges the risk of texting outside those hours, because Redo does not hold a campaign's texts for quiet hours once its send starts. `updateCampaign` is unchanged: it schedules and edits without these checks. Returns null if no campaign with that id is owned by the caller.

**Required scopes:** [`campaigns_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_write)

**Store must have one of:** `EMAIL_SMS`

## Arguments

**id** `ID!` *required*

The campaign's `id`, or its `legacyId` from an earlier version of the Redo API.

**sendDuringQuietHours** `Boolean`

Send an SMS campaign even though it is outside texting hours. Ignored for email.

## Returns

**campaignSend** `[Campaign](/docs/api-reference/v3/reference/marketing/campaign)`

A one-off marketing send to a set of segments, on a single channel.

**fields**

**analytics** `[CampaignAnalytics!](/docs/api-reference/v3/reference/marketing/campaign-analytics)` *required*

Analytics for this campaign, grouped by what is being measured.

**fields**

**messaging** `[CampaignMessagingAnalytics!](/docs/api-reference/v3/reference/marketing/campaign-messaging-analytics)` *required*

Email and SMS performance: what was sent, how it was engaged with, and the orders and revenue attributed to it. Each order is credited to the last marketing or Commerce Agent message before it, Commerce Agent replies to the campaign included, so a later message from outside the campaign takes the credit.

**Requires:** [`campaigns_analytics_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_analytics_read)

**fields**

**Arguments**

**attributionWindowDays** `Int`

Deprecated. How many days after a message an order still counts toward it, 1-30, in place of the store's own windows. **(Deprecated)**

**audience** `[MarketingAudience](/docs/api-reference/v3/reference/marketing/marketing-audience)`

Report only messages to this audience, and the orders and revenue credited to them. Omit it for both. Credit is assigned across both audiences first, so the two add up to the unsplit figures. `delivered`, `failures` and `unsubscribes` aren't recorded per audience: deliveries and failures count toward `SUBSCRIBERS`, and `unsubscribes` reports the whole send's. Rates divided by `delivered` are therefore not comparable between the two audiences.

**endDate** `[Date!](/docs/api-reference/v3/reference/common/date)` *required*

Last day to report on, inclusive, in the store's timezone. The range may span at most 400 days.

**startDate** `[Date!](/docs/api-reference/v3/reference/common/date)` *required*

First day to report on, inclusive, in the store's timezone. Must be on or before `endDate`, and the range may span at most 400 days.

**Fields**

**series** `[\[MessageAnalyticsPoint!\]!](/docs/api-reference/v3/reference/marketing/message-analytics-point)` *required*

One entry per day with activity, oldest first. Quiet days are omitted rather than reported as zero.

**totals** `[MessageAnalyticsTotals!](/docs/api-reference/v3/reference/marketing/message-analytics-totals)` *required*

Totals across the whole range. A campaign with no activity reports zero counts and null rates.

**variants** `[\[CampaignVariantAnalytics!\]!](/docs/api-reference/v3/reference/marketing/campaign-variant-analytics)` *required*

Per-arm performance of a split test: what each variant sent, how it was engaged with, and the orders and revenue credited to it. Credit is `messaging`'s, split by the variant whose message won, so don't add the two together. One entry per arm, in `position` order; an arm with no activity reports zero counts and null rates.

**Requires:** [`campaigns_analytics_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_analytics_read)

**fields**

**Arguments**

**attributionWindowDays** `Int`

Deprecated. How many days after a message an order still counts toward it, 1-30, in place of the store's own windows. **(Deprecated)**

**audience** `[MarketingAudience](/docs/api-reference/v3/reference/marketing/marketing-audience)`

Report only messages to this audience, and the orders and revenue credited to them. Omit it for both. Credit is assigned across both audiences first, so the two add up to the unsplit figures. `delivered`, `failures` and `unsubscribes` aren't recorded per audience: deliveries and failures count toward `SUBSCRIBERS`, and `unsubscribes` reports the whole send's. Rates divided by `delivered` are therefore not comparable between the two audiences.

**endDate** `[Date!](/docs/api-reference/v3/reference/common/date)` *required*

Last day to report on, inclusive, in the store's timezone. The range may span at most 400 days.

**startDate** `[Date!](/docs/api-reference/v3/reference/common/date)` *required*

First day to report on, inclusive, in the store's timezone. Must be on or before `endDate`, and the range may span at most 400 days.

**Fields**

**abTestWeight** `Float!` *required*

The share of recipients this arm was sent to.

**channel** `[MarketingChannel!](/docs/api-reference/v3/reference/marketing/marketing-channel)` *required*

The channel this arm sends on.

**clickThroughRate** `Float`

Same definition as on `MessageAnalytics`: `uniqueClicks / delivered`. Null when nothing was delivered.

**conversionRate** `Float`

Same definition as on `MessageAnalytics`: `orders / delivered`. Null when nothing was delivered.

**delivered** `Int!` *required*

Messages the provider confirmed were delivered.

**openRate** `Float`

Same definition as on `MessageAnalytics`: `uniqueOpens / delivered`, over email deliveries only. Null when nothing measurable was delivered.

**orders** `Int!` *required*

Orders credited to this arm within the attribution window, rounded to a whole number as on `MessageAnalytics`.

**position** `Int!` *required*

Same as `position` on `emailVariants` and `smsVariants`: this arm's position within the campaign, starting at 0.

**recipients** `Int!` *required*

Distinct customers sent to.

**revenue** `[Money!](/docs/api-reference/v3/reference/common/money)` *required*

Revenue credited to this arm, in the store's currency.

**sends** `Int!` *required*

Messages handed to the delivery provider.

**uniqueClicks** `Int!` *required*

Messages clicked at least once, counted like `uniqueOpens`.

**uniqueOpens** `Int!` *required*

Messages opened at least once. Always 0 on SMS, which has no open tracking.

**canceledAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the merchant canceled the campaign, if they did.

**channel** `[MarketingChannel!](/docs/api-reference/v3/reference/marketing/marketing-channel)` *required*

The channel this campaign sends on.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the campaign was created.

**emailVariants** `[\[CampaignEmailVariant!\]!](/docs/api-reference/v3/reference/marketing/campaign-email-variant)` *required*

The email content this campaign sends, oldest arm first. A campaign that is not split-testing has exactly one entry; there is no separate `subject` on the campaign because a split test has more than one.

**fields**

**abTestWeight** `Float!` *required*

The share of recipients this variant was sent to. A campaign with a single variant weights it 1.

**position** `Int!` *required*

This variant's position within the campaign, starting at 0. Stable, so it names an arm of a split test across reports.

**template** `[EmailTemplate](/docs/api-reference/v3/reference/marketing/email-template)`

The content this variant sent. Null when the template has since been deleted.

**Requires:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

**fields**

**contentBackgroundColor** `String!` *required*

The content canvas background, as set under Email styles in the email builder.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the template was created.

**emailBackgroundColor** `String!` *required*

The email background, as set under Email styles in the email builder.

**id** `ID!` *required*

The id of this template.

**legacyId** `String!` *required*

The template's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**linkColor** `String`

The default link color, as set under Email styles in the email builder. Null when the merchant left it unset.

**localization** `[EmailTemplateLocalization](/docs/api-reference/v3/reference/marketing/email-template-localization)`

The template's source language, its translatable strings and its saved translations. Null if the template was deleted while reading.

**Requires:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

**name** `String!` *required*

The merchant-facing name of the template.

**preview** `[EmailTemplatePreview](/docs/api-reference/v3/reference/marketing/email-template-preview)`

Render this template, to see what recipients get. Use a width of about 375 for a phone.

**Requires:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

**fields**

**Arguments**

**eventId** `ID`

Render with this recent event's data instead of sample data: a 24-character hex event id. A well-formed id that can't be found falls back to sample data.

**width** `Int`

Viewport width of the screenshot, 320-1200 pixels.

**previewText** `String`

The preview text shown after the subject in an inbox. Null when the merchant left it unset.

**sections** `[\[EmailTemplateSection!\]!](/docs/api-reference/v3/reference/marketing/email-template-section)` *required*

The blocks that make up the email body, in order. Nested column children keep their own ids. A type this API version does not model field-by-field is returned as EmailTemplateUnknownSection.

**sectionsJson** `[\[JSON!\]!](/docs/api-reference/v3/reference/common/json)` *required*

`sections` with every field selected, as JSON: one element per root block, in order, with `__typename` and nested column children. Empty or unreadable stored sections are \[]. Edits go through operations.

**subject** `String!` *required*

The subject line **as authored**, before per-recipient substitution. A subject containing `{{ }}` placeholders is filled in per customer at send time, and some sends prepend a prefix, so this is not necessarily the subject any one customer saw. Empty when the template has no subject of its own.

**trigger** `[MarketingTrigger!](/docs/api-reference/v3/reference/marketing/marketing-trigger)` *required*

The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the template was last edited. Templates stay editable after the campaigns that used them have finished, so compare this against a campaign's `finishedAt` to tell whether the content here is still what that campaign actually sent.

**errorCode** `[CampaignErrorCode](/docs/api-reference/v3/reference/marketing/campaign-error-code)`

Why the campaign failed, when it did.

**excludedSegments** `[\[Segment!\]!](/docs/api-reference/v3/reference/marketing/segment)` *required*

The segments held out of this campaign.

**Requires:** [`segments_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-segments_read)

**fields**

**conditions** `[JSON](/docs/api-reference/v3/reference/common/json)`

Dynamic segment condition tree. Null for static and persona segments.

**countsRefreshedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the member counts were last recalculated. They are not live.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the segment was created.

**description** `String`

The merchant's description of who this segment is for.

**emailSubscriberCount** `Int`

Members subscribed to email marketing as of `countsRefreshedAt`.

**id** `ID!` *required*

The id of this segment.

**legacyId** `String!` *required*

The segment's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**memberCount** `Int`

Customers in the segment as of `countsRefreshedAt`. Null until it has first been counted.

**name** `String!` *required*

The merchant-facing name of the segment.

**smsSubscriberCount** `Int`

Members subscribed to SMS marketing as of `countsRefreshedAt`.

**type** `[SegmentType!](/docs/api-reference/v3/reference/marketing/segment-type)` *required*

How membership of this segment is determined.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the segment was last updated.

**failedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the campaign failed to send, if it did.

**followUpConfig** `[CampaignFollowUpConfig](/docs/api-reference/v3/reference/marketing/campaign-follow-up-config)`

Follow-up email configuration when one was enabled.

**fields**

**delayMs** `Float`

Delay after the original send before the follow-up goes out.

**enabled** `Boolean!` *required*

Whether a follow-up send is configured.

**engagementPeriod** `[CampaignFollowUpEngagementPeriod](/docs/api-reference/v3/reference/marketing/campaign-follow-up-engagement-period)`

Engagement window, in days, used to pick recipients.

**originalCampaignLegacyId** `String`

Legacy Mongo ObjectId of the campaign this follow-up was created from.

**subjectLine** `String`

Subject line for the follow-up email.

**fromAddress** `[EmailAddress](/docs/api-reference/v3/reference/marketing/email-address)`

The from address recorded when the campaign sent. Null for drafts and for SMS campaigns.

**fields**

**email** `String!` *required*

The mailbox address.

**name** `String!` *required*

The display name shown alongside the address.

**fromPhoneNumber** `String`

The phone number this campaign's texts send from, as the store's marketing number appears in the app (the oldest verified one). Recipients in a country the store maps to a different number get that number instead. Null for email campaigns and for stores with no marketing number. The store has one number for all its campaigns, so a request reads it once, for 20 points.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**fromSender** `[EmailSender](/docs/api-reference/v3/reference/marketing/email-sender)`

The From mailbox chosen for this campaign. Null when the store default should be used, and for SMS.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the address was added.

**email** `String!` *required*

The mailbox address.

**id** `ID!` *required*

The id of this sender address. Pass it to `updateCampaign`, `emailSenderUpdate` or `emailSenderDelete`.

**isMailbox** `Boolean!` *required*

Whether the address can receive email. Replies to a Reply-To address that is not a mailbox are lost.

**mailboxVerifiedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the merchant confirmed the address receives email by opening its verification link, or null if it hasn't been verified. Send the link with `emailSenderSendVerification`.

**name** `String!` *required*

The display name shown alongside the address.

**id** `ID!` *required*

The id of this campaign.

**legacyId** `String!` *required*

The campaign's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**name** `String!` *required*

The merchant-facing name of the campaign.

**replyToAddress** `[EmailAddress](/docs/api-reference/v3/reference/marketing/email-address)`

The reply-to address recorded when the campaign sent. Null when none was set.

**fields**

**email** `String!` *required*

The mailbox address.

**name** `String!` *required*

The display name shown alongside the address.

**replyToSender** `[EmailSender](/docs/api-reference/v3/reference/marketing/email-sender)`

The Reply-To mailbox chosen for this campaign. Null when the store default should be used.

**Requires:** [`campaigns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_read)

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the address was added.

**email** `String!` *required*

The mailbox address.

**id** `ID!` *required*

The id of this sender address. Pass it to `updateCampaign`, `emailSenderUpdate` or `emailSenderDelete`.

**isMailbox** `Boolean!` *required*

Whether the address can receive email. Replies to a Reply-To address that is not a mailbox are lost.

**mailboxVerifiedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the merchant confirmed the address receives email by opening its verification link, or null if it hasn't been verified. Send the link with `emailSenderSendVerification`.

**name** `String!` *required*

The display name shown alongside the address.

**scheduledAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the campaign is scheduled to start sending. Null for drafts, and for campaigns scheduled in each recipient's local time.

**scheduledAtTimeZone** `String`

IANA time zone the merchant picked when scheduling a single UTC instant. Null for drafts and local-time sends.

**scheduledLocalFallbackTimeZone** `String`

IANA time zone used when a recipient has no time zone, for local-time sends. Null when `scheduledAt` is set.

**scheduledLocalTime** `String`

For campaigns scheduled in each recipient's local time, the wall-clock time they send at, as `YYYY-MM-DDTHH:mm:ss`. Null when `scheduledAt` is set.

**segments** `[\[Segment!\]!](/docs/api-reference/v3/reference/marketing/segment)` *required*

The segments this campaign was sent to.

**Requires:** [`segments_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-segments_read)

**fields**

**conditions** `[JSON](/docs/api-reference/v3/reference/common/json)`

Dynamic segment condition tree. Null for static and persona segments.

**countsRefreshedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the member counts were last recalculated. They are not live.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the segment was created.

**description** `String`

The merchant's description of who this segment is for.

**emailSubscriberCount** `Int`

Members subscribed to email marketing as of `countsRefreshedAt`.

**id** `ID!` *required*

The id of this segment.

**legacyId** `String!` *required*

The segment's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**memberCount** `Int`

Customers in the segment as of `countsRefreshedAt`. Null until it has first been counted.

**name** `String!` *required*

The merchant-facing name of the segment.

**smsSubscriberCount** `Int`

Members subscribed to SMS marketing as of `countsRefreshedAt`.

**type** `[SegmentType!](/docs/api-reference/v3/reference/marketing/segment-type)` *required*

How membership of this segment is determined.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the segment was last updated.

**sentAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the campaign finished sending. Null until it has finished.

**smsVariants** `[\[CampaignSmsVariant!\]!](/docs/api-reference/v3/reference/marketing/campaign-sms-variant)` *required*

The SMS content this campaign sends, oldest arm first. Empty for email campaigns.

**fields**

**abTestWeight** `Float!` *required*

The share of recipients this variant was sent to. A campaign with a single variant weights it 1.

**position** `Int!` *required*

This variant's position within the campaign, starting at 0.

**template** `[SmsTemplate](/docs/api-reference/v3/reference/marketing/sms-template)`

The content this variant sent. Null when the template has since been deleted.

**Requires:** [`marketing_templates_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-marketing_templates_read)

**fields**

**autoShortenLinks** `Boolean!` *required*

Whether links in the body are shortened at send time.

**content** `String!` *required*

The SMS body **as authored**, before per-recipient substitution.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the template was created.

**id** `ID!` *required*

The id of this template.

**images** `[\[SmsTemplateImage!\]!](/docs/api-reference/v3/reference/marketing/sms-template-image)` *required*

Images sent with the message as MMS, in order. Dynamic product images and contact cards set in the editor are not listed.

**legacyId** `String!` *required*

The template's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.

**name** `String!` *required*

The merchant-facing name of the template.

**trigger** `[MarketingTrigger!](/docs/api-reference/v3/reference/marketing/marketing-trigger)` *required*

The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the template was last edited.

**status** `[CampaignStatus!](/docs/api-reference/v3/reference/marketing/campaign-status)` *required*

Derived lifecycle status from schedule, send, failure, and cancellation timestamps.

**tags** `[String!]!` *required*

Tags the merchant applied to this campaign, in the order they applied them. Free-form and merchant-defined — Redo attaches no meaning to them, so they are the place a store's own categorisation (a promotion name, a season, a product line) is kept. Empty when the campaign is untagged.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the campaign was last updated.

## Example

```graphql theme={null}
mutation {
  campaignSend(id: "...", sendDuringQuietHours: true) {
    canceledAt
    channel
    createdAt
    errorCode
    failedAt
    fromPhoneNumber
    id
    legacyId
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.