Update a campaign
campaigns_updateChanges the settings of an existing campaign: its name, its keywords, the DM it sends, its link button, its public reply, its follow-up. Only the fields you pass are changed, and every change is reversible by calling this again with the old values. It cannot switch a campaign on or off — use campaigns_pause and campaigns_resume for that. Turning on a paid-only feature here is refused by the plan exactly as it would be in the dashboard; pass the refusal back as written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adId | No | AD only. The id of the one ad to watch. | |
| goal | No | One line on what the campaign is for. Shown to the customer only. | |
| name | No | What the customer will see this campaign called in their dashboard. | |
| postId | No | The Instagram media id of the one post or reel to watch. | |
| postUrl | No | The public permalink of that post, so the dashboard can show it. | |
| keywords | No | The words that trigger the DM, up to ten. Not needed when matchAnyWord or matchAnyReply is true. | |
| dmMessage | No | The direct message sent to whoever comments. | |
| campaignId | Yes | The id of the campaign to change. | |
| matchAnyAd | No | AD only. True to answer comments on any ad. | |
| triggerType | No | What starts the campaign. POST (the default) is a comment on a post or reel. STORY_REPLY is a reply to a story, STORY_MENTION a story that mentions the account, DM a direct message, LIVE a comment on a live video, AD a comment on an ad. | |
| matchAnyLive | No | LIVE only. True to answer every live video rather than the current one. | |
| matchAnyPost | No | True to watch every post on the account instead of one. | |
| matchAnyWord | No | True to DM everyone who comments, whatever they wrote. | |
| matchAnyReply | No | True to answer any story reply. | |
| requireFollow | No | True to ask a non-follower to follow before the DM is sent. A paid feature on some plans. | |
| wholeWordMatch | No | True (the default) matches a keyword only as a whole word, so PRICE does not fire on 'pricey'. | |
| followUpEnabled | No | True to send a second message later. A paid feature on some plans. | |
| followUpMessage | No | That second message's text. | |
| linkButtonLabel | No | The label on the button under the DM, at most 50 characters. | |
| pendingNextReel | No | True to attach the campaign to the next reel the customer posts, before that reel exists. | |
| instagramAccountId | No | Which connected Instagram account this runs for. Leave it out and the most recently connected account is used. | |
| leadCaptureEnabled | No | True to ask for an email address in the DM. A paid feature on some plans. | |
| publicReplyEnabled | No | True to also reply publicly under the comment. | |
| publicReplyMessage | No | The public reply's text. | |
| followUpDelayMinutes | No | How long to wait before the follow-up, in minutes. At most 1440, because Instagram closes the messaging window after a day. | |
| trackedDestinationUrl | No | Where that button goes. Clicks on it are counted. |