# Update Opt-In Confirmation Email

Updates an opt-in confirmation email’s subject, sender, reply-to, CC, BCC or domain. Omitted values stay, though the domain may be normalized; ordinary senders need a configured address with a verified domain, derived when omitted. A dispatch profile decides its own sender and domain. The body is updated separately. This email records consent: change sender or subject only at the user’s request.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "optInProcessId": {
      "type": "integer",
      "description": "ID of the opt-in process whose confirmation email is changed",
      "minimum": 1
    },
    "subject": {
      "type": [
        "null",
        "string"
      ],
      "description": "Subject line of the confirmation email",
      "default": null,
      "minLength": 1,
      "maxLength": 250
    },
    "senderName": {
      "type": [
        "null",
        "string"
      ],
      "description": "Name the email comes from",
      "default": null,
      "minLength": 1,
      "maxLength": 250
    },
    "senderEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Configured sender address; empty uses the account's address; \"dispatchProfile\" uses the sender profile for both address and domain (omit senderDomain)",
      "default": null,
      "maxLength": 250
    },
    "replyToEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Address a reply goes to; empty string returns it to the account's own address",
      "default": null,
      "maxLength": 250
    },
    "ccEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Address that receives a copy; empty string removes it",
      "default": null,
      "maxLength": 250
    },
    "bccEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Address that receives a blind copy; empty string removes it",
      "default": null,
      "maxLength": 250
    },
    "senderDomain": {
      "type": [
        "null",
        "string"
      ],
      "description": "Domain the email is sent through; omit to derive it from the resulting sender address",
      "default": null,
      "maxLength": 250
    },
    "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": [
    "emailId",
    "optInProcessId",
    "subject",
    "senderName",
    "senderEmail",
    "replyToEmail",
    "ccEmail",
    "bccEmail",
    "senderDomain",
    "senderEmailOptions",
    "ccBccEmailOptions",
    "senderDomainOptions",
    "senderIdentity",
    "bodyIsEditable",
    "editUrl"
  ],
  "properties": {
    "emailId": {
      "type": "integer"
    },
    "optInProcessId": {
      "type": "integer"
    },
    "subject": {
      "type": "string"
    },
    "senderName": {
      "type": "string"
    },
    "senderEmail": {
      "type": "string"
    },
    "replyToEmail": {
      "type": "string"
    },
    "ccEmail": {
      "type": "string"
    },
    "bccEmail": {
      "type": "string"
    },
    "senderDomain": {
      "type": "string"
    },
    "senderEmailOptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ccBccEmailOptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "senderDomainOptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "senderIdentity": {
      "type": "object",
      "required": [
        "effectiveSenderEmail",
        "customerDomain",
        "normalizedSenderDomain",
        "status",
        "isUsable",
        "senderEmailOptions",
        "senderDomainOptions"
      ],
      "properties": {
        "effectiveSenderEmail": {
          "type": [
            "string",
            "null"
          ]
        },
        "customerDomain": {
          "type": [
            "string",
            "null"
          ]
        },
        "normalizedSenderDomain": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ready",
            "address-not-configured",
            "address-not-confirmed",
            "address-not-usable",
            "address-blocked",
            "domain-not-configured",
            "domain-not-verified",
            "domain-not-yet-usable",
            "domain-mismatch",
            null
          ]
        },
        "isUsable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "senderEmailOptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "senderDomainOptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "bodyIsEditable": {
      "type": "boolean"
    },
    "editUrl": {
      "type": "string"
    }
  }
}
```

