Ver .md

custom_fields.reorder

Reordenar os campos customizados. Define a posição e o grupo dos campos citados em items ({id, order, groupName}, o que o arrastar da tela envia). Campo de fora fica como estava. Devolve updated.

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

Entrada

CampoTipoObrigatórioNota
entityType"leads" | "opportunities"sim
itemsobject[]sim
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "entityType": {
      "type": "string",
      "enum": [
        "leads",
        "opportunities"
      ]
    },
    "items": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "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)$"
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "groupName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "order"
        ]
      }
    }
  },
  "required": [
    "entityType",
    "items"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/custom_fields.reorder \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entityType":"leads","items":[{"id":"00000000-0000-0000-0000-000000000000","order":0,"groupName":null}]}'

CLI:

node cli/atomiks.mjs custom_fields.reorder --json '{"entityType":"leads","items":[{"id":"00000000-0000-0000-0000-000000000000","order":0,"groupName":null}]}'

MCP: ferramenta custom_fields_reorder com a mesma entrada.

Saída

Sucesso: {"data": ...} com o formato abaixo.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "updated": {
      "type": "number"
    }
  },
  "required": [
    "updated"
  ],
  "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).