# Update UTM Tracking Settings

Updates account-wide UTM tracking on future email-link clicks; omitted fields stay. When enabled, source, medium, campaign, content and id need values, and custom values need text. Disabling tracking resets all settings to defaults, losing chosen values.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Whether links get UTM parameters; false resets every other setting to its default"
    },
    "source": {
      "type": [
        "null",
        "string"
      ],
      "description": "What utm_source is filled with; omit to keep",
      "default": null,
      "enum": [
        "klicktipp",
        "email-name",
        "email-subject",
        "campaign-name",
        "campaign-id",
        "custom"
      ]
    },
    "sourceCustom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_source when source is custom, up to 200 characters",
      "default": null,
      "maxLength": 200
    },
    "medium": {
      "type": [
        "null",
        "string"
      ],
      "description": "What utm_medium is filled with; omit to keep",
      "default": null,
      "enum": [
        "email-name",
        "email-subject",
        "campaign-name",
        "campaign-type",
        "campaign-id",
        "custom"
      ]
    },
    "mediumCustom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_medium when medium is custom",
      "default": null,
      "maxLength": 200
    },
    "campaign": {
      "type": [
        "null",
        "string"
      ],
      "description": "What utm_campaign is filled with; omit to keep",
      "default": null,
      "enum": [
        "email-name",
        "email-subject",
        "campaign-name",
        "campaign-id",
        "custom"
      ]
    },
    "campaignCustom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_campaign when campaign is custom",
      "default": null,
      "maxLength": 200
    },
    "content": {
      "type": [
        "null",
        "string"
      ],
      "description": "What utm_content is filled with; omit to keep",
      "default": null,
      "enum": [
        "email-name",
        "email-subject",
        "campaign-name",
        "campaign-id",
        "custom"
      ]
    },
    "contentCustom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_content when content is custom",
      "default": null,
      "maxLength": 200
    },
    "id": {
      "type": [
        "null",
        "string"
      ],
      "description": "What utm_id is filled with; omit to keep",
      "default": null,
      "enum": [
        "email-name",
        "email-subject",
        "email-id",
        "campaign-name",
        "campaign-id",
        "custom",
        "subscriber-key"
      ]
    },
    "idCustom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_id when id is custom",
      "default": null,
      "maxLength": 200
    },
    "term": {
      "type": [
        "null",
        "string"
      ],
      "description": "Fixed text for utm_term; empty for none",
      "default": null,
      "maxLength": 200
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "enabled"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "enabled",
    "source",
    "sourceCustom",
    "medium",
    "mediumCustom",
    "campaign",
    "campaignCustom",
    "content",
    "contentCustom",
    "id",
    "idCustom",
    "term",
    "settingsUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "enabled": {
      "type": "boolean"
    },
    "source": {
      "type": "string"
    },
    "sourceCustom": {
      "type": "string"
    },
    "medium": {
      "type": "string"
    },
    "mediumCustom": {
      "type": "string"
    },
    "campaign": {
      "type": "string"
    },
    "campaignCustom": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "contentCustom": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "idCustom": {
      "type": "string"
    },
    "term": {
      "type": "string"
    },
    "settingsUrl": {
      "type": "string"
    }
  }
}
```

