Sensitive write. Changes one automation; only the fields passed
change. Changing posts, keywords, DMs, or replies changes who
gets messaged and what they get. status=live or test resumes
sending and needs confirmed=true; status=paused stops it.
reset_counters=true clears its stats.
Full input and output schemas
{
"inputSchema": {
"type": "object",
"description": "Change one automation; only the fields passed change.",
"properties": {
"automation_id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"post",
"story",
"message",
"share"
],
"description": "post = comments on posts and Reels. story = replies to stories (and optionally mentions). message = a direct message containing a keyword (trigger_keywords required, media_ids [\"*\"]). share = someone sends one of the picked posts or Reels in a direct message (media_ids required)."
},
"name": {
"type": "string",
"description": "Display name (up to 60 characters)."
},
"media_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Post/Reel or story IDs from list_instagram_media. [\"*\"] = every post (not stories; pick story IDs). [\"next\"] = the next post published after it goes live (posts only)."
},
"include_mentions": {
"type": "boolean",
"description": "Story automations on every story: also DM people who mention the account."
},
"trigger_keywords": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20,
"description": "Whole-word, case-insensitive keywords (emoji work too). Required when match_mode=keywords."
},
"match_mode": {
"type": "string",
"enum": [
"keywords",
"all"
],
"description": "keywords = only matching comments; all = every comment or story reply."
},
"comment_reply": {
"type": "object",
"description": "Public reply under the comment (posts and Reels only). Needs at least 3 different replies; ScaleDM rotates them and @mentions the commenter so replies never look copy-pasted.",
"properties": {
"enabled": {
"type": "boolean"
},
"replies": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 3,
"maxItems": 10
}
},
"required": [
"enabled"
],
"additionalProperties": false
},
"opening_dm": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"text": {
"type": "string",
"description": "Message text (up to 1000 characters)."
},
"button_title": {
"type": "string",
"description": "Button label, up to 20 characters."
}
},
"additionalProperties": false,
"description": "Optional first DM with one button (posts and Reels only). The link DM is sent when the person taps the button. Taps open the conversation, which helps DMs reach the inbox. Required for ask_to_follow on posts."
},
"ask_to_follow": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"text": {
"type": "string",
"description": "Message text (up to 1000 characters)."
},
"button_title": {
"type": "string",
"description": "Button label, up to 20 characters."
}
},
"additionalProperties": false,
"description": "Optional follow gate. People who don't follow the account get this message with an 'Open profile' button and a confirm button; followers get the link straight away. ScaleDM checks the follow and asks up to 3 times."
},
"dm": {
"type": "object",
"description": "The link DM (required). type=text: message (or up to 3 messages, picked at random). type=image: a card with title and image (dm_image upload or image_url), plus an optional message sent before it.",
"properties": {
"type": {
"type": "string",
"enum": [
"text",
"image"
]
},
"message": {
"type": "string",
"description": "DM text (up to 1000 characters)."
},
"messages": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 3,
"description": "Up to 3 variations; one is picked at random per person."
},
"image_url": {
"type": "string",
"description": "Hosted image URL for type=image. Set by the server."
},
"title": {
"type": "string",
"description": "Card headline, required when type=image."
},
"subtitle": {
"type": "string"
},
"buttons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Short label, up to 20 characters (e.g. Get the guide)."
},
"url": {
"type": "string",
"description": "Destination https:// URL. ScaleDM wraps it in a tracked link."
}
},
"required": [
"title",
"url"
],
"additionalProperties": false
},
"maxItems": 3,
"description": "Up to 3 link buttons. Clicks are tracked; links typed in the message are not."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"dm_image": {
"type": "object",
"description": "Image uploaded in chat (when supported). Otherwise pass a public https image_url.",
"properties": {
"download_url": {
"type": "string"
},
"file_id": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"file_name": {
"type": "string"
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": false
},
"image_url": {
"type": "string",
"description": "Public https image for an image DM when no file is uploaded."
},
"test_usernames": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 5,
"description": "Instagram usernames that test mode answers (not the connected account)."
},
"status": {
"type": "string",
"enum": [
"draft",
"test",
"live",
"paused"
],
"description": "draft = saved, not answering. test = only answers comments from test_usernames (instant, for trying it out). live = answers everyone who matches. paused = stopped, ready to resume."
},
"is_active": {
"type": "boolean",
"description": "Legacy shortcut: true = live, false = paused."
},
"confirmed": {
"type": "boolean",
"description": "Must be true to go live, start testing, or delete; set only after the user approved."
},
"add_media_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"remove_media_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"add_trigger_keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"remove_trigger_keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"reset_counters": {
"type": "boolean",
"description": "Permanently clear this automation's stats."
}
},
"required": [
"automation_id"
],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"automation": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"post",
"story",
"message",
"share"
],
"description": "post = comments on posts and Reels. story = replies to stories (and optionally mentions). message = a direct message containing a keyword (trigger_keywords required, media_ids [\"*\"]). share = someone sends one of the picked posts or Reels in a direct message (media_ids required)."
},
"status": {
"type": "string",
"enum": [
"draft",
"test",
"live",
"paused"
],
"description": "draft = saved, not answering. test = only answers comments from test_usernames (instant, for trying it out). live = answers everyone who matches. paused = stopped, ready to resume."
},
"is_active": {
"type": "boolean"
},
"scope": {
"type": "string",
"enum": [
"specific",
"any",
"next"
]
},
"media_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"include_mentions": {
"type": "boolean"
},
"match_mode": {
"type": "string"
},
"trigger_keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"comment_reply": {
"type": "object"
},
"opening_dm": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"text": {
"type": "string"
},
"button_title": {
"type": "string"
}
}
},
"ask_to_follow": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"text": {
"type": "string"
},
"button_title": {
"type": "string"
}
}
},
"dm": {
"type": "object"
},
"test_usernames": {
"type": "array",
"items": {
"type": "string"
}
},
"stats": {
"type": "object"
},
"sent_count": {
"type": "integer"
},
"comment_count": {
"type": "integer"
},
"total_clicks": {
"type": "integer"
},
"created_at": {
"type": [
"string",
"null"
]
},
"updated_at": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"type",
"status",
"media_ids",
"trigger_keywords",
"is_active"
],
"additionalProperties": true
}
},
"required": [
"automation"
],
"additionalProperties": false
}
}