Предметные инструменты · sender

Рассылки и контакты · изменения · Изменение · sender_contacts_batch_import

sender_site_sender_m183_writeИзменение

Действия модуля sender.

Действия

В tools/call передайте имя инструмента, значение action и параметры действия во вложенном объекте arguments.

Загрузить пакет контактов рассылки

sender_contacts_batch_import

Действия модуля sender.

list_id
целое число
contacts
массив
contact_lines
массив
phone_lines
массив
blacklist
логическое значение
new_list_name
строка
expected_revision
строка · обязательный параметр
request_id
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "list_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "contacts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 3,
            "maxLength": 255
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "maxLength": 255
          }
        },
        "oneOf": [
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "phone"
            ]
          }
        ],
        "additionalProperties": false
      }
    },
    "contact_lines": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "string",
        "maxLength": 1024
      }
    },
    "phone_lines": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "string",
        "maxLength": 1024
      }
    },
    "blacklist": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "new_list_name": {
      "type": "string",
      "minLength": 0,
      "maxLength": 255
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "request_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$"
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "expected_revision",
    "request_id",
    "confirm"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "required": [
        "contacts"
      ]
    },
    {
      "required": [
        "contact_lines"
      ]
    },
    {
      "required": [
        "phone_lines"
      ]
    }
  ],
  "allOf": [
    {
      "oneOf": [
        {
          "required": [
            "list_id"
          ],
          "not": {
            "anyOf": [
              {
                "required": [
                  "blacklist"
                ]
              },
              {
                "required": [
                  "new_list_name"
                ]
              }
            ]
          }
        },
        {
          "required": [
            "blacklist"
          ],
          "not": {
            "required": [
              "new_list_name"
            ]
          }
        },
        {
          "required": [
            "new_list_name"
          ],
          "not": {
            "anyOf": [
              {
                "required": [
                  "list_id"
                ]
              },
              {
                "required": [
                  "blacklist"
                ]
              }
            ]
          }
        }
      ]
    }
  ]
}

Скачать исходное примечание