# Create Shared Marketing Campaign Template

Creates a shared automation template that hands out one of the account's own automations by link, so other KlickTipp accounts can import it with its emails, tags and fields. Whoever has the link can import what it carries. A BAM assignment tag is refused until confirmActivation is true, which may only be passed after the user approved it. Not the Masterclass catalogue of search-automation-templates. Change it with update-shared-automation-template.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the template in KlickTipp",
      "minLength": 1,
      "maxLength": 250
    },
    "automationId": {
      "type": "integer",
      "description": "ID of the account's automation the template hands out, from search-automations",
      "minimum": 1
    },
    "includeDependentEntities": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "true carries every object the automation uses; false only those in includedObjects; omit for true",
      "default": null
    },
    "includedObjects": {
      "type": "object",
      "properties": {
        "emails": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "customFields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "webhooks": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "automations": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      },
      "additionalProperties": false,
      "default": null
    },
    "bamAssignmentTagId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Tag that lists the template in the BAM template overview of a linked client account once its contact carries it; it does not restrict the link; 0 or omitted for none",
      "default": null,
      "minimum": 0
    },
    "confirmActivation": {
      "type": "boolean",
      "description": "true only after the user approved the assignment tag",
      "default": false
    },
    "metaLabels": {
      "type": "array",
      "description": "Labels of the template",
      "default": null,
      "items": {
        "type": "string",
        "maxLength": 250
      }
    },
    "notes": {
      "type": [
        "null",
        "string"
      ],
      "description": "Internal note",
      "default": null,
      "maxLength": 1000
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "name",
    "automationId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "type",
    "id",
    "settings",
    "ui"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "type": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "settings": {
      "type": "object"
    },
    "ui": {
      "type": "object"
    }
  },
  "additionalProperties": false
}
```

