# Update Opt-In Process

Updates an opt-in process’s name, mode, redirects, resend policy, change-email role, pending-contact deletion, labels and notes. Omitted settings stay; changes affect future signups without sending now. Single opt-in skips confirmation and requires the user’s approval. A page parameter is a name the platform fills with contact data; a UTM parameter is a value under a fixed name. Both require the corresponding redirect URL in the same call; taking the change-email role removes it from the previous process. Confirmation email content is updated separately.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "optInProcessId": {
      "type": "integer",
      "description": "ID of the opt-in process to change",
      "minimum": 1
    },
    "name": {
      "type": [
        "null",
        "string"
      ],
      "description": "New name; omit to keep the current one",
      "default": null,
      "minLength": 1,
      "maxLength": 250
    },
    "notes": {
      "type": [
        "null",
        "string"
      ],
      "description": "Internal note, not visible to contacts; empty string clears it",
      "default": null,
      "maxLength": 2000
    },
    "optInMode": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"double\" for a confirmation email, \"single\" without one",
      "default": null,
      "enum": [
        "double",
        "single"
      ]
    },
    "pendingRedirectUrl": {
      "type": [
        "null",
        "string"
      ],
      "description": "URL a contact reaches after subscribing, before confirming; empty string restores the KlickTipp page",
      "default": null,
      "maxLength": 2000
    },
    "confirmedRedirectUrl": {
      "type": [
        "null",
        "string"
      ],
      "description": "URL a contact reaches after confirming; empty string restores the KlickTipp page",
      "default": null,
      "maxLength": 2000
    },
    "resendConfirmationEmail": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether an already pending contact receives the confirmation email again on a repeated subscription",
      "default": null
    },
    "useForChangeEmail": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether this process handles email address changes; true takes that role away from the process that holds it",
      "default": null
    },
    "deletePendingSubscribersAfterDays": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Days after which unconfirmed contacts are deleted, one of 0, 1, 3, 7, 14; 0 keeps them",
      "default": null,
      "enum": [
        0,
        1,
        3,
        7,
        14
      ]
    },
    "metaLabels": {
      "type": "array",
      "description": "Complete list of labels; replaces the existing labels, empty array removes them all",
      "default": null,
      "items": {
        "type": "string",
        "maxLength": 250
      },
      "maxItems": 50
    },
    "pendingPageParameters": {
      "type": "object",
      "description": "Query parameters appended to pendingRedirectUrl, by the name each is appended under; needs pendingRedirectUrl in the same call",
      "default": null,
      "properties": {
        "subscriberParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "emailParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "listParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "subscriberKeyParameterName": {
          "type": "string",
          "maxLength": 100
        }
      },
      "additionalProperties": false
    },
    "confirmedPageParameters": {
      "type": "object",
      "description": "Query parameters appended to confirmedRedirectUrl, by the name each is appended under; needs confirmedRedirectUrl in the same call",
      "default": null,
      "properties": {
        "subscriberParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "emailParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "listParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "subscriberKeyParameterName": {
          "type": "string",
          "maxLength": 100
        },
        "referralLinkParameterName": {
          "type": "string",
          "maxLength": 100,
          "description": "Name the referral link is appended under; only together with referralLinkId"
        },
        "referralLinkId": {
          "type": "integer",
          "minimum": 0,
          "description": "ID of the account's own referral-link tool, as get-opt-in-process reports it; 0 means no referral link, and then referralLinkParameterName has to be empty too"
        }
      },
      "additionalProperties": false
    },
    "pendingUtmParameters": {
      "type": "object",
      "description": "Campaign tracking values appended to pendingRedirectUrl, by query name; the value, not the name; needs pendingRedirectUrl in the same call",
      "default": null,
      "properties": {
        "utm_source": {
          "type": "string",
          "maxLength": 200
        },
        "utm_medium": {
          "type": "string",
          "maxLength": 200
        },
        "utm_campaign": {
          "type": "string",
          "maxLength": 200
        },
        "utm_term": {
          "type": "string",
          "maxLength": 200
        },
        "utm_content": {
          "type": "string",
          "maxLength": 200
        }
      },
      "additionalProperties": false
    },
    "confirmedUtmParameters": {
      "type": "object",
      "description": "The same for confirmedRedirectUrl; needs confirmedRedirectUrl in the same call",
      "default": null,
      "properties": {
        "utm_source": {
          "type": "string",
          "maxLength": 200
        },
        "utm_medium": {
          "type": "string",
          "maxLength": 200
        },
        "utm_campaign": {
          "type": "string",
          "maxLength": 200
        },
        "utm_term": {
          "type": "string",
          "maxLength": 200
        },
        "utm_content": {
          "type": "string",
          "maxLength": 200
        }
      },
      "additionalProperties": false
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "optInProcessId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "id",
    "accountId",
    "name",
    "isDefaultProcess",
    "optInMode",
    "createdAt",
    "confirmationEmailId",
    "resendConfirmationEmail",
    "useForChangeEmail",
    "deletePendingSubscribersAfterDays",
    "pendingRedirectUrl",
    "confirmedRedirectUrl",
    "metaLabels",
    "notes",
    "pendingPageParameters",
    "confirmedPageParameters",
    "pendingUtmParameters",
    "confirmedUtmParameters",
    "editUrl"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "accountId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "isDefaultProcess": {
      "type": "boolean"
    },
    "optInMode": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "confirmationEmailId": {
      "type": "integer"
    },
    "resendConfirmationEmail": {
      "type": "boolean"
    },
    "useForChangeEmail": {
      "type": "boolean"
    },
    "deletePendingSubscribersAfterDays": {
      "type": "integer"
    },
    "pendingRedirectUrl": {
      "type": "string"
    },
    "confirmedRedirectUrl": {
      "type": "string"
    },
    "metaLabels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "string"
    },
    "pendingPageParameters": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "confirmedPageParameters": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "string",
          "integer"
        ]
      }
    },
    "pendingUtmParameters": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "confirmedUtmParameters": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "editUrl": {
      "type": "string"
    }
  }
}
```

