# MCP: marketing

Source: <https://telegafirst.com/docs/mcp-marketing>
Locale: ru
releaseGitSha: c9a428d902de0b479a981e43774f38b9ec077ed7
sourceContentDigest: cf157da7cab11e627dca5d085950656e24fc76a3bbf7d5b5c9dc1800003e0e24
Version: 1

# MCP: marketing

Это определения инструментов из текущего ToolRegistry, включая полные inputSchema/outputSchema, scope, required\_scopes (ALL), risk и версию платформы. Наличие определения не означает, что инструмент уже установлен вашим хостом или разрешён вашим credential. Обновляйте tools/list после изменения бизнеса, readiness и прав. Progressive disclosure через load\_domain/describe\_tool и существующий meta-dispatch описаны в [MCP-руководстве](https://telegafirst.com/docs/mcp-guide). [Scopes и права](https://telegafirst.com/docs/scopes-and-permissions) применяются при вызове; risk не заменяет согласие и отдельные требования денежной операции. JSON ниже — схема, а не успешный результат вызова.

## create\_marketing\_campaign

Create a campaign atomically with its mandatory first source link. Provide a destination `target` and `first_link`; a campaign without a source does not exist. A source is either `link` or `code_word`; pass `code_word` only for the latter. The platform owns public addressing. Returns the campaign and its tenant-local `seqNum` values.

```json
{
  "description": "Create a campaign atomically with its mandatory first source link. Provide a destination `target` and `first_link`; a campaign without a source does not exist. A source is either `link` or `code_word`; pass `code_word` only for the latter. The platform owns public addressing. Returns the campaign and its tenant-local `seqNum` values.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "button_target": {
        "description": "Value for button target.",
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "Value for button target option.",
            "properties": {
              "kind": {
                "const": "delivery_message",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for button target option.",
            "properties": {
              "kind": {
                "const": "url",
                "description": "Value for kind.",
                "type": "string"
              },
              "url": {
                "description": "Value for url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for button target option.",
            "properties": {
              "kind": {
                "const": "web_app",
                "description": "Value for kind.",
                "type": "string"
              },
              "web_app_url": {
                "description": "Value for web app url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "web_app_url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for button target option.",
            "properties": {
              "kind": {
                "const": "section_root",
                "description": "Value for kind.",
                "type": "string"
              },
              "section": {
                "description": "Value for section.",
                "enum": [
                  "catalog",
                  "booking",
                  "events"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "section"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for button target option.",
            "properties": {
              "entity_seq": {
                "description": "Value for entity seq.",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              },
              "entity_type": {
                "description": "Value for entity type.",
                "enum": [
                  "product",
                  "catalog_group",
                  "menu_group",
                  "event",
                  "resource",
                  "chain_step",
                  "marketing_campaign",
                  "marketing_link",
                  "form"
                ],
                "type": "string"
              },
              "kind": {
                "const": "deeplink",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "entity_type",
              "entity_seq"
            ],
            "type": "object"
          }
        ]
      },
      "button_title": {
        "description": "Value for button title.",
        "maxLength": 100,
        "type": "string"
      },
      "display_name": {
        "description": "Value for display name.",
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "first_link": {
        "additionalProperties": false,
        "description": "Value for first link.",
        "properties": {
          "code_word": {
            "description": "Value for code word.",
            "maxLength": 100,
            "minLength": 4,
            "pattern": "^\\S+$",
            "type": "string"
          },
          "comment": {
            "anyOf": [
              {
                "description": "Value for comment option.",
                "maxLength": 255,
                "type": "string"
              },
              {
                "description": "Value for comment option.",
                "type": "null"
              }
            ],
            "description": "Value for comment."
          },
          "is_active": {
            "description": "Value for is active.",
            "type": "boolean"
          },
          "kind": {
            "description": "Value for kind.",
            "enum": [
              "link",
              "code_word"
            ],
            "type": "string"
          },
          "title": {
            "description": "Value for title.",
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "kind",
          "title"
        ],
        "type": "object"
      },
      "is_active": {
        "description": "Value for is active.",
        "type": "boolean"
      },
      "target": {
        "description": "Value for target.",
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "delivery_message",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "url",
                "description": "Value for kind.",
                "type": "string"
              },
              "url": {
                "description": "Value for url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "web_app",
                "description": "Value for kind.",
                "type": "string"
              },
              "web_app_url": {
                "description": "Value for web app url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "web_app_url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "section_root",
                "description": "Value for kind.",
                "type": "string"
              },
              "section": {
                "description": "Value for section.",
                "enum": [
                  "catalog",
                  "booking",
                  "events"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "section"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "entity_seq": {
                "description": "Value for entity seq.",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              },
              "entity_type": {
                "description": "Value for entity type.",
                "enum": [
                  "product",
                  "catalog_group",
                  "menu_group",
                  "event",
                  "resource",
                  "chain_step",
                  "marketing_campaign",
                  "marketing_link",
                  "form"
                ],
                "type": "string"
              },
              "kind": {
                "const": "deeplink",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "entity_type",
              "entity_seq"
            ],
            "type": "object"
          }
        ]
      }
    },
    "required": [
      "display_name",
      "target",
      "first_link"
    ],
    "type": "object"
  },
  "name": "create_marketing_campaign",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "write",
  "scope": "marketing:write",
  "title": "Create Marketing Campaign"
}
```

## create\_marketing\_link

Create a source link under a campaign addressed by `campaign_seq_num`. Use `kind:"link"` for a normal source or `kind:"code_word"` with `code_word` for text matching. The link receives its own tenant-local `seqNum`; raw ids and public registry codes are never accepted.

```json
{
  "description": "Create a source link under a campaign addressed by `campaign_seq_num`. Use `kind:\"link\"` for a normal source or `kind:\"code_word\"` with `code_word` for text matching. The link receives its own tenant-local `seqNum`; raw ids and public registry codes are never accepted.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "campaign_seq_num": {
        "description": "Value for campaign seq num.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "code_word": {
        "description": "Value for code word.",
        "maxLength": 100,
        "minLength": 4,
        "pattern": "^\\S+$",
        "type": "string"
      },
      "comment": {
        "anyOf": [
          {
            "description": "Value for comment option.",
            "maxLength": 255,
            "type": "string"
          },
          {
            "description": "Value for comment option.",
            "type": "null"
          }
        ],
        "description": "Value for comment."
      },
      "is_active": {
        "description": "Value for is active.",
        "type": "boolean"
      },
      "kind": {
        "description": "Value for kind.",
        "enum": [
          "link",
          "code_word"
        ],
        "type": "string"
      },
      "title": {
        "description": "Value for title.",
        "maxLength": 64,
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "campaign_seq_num",
      "kind",
      "title"
    ],
    "type": "object"
  },
  "name": "create_marketing_link",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "write",
  "scope": "marketing:write",
  "title": "Create Marketing Link"
}
```

## delete\_marketing\_campaign

Soft-delete a marketing campaign by its tenant-local `seqNum`. Idempotent: deleting an absent or already-deleted campaign returns deleted:true.

```json
{
  "description": "Soft-delete a marketing campaign by its tenant-local `seqNum`. Idempotent: deleting an absent or already-deleted campaign returns deleted:true.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "seq_num": {
        "description": "Value for seq num.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      }
    },
    "required": [
      "seq_num"
    ],
    "type": "object"
  },
  "name": "delete_marketing_campaign",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "destructive",
  "scope": "marketing:write",
  "title": "Delete Marketing Campaign"
}
```

## delete\_marketing\_link

Disable a marketing source link by its tenant-local `seqNum`, preserving attribution history. A missing or foreign seqNum is NOT\_FOUND. Repeating deletion of an existing already-inactive link is idempotent and returns deleted:true.

```json
{
  "description": "Disable a marketing source link by its tenant-local `seqNum`, preserving attribution history. A missing or foreign seqNum is NOT_FOUND. Repeating deletion of an existing already-inactive link is idempotent and returns deleted:true.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "seq_num": {
        "description": "Value for seq num.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      }
    },
    "required": [
      "seq_num"
    ],
    "type": "object"
  },
  "name": "delete_marketing_link",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "destructive",
  "scope": "marketing:write",
  "title": "Delete Marketing Link"
}
```

## list\_marketing\_campaigns

List the tenant marketing campaigns with CRM-visible statistics: clicks, users, orders, payments, and the latest statistics refresh. A campaign is a destination/aggregate and includes its source links; it has no type or public address. Each source has its tenant-local `seqNum`, the only id accepted by source-link mutations. 0-cost read.

```json
{
  "description": "List the tenant marketing campaigns with CRM-visible statistics: clicks, users, orders, payments, and the latest statistics refresh. A campaign is a destination/aggregate and includes its source links; it has no type or public address. Each source has its tenant-local `seqNum`, the only id accepted by source-link mutations. 0-cost read.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {},
    "type": "object"
  },
  "name": "list_marketing_campaigns",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:read"
  ],
  "risk": "read",
  "scope": "marketing:read",
  "title": "List Marketing Campaigns"
}
```

## list\_marketing\_links

List all tenant marketing source links for batch operations. Each row includes its tenant-local `seqNum` and a signed QR PNG URL. QR URLs expire after 900 seconds (15 minutes); download a large batch promptly and request a fresh list after expiry. 0-cost read.

```json
{
  "description": "List all tenant marketing source links for batch operations. Each row includes its tenant-local `seqNum` and a signed QR PNG URL. QR URLs expire after 900 seconds (15 minutes); download a large batch promptly and request a fresh list after expiry. 0-cost read.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {},
    "type": "object"
  },
  "name": "list_marketing_links",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:read"
  ],
  "risk": "read",
  "scope": "marketing:read",
  "title": "List Marketing Links"
}
```

## update\_marketing\_campaign

Update a campaign by its tenant-local `seqNum`. Patch its display name, destination target, delivery button, or active flag. Source kind/code words belong to links and cannot be edited through a campaign. A foreign or missing seqNum is NOT\_FOUND.

```json
{
  "description": "Update a campaign by its tenant-local `seqNum`. Patch its display name, destination target, delivery button, or active flag. Source kind/code words belong to links and cannot be edited through a campaign. A foreign or missing seqNum is NOT_FOUND.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "button_target": {
        "anyOf": [
          {
            "description": "Value for button target option.",
            "oneOf": [
              {
                "additionalProperties": false,
                "description": "Value for button target option option.",
                "properties": {
                  "kind": {
                    "const": "delivery_message",
                    "description": "Value for kind.",
                    "type": "string"
                  }
                },
                "required": [
                  "kind"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Value for button target option option.",
                "properties": {
                  "kind": {
                    "const": "url",
                    "description": "Value for kind.",
                    "type": "string"
                  },
                  "url": {
                    "description": "Value for url.",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "url"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Value for button target option option.",
                "properties": {
                  "kind": {
                    "const": "web_app",
                    "description": "Value for kind.",
                    "type": "string"
                  },
                  "web_app_url": {
                    "description": "Value for web app url.",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "web_app_url"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Value for button target option option.",
                "properties": {
                  "kind": {
                    "const": "section_root",
                    "description": "Value for kind.",
                    "type": "string"
                  },
                  "section": {
                    "description": "Value for section.",
                    "enum": [
                      "catalog",
                      "booking",
                      "events"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "section"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "description": "Value for button target option option.",
                "properties": {
                  "entity_seq": {
                    "description": "Value for entity seq.",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "entity_type": {
                    "description": "Value for entity type.",
                    "enum": [
                      "product",
                      "catalog_group",
                      "menu_group",
                      "event",
                      "resource",
                      "chain_step",
                      "marketing_campaign",
                      "marketing_link",
                      "form"
                    ],
                    "type": "string"
                  },
                  "kind": {
                    "const": "deeplink",
                    "description": "Value for kind.",
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "entity_type",
                  "entity_seq"
                ],
                "type": "object"
              }
            ]
          },
          {
            "description": "Value for button target option.",
            "type": "null"
          }
        ],
        "description": "Value for button target."
      },
      "button_title": {
        "anyOf": [
          {
            "description": "Value for button title option.",
            "maxLength": 100,
            "type": "string"
          },
          {
            "description": "Value for button title option.",
            "type": "null"
          }
        ],
        "description": "Value for button title."
      },
      "display_name": {
        "description": "Value for display name.",
        "maxLength": 200,
        "minLength": 1,
        "type": "string"
      },
      "is_active": {
        "description": "Value for is active.",
        "type": "boolean"
      },
      "seq_num": {
        "description": "Value for seq num.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "target": {
        "description": "Value for target.",
        "oneOf": [
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "delivery_message",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "url",
                "description": "Value for kind.",
                "type": "string"
              },
              "url": {
                "description": "Value for url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "web_app",
                "description": "Value for kind.",
                "type": "string"
              },
              "web_app_url": {
                "description": "Value for web app url.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "web_app_url"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "kind": {
                "const": "section_root",
                "description": "Value for kind.",
                "type": "string"
              },
              "section": {
                "description": "Value for section.",
                "enum": [
                  "catalog",
                  "booking",
                  "events"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "section"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Value for target option.",
            "properties": {
              "entity_seq": {
                "description": "Value for entity seq.",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              },
              "entity_type": {
                "description": "Value for entity type.",
                "enum": [
                  "product",
                  "catalog_group",
                  "menu_group",
                  "event",
                  "resource",
                  "chain_step",
                  "marketing_campaign",
                  "marketing_link",
                  "form"
                ],
                "type": "string"
              },
              "kind": {
                "const": "deeplink",
                "description": "Value for kind.",
                "type": "string"
              }
            },
            "required": [
              "kind",
              "entity_type",
              "entity_seq"
            ],
            "type": "object"
          }
        ]
      }
    },
    "required": [
      "seq_num"
    ],
    "type": "object"
  },
  "name": "update_marketing_campaign",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "write",
  "scope": "marketing:write",
  "title": "Update Marketing Campaign"
}
```

## update\_marketing\_link

Update a source link by its tenant-local `seqNum`. Only title, comment, and active state are mutable; source kind and code word are immutable. A foreign or missing seqNum is NOT\_FOUND.

```json
{
  "description": "Update a source link by its tenant-local `seqNum`. Only title, comment, and active state are mutable; source kind and code word are immutable. A foreign or missing seqNum is NOT_FOUND.",
  "domain": "marketing",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "bot": {
        "description": "Optional slug of the bot you expect to act on (get_active_bot). If the active bot differs, the call is refused with ACTIVE_BOT_CHANGED and nothing runs.",
        "maxLength": 128,
        "minLength": 1,
        "type": "string"
      },
      "comment": {
        "anyOf": [
          {
            "description": "Value for comment option.",
            "maxLength": 255,
            "type": "string"
          },
          {
            "description": "Value for comment option.",
            "type": "null"
          }
        ],
        "description": "Value for comment."
      },
      "is_active": {
        "description": "Value for is active.",
        "type": "boolean"
      },
      "seq_num": {
        "description": "Value for seq num.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "title": {
        "description": "Value for title.",
        "maxLength": 64,
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "seq_num"
    ],
    "type": "object"
  },
  "name": "update_marketing_link",
  "outputSchema": null,
  "platform_version": "1.0.19",
  "required_scopes": [
    "marketing:write"
  ],
  "risk": "write",
  "scope": "marketing:write",
  "title": "Update Marketing Link"
}
```
