automations.update
Alterar automação do Instagram. Altera campos da automação. Campos omitidos não mudam; dmText: null limpa a mensagem. A conta do Instagram não muda.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/automations.update(corpo JSON) - Quem pode chamar: membro da conta
- Escopo da chave:
automations:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
automations_update - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdautomations.update)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
id | string (uuid) | sim | |
name | string | não | |
trigger | "comment" | "live_comment" | "story_reply" | "dm_keyword" | não | |
mediaIds | string[] | não | |
keywords | string[] | não | |
matchMode | "contains" | "exact" | não | |
publicReplies | string[] | não | |
dmText | string | null | não | |
oncePerUser | boolean | não | |
reactHeart | boolean | não | |
delaySeconds | integer | não | |
enabled | boolean | não |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"trigger": {
"type": "string",
"enum": [
"comment",
"live_comment",
"story_reply",
"dm_keyword"
]
},
"mediaIds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"keywords": {
"maxItems": 30,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"matchMode": {
"type": "string",
"enum": [
"contains",
"exact"
]
},
"publicReplies": {
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 300
}
},
"dmText": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"oncePerUser": {
"type": "boolean"
},
"reactHeart": {
"type": "boolean"
},
"delaySeconds": {
"type": "integer",
"minimum": 0,
"maximum": 43200
},
"enabled": {
"type": "boolean"
}
},
"required": [
"id"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/automations.update \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"00000000-0000-0000-0000-000000000000","keywords":["quero","eu quero"]}'CLI:
node cli/atomiks.mjs automations.update --json '{"id":"00000000-0000-0000-0000-000000000000","keywords":["quero","eu quero"]}'MCP: ferramenta automations_update com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelId": {
"type": "string"
},
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"trigger": {
"type": "string",
"enum": [
"comment",
"live_comment",
"story_reply",
"dm_keyword"
]
},
"mediaIds": {
"type": "array",
"items": {
"type": "string"
}
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"matchMode": {
"type": "string",
"enum": [
"contains",
"exact"
]
},
"publicReplies": {
"type": "array",
"items": {
"type": "string"
}
},
"dmText": {
"type": [
"string",
"null"
]
},
"oncePerUser": {
"type": "boolean"
},
"reactHeart": {
"type": "boolean"
},
"delaySeconds": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"channelId",
"name",
"enabled",
"trigger",
"mediaIds",
"keywords",
"matchMode",
"publicReplies",
"dmText",
"oncePerUser",
"reactHeart",
"delaySeconds",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).