# Update Notification-Email Draft

Updates supplied notification email settings at the current revision. Refuses emails used by active or scheduled automations. Content and action assignment use separate tools; sends nothing.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "emailId": {
      "type": "integer",
      "minimum": 1
    },
    "revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "metaLabels": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 250
          }
        },
        "gmailPreview": {
          "type": "string",
          "maxLength": 1000
        },
        "crmTemplate": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "invoiceTemplate": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "firstAsTransactional": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        },
        "aiContext": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "userPrompt": {
              "type": "string",
              "maxLength": 50000
            },
            "fieldIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tagIds": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        },
        "aiSubject": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "userPrompt": {
              "type": "string",
              "maxLength": 50000
            },
            "fieldIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tagIds": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        },
        "name": {
          "type": "string",
          "maxLength": 250
        },
        "notes": {
          "type": "string",
          "maxLength": 10000
        },
        "subject": {
          "type": "string",
          "maxLength": 1000
        },
        "senderName": {
          "type": "string",
          "maxLength": 1000
        },
        "senderEmail": {
          "type": "string",
          "maxLength": 1000
        },
        "replyEmail": {
          "type": "string",
          "maxLength": 1000
        },
        "ccEmail": {
          "type": "string",
          "maxLength": 1000
        },
        "bccEmail": {
          "type": "string",
          "maxLength": 1000
        },
        "senderDomain": {
          "type": "string",
          "maxLength": 1000
        },
        "signature": {
          "type": "integer",
          "minimum": 0
        },
        "linkTracking": {
          "type": "integer",
          "description": "1 enables click tracking; 0 disables it.",
          "enum": [
            0,
            1
          ]
        },
        "reportSpamEnabled": {
          "type": "integer",
          "enum": [
            0,
            1
          ]
        }
      }
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "emailId",
    "revision",
    "settings"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "emailId",
    "kind",
    "revision",
    "name",
    "subject",
    "senderName",
    "senderEmail",
    "replyEmail",
    "signatureId",
    "contentStatus",
    "editorUrl",
    "usedByAutomationIds",
    "deleted",
    "smartTags",
    "settings"
  ],
  "properties": {
    "emailId": {
      "type": "integer"
    },
    "kind": {
      "type": "string"
    },
    "revision": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "senderName": {
      "type": "string"
    },
    "senderEmail": {
      "type": "string"
    },
    "replyEmail": {
      "type": "string"
    },
    "signatureId": {
      "type": "integer"
    },
    "contentStatus": {
      "type": "integer"
    },
    "editorUrl": {
      "type": "string"
    },
    "usedByAutomationIds": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "deleted": {
      "type": "boolean"
    },
    "smartTags": {
      "type": [
        "object",
        "array"
      ],
      "additionalProperties": {
        "type": "integer"
      }
    },
    "settings": {
      "type": [
        "object",
        "array"
      ]
    },
    "effectiveSender": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "senderMode",
        "fromName",
        "fromNameSource",
        "fromEmail",
        "fromEmailSource",
        "replyToEmail",
        "replyToEmailSource",
        "signatureSelection",
        "signatureId",
        "signatureName",
        "sendingDomain",
        "sendingDomainKind",
        "sendingDomainSource",
        "dependsOnContactTags",
        "senderIdentity"
      ],
      "properties": {
        "senderMode": {
          "type": "string",
          "enum": [
            "explicit",
            "account",
            "dispatch_profile"
          ]
        },
        "fromName": {
          "type": "string"
        },
        "fromNameSource": {
          "type": "string",
          "enum": [
            "email",
            "account",
            "signature",
            "account_fallback"
          ]
        },
        "fromEmail": {
          "type": "string"
        },
        "fromEmailSource": {
          "type": "string",
          "enum": [
            "email",
            "account",
            "signature",
            "account_fallback"
          ]
        },
        "replyToEmail": {
          "type": "string"
        },
        "replyToEmailSource": {
          "type": "string",
          "enum": [
            "email",
            "account",
            "signature",
            "account_fallback"
          ]
        },
        "signatureSelection": {
          "type": "string",
          "enum": [
            "fixed",
            "fixed_missing_default",
            "by_contact_tags"
          ]
        },
        "signatureId": {
          "type": "integer"
        },
        "signatureName": {
          "type": "string"
        },
        "sendingDomain": {
          "type": "string"
        },
        "sendingDomainKind": {
          "type": "string",
          "enum": [
            "customer",
            "shared",
            "unavailable"
          ]
        },
        "sendingDomainSource": {
          "type": "string",
          "enum": [
            "from_address",
            "email",
            "signature",
            "account_default",
            "first_valid",
            "shared",
            "none"
          ]
        },
        "dependsOnContactTags": {
          "type": "boolean"
        },
        "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"
              }
            }
          }
        }
      }
    }
  }
}
```

