Change a DM automation
postkey_update_automationPostkey: Changes a DM automation's draft: its name (any automation); for one made with the Quick form (made_with "Quick form" in postkey_get_automation) its keywords, link, message texts and followers_only; for one built in the Flow Builder (every template that is not a Quick form) the words of its messages, buttons and cards, with messages. messages never adds, removes or reorders steps, buttons or cards, and never changes links or images: a person does that in Postkey. Send at least one field. Changes are saved to its draft: a live automation keeps answering with its published version until postkey_publish_automation is called again. An X reply automation takes replies, post_id, link_url and keywords; no message texts or followers_only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"automation_id": "<automation_id>"
},
"name": "postkey_update_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dms | No | DM wordings as on create (same rules); [] = public replies again. | |
| name | No | A new name, 1 to 120 characters. Works for every automation. | |
| post_id | No | template x_comment_reply only: one post, as a post_id from postkey_list_posts or the link of a post on X. Left out: any post with this keyword. | |
| replies | No | template x_comment_reply only: the fixed replies, up to 10, in the order they rotate. Each carries the link: put {{link}} where it goes, or it is added at the end. No other variable works, and nothing is written per comment. Left out on create: the account's saved voice, or Postkey's suggestions. | |
| keywords | No | Quick form only: the words that start it, up to 20. Replaces the list and turns off any-word matching. | |
| link_url | No | Quick form only: the link the DM hands out, https://.... Refused no_link when its link message has no link button. | |
| messages | No | Flow Builder automations only: new words by step number (postkey_get_automation). text replaces the message; buttons renames all its buttons, in order; cards rewrites a gallery's cards, one entry per card, in order. Not with Quick form fields. | |
| link_message | No | Quick form only: the DM that carries the link. At most 640 characters. | |
| automation_id | Yes | The automation id (a UUID) from postkey_list_automations or postkey_create_automation. | |
| followers_only | No | Quick automations: true means only followers get the link (people who have not messaged the account before first get a short "follow, then tap" message); false turns the follow check off, and leaves Tap to unlock as it is. Instagram only: true is refused for a Facebook Page. | |
| opening_message | No | Quick form only: the first DM, the one with the button. At most 640 characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false: refused (isError; code, message, guide_topic, url); no change. | |
| note | No | Present when a live automation keeps its published version. | |
| saved | No | true: the draft was saved. | |
| draft_now | No | After a Quick form change: keywords (as saved, trimmed, one of each) and link_url. | |
| updated_at | No | When it was saved. | |
| messages_now | No | After a messages change: the changed steps as saved (step, kind, says, buttons, cards). | |
| automation_id | No | The automation id. |