**גרסאות API** · **V2 (Latest)** · [V1](/integrations/v1/docs?lang=he)

# Notification Templates

OpenAPI 3.0.3 · API 2.0.0

```json
[
  {
    "url": "https://api.unisoft.world/integrations/v2",
    "description": "API"
  }
]
```

## פעולות

## POST /notification-templates/templates/{id}/preview

Preview an organisation email template with example variables

`preview_organisation_notification_template`

Requires email_templates:read. Pure POST preview of an existing non-deleted organisation email template; no contact lookup, send, queue, thumbnail generation, provider fetch or persistent write. Pass only example values actually used by the template, at most 100 string values of at most 5000 characters; unknown body/query fields and unused example keys are refused. Organisation variables reuse the canonical public organisation-variable map; supplied examples can override them. HTML substitutions are escaped and performed in one pass, preserving example strings containing template tokens literally. Subject/preheader are plain text. Missing/empty values are listed in missingVariables; unsupportedVariables lists tokens outside the native canonical organisation/recipient variable catalogue even when an example was supplied. complete=true means all preview tokens have non-empty values, not that the template is send-ready or production-supported. A send-specific token such as mailing_unsubscribe is missing unless an example is supplied; no real unsubscribe link is fabricated. HTML remains untrusted template content and must be shown in a sandbox without fetching embedded resources. No SMTP credentials, raw organisation object or recipient identity is returned. The revision identifies stored template content, not a delivery authorization. Missing, deleted, foreign, ambiguous or malformed templates are refused; campaign-restricted keys cannot use this organisation-wide template surface.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "email_templates:read",
  "additional": []
}
```

### פרמטרים

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### גוף הבקשה

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "maxProperties": 100,
            "additionalProperties": {
              "type": "string",
              "maxLength": 5000
            }
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationTemplatePreviewResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "email_templates:read",
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /notification-templates/settings/BIRTHDAY/organisation

Read BIRTHDAY template and sender settings

`get_birthday_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:read",
  "additional": [
    "messages:read",
    "transactional_reminders:read"
  ]
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:read",
  "x-unisoft-additional-scopes": [
    "messages:read",
    "transactional_reminders:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## PATCH /notification-templates/settings/BIRTHDAY/organisation

Update BIRTHDAY template or sender settings

`update_birthday_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider. Writing additionally requires notification_settings:write and the target-domain write grant (forms:write for form kinds, transactional_reminders:write for reminder kinds), while retaining all listed read grants. Read the target first, then pass its opaque expectedRevision and a UUID idempotencyKey with only the requested patch fields. templateId is accepted only for form kinds; null clears the additional organisation email, while the system notification remains fixed. emailConfig is an admitted Email config id or null. The adapter changes only the native form fields or existing reminderEmailSenders field with compare-and-set; it does not send, change audiences, edit template content, create a missing config record or rewrite unrelated fields. A durable principal-and-organisation-bound command precedes the mutation. Identical-key/payload replays do not mutate again; a changed payload conflicts. SUCCEEDED acknowledges the setting write; REFUSED records a lost compare-and-set race; UNCERTAIN covers interrupted/uncertain writes and never permits an automatic new-key retry. journalRecorded=false means final durable journal acknowledgement is unavailable: the command returns UNCERTAIN and never permits automatic replay. Re-read the target and preserve uncertainty; neither a setting update nor template selection proves that a future notification will be sent or delivered.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:write",
  "additional": [
    "notification_settings:read",
    "messages:read",
    "transactional_reminders:read",
    "transactional_reminders:write"
  ]
}
```

### גוף הבקשה

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid"
          },
          "patch": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "templateId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "emailConfig": {
                "type": "string",
                "maxLength": 200,
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "expectedRevision",
          "idempotencyKey",
          "patch"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsChangeResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:write",
  "x-unisoft-additional-scopes": [
    "notification_settings:read",
    "messages:read",
    "transactional_reminders:read",
    "transactional_reminders:write"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "update",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /notification-templates/settings/HAZKARA/organisation

Read HAZKARA template and sender settings

`get_hazkara_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:read",
  "additional": [
    "messages:read",
    "transactional_reminders:read"
  ]
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:read",
  "x-unisoft-additional-scopes": [
    "messages:read",
    "transactional_reminders:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## PATCH /notification-templates/settings/HAZKARA/organisation

Update HAZKARA template or sender settings

`update_hazkara_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider. Writing additionally requires notification_settings:write and the target-domain write grant (forms:write for form kinds, transactional_reminders:write for reminder kinds), while retaining all listed read grants. Read the target first, then pass its opaque expectedRevision and a UUID idempotencyKey with only the requested patch fields. templateId is accepted only for form kinds; null clears the additional organisation email, while the system notification remains fixed. emailConfig is an admitted Email config id or null. The adapter changes only the native form fields or existing reminderEmailSenders field with compare-and-set; it does not send, change audiences, edit template content, create a missing config record or rewrite unrelated fields. A durable principal-and-organisation-bound command precedes the mutation. Identical-key/payload replays do not mutate again; a changed payload conflicts. SUCCEEDED acknowledges the setting write; REFUSED records a lost compare-and-set race; UNCERTAIN covers interrupted/uncertain writes and never permits an automatic new-key retry. journalRecorded=false means final durable journal acknowledgement is unavailable: the command returns UNCERTAIN and never permits automatic replay. Re-read the target and preserve uncertainty; neither a setting update nor template selection proves that a future notification will be sent or delivered.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:write",
  "additional": [
    "notification_settings:read",
    "messages:read",
    "transactional_reminders:read",
    "transactional_reminders:write"
  ]
}
```

### גוף הבקשה

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid"
          },
          "patch": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "templateId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "emailConfig": {
                "type": "string",
                "maxLength": 200,
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "expectedRevision",
          "idempotencyKey",
          "patch"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsChangeResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:write",
  "x-unisoft-additional-scopes": [
    "notification_settings:read",
    "messages:read",
    "transactional_reminders:read",
    "transactional_reminders:write"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "update",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /notification-templates/settings/FORM_SUBMITTED/{id}

Read FORM_SUBMITTED template and sender settings

`get_form_submitted_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:read",
  "additional": [
    "messages:read",
    "forms:read",
    "email_templates:read"
  ]
}
```

### פרמטרים

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:read",
  "x-unisoft-additional-scopes": [
    "messages:read",
    "forms:read",
    "email_templates:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## PATCH /notification-templates/settings/FORM_SUBMITTED/{id}

Update FORM_SUBMITTED template or sender settings

`update_form_submitted_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider. Writing additionally requires notification_settings:write and the target-domain write grant (forms:write for form kinds, transactional_reminders:write for reminder kinds), while retaining all listed read grants. Read the target first, then pass its opaque expectedRevision and a UUID idempotencyKey with only the requested patch fields. templateId is accepted only for form kinds; null clears the additional organisation email, while the system notification remains fixed. emailConfig is an admitted Email config id or null. The adapter changes only the native form fields or existing reminderEmailSenders field with compare-and-set; it does not send, change audiences, edit template content, create a missing config record or rewrite unrelated fields. A durable principal-and-organisation-bound command precedes the mutation. Identical-key/payload replays do not mutate again; a changed payload conflicts. SUCCEEDED acknowledges the setting write; REFUSED records a lost compare-and-set race; UNCERTAIN covers interrupted/uncertain writes and never permits an automatic new-key retry. journalRecorded=false means final durable journal acknowledgement is unavailable: the command returns UNCERTAIN and never permits automatic replay. Re-read the target and preserve uncertainty; neither a setting update nor template selection proves that a future notification will be sent or delivered.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:write",
  "additional": [
    "notification_settings:read",
    "messages:read",
    "forms:read",
    "email_templates:read",
    "forms:write"
  ]
}
```

### פרמטרים

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### גוף הבקשה

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid"
          },
          "patch": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "templateId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "emailConfig": {
                "type": "string",
                "maxLength": 200,
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "expectedRevision",
          "idempotencyKey",
          "patch"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsChangeResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:write",
  "x-unisoft-additional-scopes": [
    "notification_settings:read",
    "messages:read",
    "forms:read",
    "email_templates:read",
    "forms:write"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "update",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /notification-templates/settings/FORM_ACCEPTED/{id}

Read FORM_ACCEPTED template and sender settings

`get_form_accepted_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:read",
  "additional": [
    "messages:read",
    "forms:read",
    "email_templates:read"
  ]
}
```

### פרמטרים

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:read",
  "x-unisoft-additional-scopes": [
    "messages:read",
    "forms:read",
    "email_templates:read"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## PATCH /notification-templates/settings/FORM_ACCEPTED/{id}

Update FORM_ACCEPTED template or sender settings

`update_form_accepted_notification_settings`

Explicit opt-in notification_settings:read is required, plus messages:read for the sender reference. Reminder kinds additionally require transactional_reminders:read; form kinds require forms:read AND email_templates:read. Organisation-wide BIRTHDAY and HAZKARA use id=organisation and a fixed native system template: templateMutable=false; choosing an organisation template is unsupported. FORM_SUBMITTED and FORM_ACCEPTED use an existing form UUID. Their optional templateId is an ADDITIONAL organisation email sent alongside the fixed native system confirmation, never a replacement; templateMode=SYSTEM_PLUS_ORGANISATION states this. templateId=null means no additional organisation email, not no system notification. emailConfig selects the same native sender setting used by those notifications; null preserves native fallback resolution at transport time and does not prove a particular sender or valid SMTP configuration. All form/template/sender references are independently readmitted in the organisation; campaign-restricted keys are refused. No secret, SMTP host/user/password, provider response or contact data is returned. settingsInitialised=false means the native reminderEmailSenders record is absent: the read reports native fallback in memory, without initialising it; changing it requires initialisation in the owning application because no native unique upsert/CAS owner is available here. The supported kinds are partial coverage: fundraiser thank-you, subscription failure and other transactional families are not exposed by this slice. A settings read sends no message, initialises no persistent state and calls no provider. Writing additionally requires notification_settings:write and the target-domain write grant (forms:write for form kinds, transactional_reminders:write for reminder kinds), while retaining all listed read grants. Read the target first, then pass its opaque expectedRevision and a UUID idempotencyKey with only the requested patch fields. templateId is accepted only for form kinds; null clears the additional organisation email, while the system notification remains fixed. emailConfig is an admitted Email config id or null. The adapter changes only the native form fields or existing reminderEmailSenders field with compare-and-set; it does not send, change audiences, edit template content, create a missing config record or rewrite unrelated fields. A durable principal-and-organisation-bound command precedes the mutation. Identical-key/payload replays do not mutate again; a changed payload conflicts. SUCCEEDED acknowledges the setting write; REFUSED records a lost compare-and-set race; UNCERTAIN covers interrupted/uncertain writes and never permits an automatic new-key retry. journalRecorded=false means final durable journal acknowledgement is unavailable: the command returns UNCERTAIN and never permits automatic replay. Re-read the target and preserve uncertainty; neither a setting update nor template selection proves that a future notification will be sent or delivered.

### אימות

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### הרשאות נדרשות

```json
{
  "accepted": "notification_settings:write",
  "additional": [
    "notification_settings:read",
    "messages:read",
    "forms:read",
    "email_templates:read",
    "forms:write"
  ]
}
```

### פרמטרים

```json
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
```

### גוף הבקשה

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid"
          },
          "patch": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "templateId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "emailConfig": {
                "type": "string",
                "maxLength": 200,
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "expectedRevision",
          "idempotencyKey",
          "patch"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### תגובות

#### HTTP 200

```json
{
  "description": "Allowlisted preview or notification setting observation/acknowledgement.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/NotificationSettingsChangeResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Invalid UUID, notification kind, query/body or unsupported example values.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "INSUFFICIENT_SCOPE or CAMPAIGN_RESTRICTED_KEY.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "NOT_FOUND.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Invalid stored template/settings, unavailable sender, SYSTEM_TEMPLATE_FIXED, NOTIFICATION_SETTINGS_NOT_INITIALISED, NOTIFICATION_REVISION_CHANGED or IDEMPOTENCY_CONFLICT. No unsupported setting is changed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

#### HTTP 500

```json
{
  "description": "NOTIFICATION_TEMPLATE_UNAVAILABLE. Do not infer that an uncertain settings write failed.",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-scope": "notification_settings:write",
  "x-unisoft-additional-scopes": [
    "notification_settings:read",
    "messages:read",
    "forms:read",
    "email_templates:read",
    "forms:write"
  ],
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-mcp": {
    "category": "update",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## סכמות

```json
{
  "components": {
    "schemas": {
      "NotificationTemplatePreviewResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "templateId",
              "revision",
              "html",
              "subject",
              "preheader",
              "variablesUsed",
              "missingVariables",
              "unsupportedVariables",
              "complete"
            ],
            "properties": {
              "templateId": {
                "type": "string",
                "format": "uuid"
              },
              "revision": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "html": {
                "type": "string"
              },
              "subject": {
                "type": "string",
                "nullable": true
              },
              "preheader": {
                "type": "string",
                "nullable": true
              },
              "variablesUsed": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "missingVariables": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "unsupportedVariables": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "complete": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "NotificationSettingsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "kind",
              "resourceId",
              "templateId",
              "systemTemplateFixed",
              "templateMode",
              "templateMutable",
              "emailConfig",
              "senderSelection",
              "settingsInitialised",
              "revision"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "BIRTHDAY",
                  "HAZKARA",
                  "FORM_SUBMITTED",
                  "FORM_ACCEPTED"
                ]
              },
              "resourceId": {
                "type": "string"
              },
              "templateId": {
                "type": "string",
                "nullable": true,
                "format": "uuid"
              },
              "systemTemplateFixed": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "templateMode": {
                "type": "string",
                "enum": [
                  "SYSTEM_ONLY",
                  "SYSTEM_PLUS_ORGANISATION"
                ]
              },
              "templateMutable": {
                "type": "boolean"
              },
              "emailConfig": {
                "type": "string",
                "nullable": true
              },
              "senderSelection": {
                "type": "string",
                "enum": [
                  "EXPLICIT",
                  "NATIVE_FALLBACK"
                ]
              },
              "settingsInitialised": {
                "type": "boolean"
              },
              "revision": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            }
          }
        }
      },
      "NotificationSettingsChangeResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "requestId",
              "status",
              "replayed",
              "journalRecorded"
            ],
            "properties": {
              "requestId": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "SUCCEEDED",
                  "REFUSED",
                  "UNCERTAIN"
                ]
              },
              "replayed": {
                "type": "boolean"
              },
              "journalRecorded": {
                "type": "boolean"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Format: `ke_live_xxx`"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```
