Update a keyword automation
update_keywordModify an existing Instagram comment-to-DM keyword automation by changing only selected fields, such as keyword, target posts, reply variants, active status, or AI agent.
Instructions
Change a keyword automation. Only the fields you pass change. Passing target re-targets it (e.g. next_post to wait for the next upload again). dmMessages and commentReplies replace all existing variants. Set isActive false to pause it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The keyword publicId. | |
| target | No | Which posts trigger the DM. next_post: the next post or reel published on the connected Instagram account (best for a video that is not live yet). all_posts: every post, current and future. specific_posts: only the Instagram media IDs in mediaIds. | |
| keyword | No | The word people comment, e.g. "GUIDE". Matching is case-insensitive. Prefer one distinctive word. | |
| isActive | No | Create it active (default) or paused. Only active keywords count toward the plan limit. | |
| mediaIds | No | Instagram media IDs. Required for target "specific_posts"; with "next_post" they are matched too. | |
| aiAgentId | No | Optional publicId of an existing Live AI agent (from list_agents) that takes over the conversation when the person replies to the DM. Its conversation hook is appended to the DM. Only works on paid plans; on Free the agent is ignored. null detaches it. | |
| matchMode | No | contains (default): the comment only has to include the keyword as a word, e.g. "GUIDE please!". exact: the whole comment must be the keyword. | |
| dmMessages | No | DM variants (1-10); one is picked at random per commenter, so 2-3 wordings of the same message feel less robotic. Each must deliver the promised link. Max 1,000 characters each. Supports {{handle}}, {{name}}, {{namefirst}}. | |
| trackLinks | No | Replace links in the DM with tracked links to count clicks. | |
| commentReplies | No | Optional public reply variants (up to 10), one picked at random per comment, e.g. "Sent! Check your DMs {{namefirst}}". Max 500 characters each. | |
| publicReplyEnabled | No | Post one of commentReplies publicly. Defaults to true when commentReplies is not empty. | |
| matchWithoutAccents | No | Only for keywords with Latin accents: also match the unaccented spelling (e.g. "guía" also matches "guia"). |