Skip to main content
MUTATION
engageMessageEdit(_id: String!, title: String!, kind: String!, method: String!, fromUserId: String, status: String, segmentIds: [String], customerTagIds: [String], customerIds: [String], email: EngageMessageEmail, scheduleDate: EngageScheduleDateInput, messenger: EngageMessageMessenger, push: EngageMessagePush, whatsappMessage: EngageMessageWhatsappInput, automationNs: String, forceCreateConversation: Boolean, startImmediately: Boolean): EngageMessage

Arguments

_id
String!
required

Campaign id to update. Required.

title
String!
required

Campaign name. Required.

kind
String!
required

Campaign type, e.g. auto, visitorAuto, manual. Required.

method
String!
required

Delivery channel: email, messenger, push, or whatsapp. Required — determines which content field must be set.

fromUserId
String

Team member id to send as.

status
String

Initial lifecycle status. Usually omitted — defaults to a draft-like state; use startImmediately or engageMessageStart to send.

segmentIds
[String]

Segment v2 ids to target. Combine with customerTagIds / customerIds.

customerTagIds
[String]

Customer tag ids to target.

customerIds
[String]

Explicit customer ids to target, in addition to segments/tags.

email
EngageMessageEmail

Email content. Required when method is email. See EngageMessageEmail.

scheduleDate
EngageScheduleDateInput

Send schedule (once or recurring). Omit to leave unscheduled until engageMessageStart.

messenger
EngageMessageMessenger

Messenger content and targeting rules. Required when method is messenger.

push
EngageMessagePush

Push notification content. Required when method is push.

whatsappMessage
EngageMessageWhatsappInput

WhatsApp template configuration. Required when method is whatsapp.

automationNs
String

Automation namespace, when this campaign is created from an automation.

forceCreateConversation
Boolean

For messenger-method campaigns, force a new conversation per recipient instead of reusing an open one.

startImmediately
Boolean

When true, sends immediately after saving instead of waiting for scheduleDate or engageMessageStart.

_id
String!

Unique campaign identifier.

kind
String

Campaign type, e.g. auto, visitorAuto, manual. See kind filter on engageMessages.

tagIds
[String]

Conversation/message tags targeted for automation-kind campaigns.

customerTagIds
[String]

Customer tags used to build the audience. Resolved to names via customerTags.

segmentIds
[String]

Segment v2 ids used to build the audience. Resolved to names via segments.

customerIds
[String]

Explicit customer ids included in the audience, in addition to segments/tags.

title
String

Campaign name shown in the dashboard and engageMessages search.

fromUserId
String

Team member id the campaign is sent as. Resolved via fromUser.

method
String

Delivery channel: email, messenger, push, or whatsapp. Determines which of email / messenger / push / whatsappMessage is set.

status
String

Lifecycle status, e.g. draft, live, paused, yet, failed. Advance with engageMessageStart and friends.

createdAt
Date

When this campaign was created.

messengerReceivedCustomerIds
[String]

Customer ids that have received a messenger-kind campaign so far.

totalCustomersCount
Int

Total audience size resolved at send time.

validCustomersCount
Int

Audience size after removing invalid / unreachable recipients (e.g. missing email/phone).

sentCount
Int

Number of messages sent so far across all runs.

failedCount
Int

Number of messages that failed to send across all runs.

processedCount
Int

Number of recipients processed so far (sent + failed + skipped).

runCount
Int

How many times this campaign has run (relevant for recurring schedules).

lastRunAt
Date

Timestamp of the most recent run.

startedAt
Date

When the current or most recent run started.

completedAt
Date

When the most recent run finished successfully.

stoppedAt
Date

When the campaign was stopped via engageMessageStop.

lastError
String

Most recent send-time error message, if any.

totalBatchCount
Int

Total number of send batches for the current run.

completedBatchCount
Int

Number of send batches completed for the current run.

pausedFrom
String

Status the campaign was in before it was paused, restored by engageMessageResume.

History of individual run summaries. See EngageRunSummary.

email
JSON

Email content and headers when method is email. See EngageMessageEmail shape (input-only type; returned as JSON).

messenger
JSON

Messenger content and rules when method is messenger (returned as JSON).

whatsappMessage

WhatsApp template configuration when method is whatsapp. See EngageMessageWhatsapp.

automationNs
String

Automation namespace this campaign was created from, if triggered by an automation.

push
JSON

Push notification content when method is push (returned as JSON).

createdBy
String

User id who created the campaign.

scheduleDate

Send schedule — once or recurring. See EngageScheduleDate.

segments

Resolved segment names for segmentIds. See EngageSegment.

customerTags

Resolved customer tag names for customerTagIds. See EngageAudienceTag.

getTags
[Tag]

Resolved conversation/message tags for tagIds.

fromUser

Resolved team member for fromUserId.

fromIntegration
JSON

Resolved integration used to send WhatsApp/messenger content (returned as JSON).

createdUserName
String

Display name of the creator, for list views.

stats
JSON

Aggregate email delivery stats for this campaign (returned as JSON). See AvgEmailStats for the shape of workspace-wide averages.

whatsappStats
JSON

Aggregate WhatsApp delivery stats for this campaign (returned as JSON). See AvgWhatsappStats for the shape of workspace-wide averages.

Aggregate push delivery stats for this campaign. See EngagePushStats.

logs

Recent execution logs. Prefer engageLogs for paginated access.

Mutation
Variables
Response
آخر تعديل في ١١ أغسطس ٢٠٢٦