Ver .md

groups.schedule_update

Editar um agendamento. Edita no lugar um agendamento scheduled ou paused (sobe version e recalcula o próximo disparo). Informar messageId (mesmo o atual) congela de novo a versão atual da mensagem. O tipo (once/recurring) não muda: crie outro agendamento. Se outra pessoa editou antes, responde invalid_input.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/groups.schedule_update (corpo JSON)
  • Quem pode chamar: administrador da conta
  • Escopo da chave: marketing:write
  • Grava dados: sim
  • Pela chave de API: sim
  • Ferramenta MCP: groups_schedule_update
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId groups.schedule_update)

Entrada

CampoTipoObrigatórioNota
idstring (uuid)sim
messageIdstring (uuid)não
targetobjectnão
speed"slow" | "normal" | "fast"não
runAtstring (date-time)não
weekdaysinteger[]não
timeOfDaystringnão
useLatestbooleannã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)$"
    },
    "messageId": {
      "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)$"
    },
    "target": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "all": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "folderId": {
              "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)$"
            }
          },
          "required": [
            "folderId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "linkId": {
              "anyOf": [
                {
                  "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)$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "linkId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "groupIds": {
              "minItems": 1,
              "maxItems": 2000,
              "type": "array",
              "items": {
                "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)$"
              }
            }
          },
          "required": [
            "groupIds"
          ],
          "additionalProperties": false
        }
      ]
    },
    "speed": {
      "type": "string",
      "enum": [
        "slow",
        "normal",
        "fast"
      ]
    },
    "runAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "weekdays": {
      "minItems": 1,
      "maxItems": 7,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 6
      }
    },
    "timeOfDay": {
      "type": "string",
      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
    },
    "useLatest": {
      "type": "boolean"
    }
  },
  "required": [
    "id"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/groups.schedule_update \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"00000000-0000-4000-8000-000000000001","timeOfDay":"10:00"}'

CLI:

node cli/atomiks.mjs groups.schedule_update --json '{"id":"00000000-0000-4000-8000-000000000001","timeOfDay":"10:00"}'

MCP: ferramenta groups_schedule_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"
    },
    "messageId": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "once",
        "recurring"
      ]
    },
    "runAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "weekdays": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "timeOfDay": {
      "type": [
        "string",
        "null"
      ]
    },
    "nextRunAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "nextRuns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "state": {
      "type": "string"
    },
    "target": {},
    "speed": {
      "type": "string"
    },
    "useLatest": {
      "type": "boolean"
    },
    "version": {
      "type": "number"
    },
    "lastRunAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastJobIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "messageId",
    "title",
    "kind",
    "runAt",
    "weekdays",
    "timeOfDay",
    "nextRunAt",
    "nextRuns",
    "state",
    "target",
    "speed",
    "useLatest",
    "version",
    "lastRunAt",
    "lastJobIds",
    "warnings"
  ],
  "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).