> For the complete documentation index, see [llms.txt](https://api-docs.hengelending.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.hengelending.com/api/api-reference/notification-settings.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.hengelending.com/~gitbook/mcp).

# Notification Settings

Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.

**Scopes:** `read:notification-settings`, `update:notification-settings`

## The notification catalog

> \*\*Required scope:\*\* \`read:notification-settings\`

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Notification settings","description":"Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.\n\n**Scopes:** `read:notification-settings`, `update:notification-settings`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"NotificationCatalogResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/NotificationCatalogEntry"},"description":"Every notification template, with its category, recipients and display text.","nullable":true},"milestones":{"$ref":"#/components/schemas/NotificationCatalogMilestones"}},"additionalProperties":false,"description":"The notification catalog: every notification template, plus the loan milestones each recipient type can switch on or off as a group."},"NotificationCatalogEntry":{"type":"object","properties":{"templateKey":{"type":"string","description":"Exact property name on `EmailProviderTemplateConfig`.","nullable":true},"category":{"type":"string","description":"The notification category: status, marketing, documents, tasks, rateLock, submission or transactional. Transactional notifications cannot be turned off.","nullable":true},"recipientTypes":{"type":"array","items":{"type":"string"},"description":"Who the notification can be sent to: client (the borrower), user (the loan officer or staff) or thirdParty.","nullable":true},"itemKey":{"type":"string","description":"The template key with its first letter lowercased; the key used for this template in settings documents and responses.","nullable":true,"readOnly":true},"displayName":{"type":"string","description":"Plain-English name for the settings UI. At most 40 characters.","nullable":true},"description":{"type":"string","description":"One line saying what the mail tells its recipient, for the settings UI.","nullable":true},"agentDelivery":{"type":"string","description":"How the loan officer receives this mail: `Native` when the\r\ntemplate is addressed to them, `Copy` when it is borrower\r\nmail they can be copied on, null for transactional mail that has no user branch at all.\r\nDerived from the category and recipient types — never set by hand.","nullable":true,"readOnly":true},"milestone":{"type":"string","description":"The loan-timeline stage this template announces, from `NotificationMilestones`.\r\nNull for every non-status template, and for status templates that are not tied to a stage\r\n(an inbox reminder, a client message). Only the \"status\" category may carry one.","nullable":true},"defaultEnabled":{"type":"boolean","description":"Whether the notification is on when no setting at any level says otherwise; true for almost every template."}},"additionalProperties":false},"NotificationCatalogMilestones":{"type":"object","properties":{"client":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneSummary"},"description":"The loan milestones the borrower's notifications can be switched on or off by, in timeline order.","nullable":true},"user":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneSummary"},"description":"The loan milestones the staff notifications can be switched on or off by, in timeline order.","nullable":true}},"additionalProperties":false,"description":"The milestone list per recipient branch; both list every milestone, in timeline order."},"MilestoneSummary":{"type":"object","properties":{"code":{"type":"string","description":"The milestone's code, as used when switching a milestone's notifications on or off.","nullable":true},"name":{"type":"string","description":"Display name of the milestone.","nullable":true},"order":{"type":"integer","description":"Position of the milestone in the loan timeline, starting at 0.","format":"int32"},"itemKeys":{"type":"array","items":{"type":"string"},"description":"Empty when no template in this branch has reached this stage yet.","nullable":true}},"additionalProperties":false,"description":"One milestone plus the templates of a single recipient branch that belong to it."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/notification-settings/catalog":{"get":{"tags":["Notification settings"],"summary":"The notification catalog","description":"**Required scope:** `read:notification-settings`","operationId":"NotificationSettings_GetCatalog","responses":{"200":{"description":"The notification catalog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCatalogResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the read:notification-settings scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"The caller's company does not use the client portal.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Effective notification settings for an entity

> \*\*Required scope:\*\* \`read:notification-settings\`

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Notification settings","description":"Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.\n\n**Scopes:** `read:notification-settings`, `update:notification-settings`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"EffectiveNotificationSettings":{"type":"object","properties":{"entityType":{"type":"string","description":"The kind of record the settings belong to, for example user, client, loanApplication or thirdParty.","nullable":true},"entityId":{"type":"string","description":"Unique identifier (GUID) of that record.","format":"uuid"},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveCategory"},"description":"One entry per `All` category id.","nullable":true},"override":{"$ref":"#/components/schemas/NotificationSettingsDocument"},"permissions":{"$ref":"#/components/schemas/EffectiveNotificationPermissions"},"policy":{"$ref":"#/components/schemas/EffectiveNotificationPolicy"}},"additionalProperties":false},"EffectiveCategory":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/EffectiveBranch"},"user":{"$ref":"#/components/schemas/EffectiveBranch"}},"additionalProperties":false,"description":"A category's resolved view per recipient branch. Both branches are populated for every entity\r\ntype: the `User` branch of a client or loanApplication is what the owning loan\r\nofficer wants in their own inbox for that client or loan (agent-native mail, and copies of\r\nborrower mail)."},"EffectiveBranch":{"type":"object","properties":{"enabled":{"$ref":"#/components/schemas/EffectiveValue"},"milestones":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveValue"},"description":"Every `NotificationMilestones` code, resolved. Populated for the \"status\"\r\ncategory only — no other category has loan-timeline stages — and empty elsewhere.","nullable":true},"items":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveValue"},"description":"The resolved on or off value of each notification template, keyed by template key.","nullable":true}},"additionalProperties":false,"description":"One recipient branch's resolved view: the category-level toggle plus every template in the\r\ncategory whose `RecipientTypes` include this branch's\r\nrecipient type, keyed by `ItemKey`."},"EffectiveValue":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when the notification or category is on after applying every level of override."},"source":{"type":"string","description":"Which level supplied the value: \"borrowerPair\", \"loanApplication\", \"client\", \"user\", \"company\" or \"default\".","nullable":true},"reason":{"type":"string","description":"Which rule at that level supplied it, from `EffectiveValueReasons`. The UI uses it\r\nto explain an inherited value (\"on because the Closing milestone is on\").","nullable":true}},"additionalProperties":false,"description":"One resolved on/off value plus the level that supplied it and why."},"NotificationSettingsDocument":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the settings record, formatted type:entityId.","nullable":true},"partitionKey":{"type":"string","description":"The same value as id.","nullable":true},"type":{"type":"string","description":"The kind of entity the settings are for: company, user, client, loanApplication or borrowerPair.","nullable":true},"entityId":{"type":"string","description":"Id (GUID) of the entity the settings belong to.","format":"uuid"},"companyId":{"type":"string","description":"Tenant guard. Null only for user documents (users are tenant-scoped elsewhere).\r\n            Informational only — never used for authorization.","format":"uuid","nullable":true},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CategorySettings"},"description":"Overrides per notification category (for example status, documents, tasks), each with a branch for borrower mail and one for the loan officer's own mail.","nullable":true},"updatedBy":{"type":"string","description":"Id of the user who last changed the settings.","format":"uuid","nullable":true},"updatedAt":{"type":"string","description":"When the settings were last changed, in UTC (ISO 8601).","format":"date-time"},"_etag":{"type":"string","description":"Concurrency token of this settings record: send it back as If-Match when changing the settings. Never accepted in a request body.","nullable":true},"suppressClientEmails":{"type":"boolean","description":"Company-level switch on borrower mail: when true, nothing is sent to the company's borrowers in any category, transactional mail included. Only meaningful on a company document. Null means not decided here, so the company's type decides: on for a third-party originator company, off for any other.","nullable":true}},"additionalProperties":false,"description":"The notification overrides stored for one entity (company, user, client, loan or borrower pair). A null value anywhere means inherit from the next level up; a document exists only while it overrides something."},"CategorySettings":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/RecipientBranch"},"user":{"$ref":"#/components/schemas/RecipientBranch"}},"additionalProperties":false},"RecipientBranch":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Null = inherit the category from the next level up.","nullable":true},"items":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Template item key → value. Non-empty means this branch has explicit per-template\r\n            overrides; a key absent here falls back to `milestones`, then `enabled`,\r\n            then `knownTemplates`, then the next level up.","nullable":true},"milestones":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Loan-timeline milestone code → value, for the \"status\" category only. Sits between\r\n`items` and `enabled`: a template with no explicit item takes its\r\nmilestone's value when this branch names it. Keys are stored as written (PascalCase codes)\r\nbut the Cosmos contract resolver camelCases them on the way out, so every lookup is\r\ncase-insensitive — exactly as for `items`.","nullable":true},"knownTemplates":{"type":"array","items":{"type":"string"},"description":"Item keys known at the time this branch's Items were first written. A template added to the\r\ncatalog later and absent from both Items and KnownTemplates resolves to false while Items is\r\nnon-empty, per the resolver's default-off-when-customized rule.","nullable":true}},"additionalProperties":false,"description":"One recipient type's overrides within a category. A \"client\"/\"loanApplication\" document only\r\never populates `client`; the User branch is reserved for user\r\ndocuments and PATCH paths that target it against a client/loanApplication document are rejected."},"EffectiveNotificationPermissions":{"type":"object","properties":{"canEdit":{"type":"boolean","description":"True when the caller owns the entity (loan officer / client owner / the user\r\n            themselves) or holds an org-wide role."}},"additionalProperties":false,"description":"The caller's rights over the entity whose settings these are."},"EffectiveNotificationPolicy":{"type":"object","properties":{"suppressClientEmails":{"type":"boolean","description":"Borrower mail is off company-wide.\r\n            \r\n\r\nThe UI should <b>hide</b> the borrower/client options rather than show them switched off:\r\nnothing a user does at their own level can turn them back on, so rendering them as\r\ntogglable would be a lie. The user (agent) column stays fully editable."},"transactionalIsConfigurable":{"type":"boolean","description":"Whether the transactional category appears as configurable. False for an ordinary company —\r\nthose templates are shown but never switchable. True for a TPO, which may send its own\r\nlogin mail and so is allowed to turn ours off."},"isTpo":{"type":"boolean","description":"True when this company is a TPO. Exposed so the UI can explain <i>why</i> the borrower\r\noptions are missing rather than just omitting them."}},"additionalProperties":false,"description":"Company-wide rules that apply regardless of what any level below sets. These are not\r\npreferences the viewer can change here — they are the frame the rest of the settings sit in."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/notification-settings/{entityType}/{entityId}":{"get":{"tags":["Notification settings"],"summary":"Effective notification settings for an entity","description":"**Required scope:** `read:notification-settings`","operationId":"NotificationSettings_GetEffective","parameters":[{"name":"entityType","in":"path","description":"The level to read: `company`, `user`, `client`, `loanApplication` or `borrowerPair`, spelled exactly so. Any other value answers 400.","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"The id of the entity at that level: a company, user, client or loan application `id`, or a borrower pair's `pairId` from a loan read. One that does not exist answers 404; one your application's acting user cannot reach answers 401.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Effective settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveNotificationSettings"}}}},"400":{"description":"Unknown entity type or entity.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the read:notification-settings scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"The entity could not be found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Change notification settings for an entity

> \*\*Required scope:\*\* \`update:notification-settings\` (tokens with the legacy name \`write:notification-settings\` are also accepted)

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Notification settings","description":"Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.\n\n**Scopes:** `read:notification-settings`, `update:notification-settings`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"NotificationSettingsPatchOperation":{"required":["path"],"type":"object","properties":{"path":{"type":"string","description":"\"categories.{category}.{client|user}.enabled\" or\r\n\"categories.{category}.{client|user}.items.{templateKey}\". The template key is accepted in any\r\ncasing and normalized to the catalog's camelCase item key before it is stored."},"value":{"type":"boolean","description":"true / false, or null to clear the override at this level.","nullable":true}},"additionalProperties":false,"description":"One declarative edit against an entity's notification settings. The request body is an array and must hold at least one operation."},"EffectiveNotificationSettings":{"type":"object","properties":{"entityType":{"type":"string","description":"The kind of record the settings belong to, for example user, client, loanApplication or thirdParty.","nullable":true},"entityId":{"type":"string","description":"Unique identifier (GUID) of that record.","format":"uuid"},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveCategory"},"description":"One entry per `All` category id.","nullable":true},"override":{"$ref":"#/components/schemas/NotificationSettingsDocument"},"permissions":{"$ref":"#/components/schemas/EffectiveNotificationPermissions"},"policy":{"$ref":"#/components/schemas/EffectiveNotificationPolicy"}},"additionalProperties":false},"EffectiveCategory":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/EffectiveBranch"},"user":{"$ref":"#/components/schemas/EffectiveBranch"}},"additionalProperties":false,"description":"A category's resolved view per recipient branch. Both branches are populated for every entity\r\ntype: the `User` branch of a client or loanApplication is what the owning loan\r\nofficer wants in their own inbox for that client or loan (agent-native mail, and copies of\r\nborrower mail)."},"EffectiveBranch":{"type":"object","properties":{"enabled":{"$ref":"#/components/schemas/EffectiveValue"},"milestones":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveValue"},"description":"Every `NotificationMilestones` code, resolved. Populated for the \"status\"\r\ncategory only — no other category has loan-timeline stages — and empty elsewhere.","nullable":true},"items":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EffectiveValue"},"description":"The resolved on or off value of each notification template, keyed by template key.","nullable":true}},"additionalProperties":false,"description":"One recipient branch's resolved view: the category-level toggle plus every template in the\r\ncategory whose `RecipientTypes` include this branch's\r\nrecipient type, keyed by `ItemKey`."},"EffectiveValue":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True when the notification or category is on after applying every level of override."},"source":{"type":"string","description":"Which level supplied the value: \"borrowerPair\", \"loanApplication\", \"client\", \"user\", \"company\" or \"default\".","nullable":true},"reason":{"type":"string","description":"Which rule at that level supplied it, from `EffectiveValueReasons`. The UI uses it\r\nto explain an inherited value (\"on because the Closing milestone is on\").","nullable":true}},"additionalProperties":false,"description":"One resolved on/off value plus the level that supplied it and why."},"NotificationSettingsDocument":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the settings record, formatted type:entityId.","nullable":true},"partitionKey":{"type":"string","description":"The same value as id.","nullable":true},"type":{"type":"string","description":"The kind of entity the settings are for: company, user, client, loanApplication or borrowerPair.","nullable":true},"entityId":{"type":"string","description":"Id (GUID) of the entity the settings belong to.","format":"uuid"},"companyId":{"type":"string","description":"Tenant guard. Null only for user documents (users are tenant-scoped elsewhere).\r\n            Informational only — never used for authorization.","format":"uuid","nullable":true},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CategorySettings"},"description":"Overrides per notification category (for example status, documents, tasks), each with a branch for borrower mail and one for the loan officer's own mail.","nullable":true},"updatedBy":{"type":"string","description":"Id of the user who last changed the settings.","format":"uuid","nullable":true},"updatedAt":{"type":"string","description":"When the settings were last changed, in UTC (ISO 8601).","format":"date-time"},"_etag":{"type":"string","description":"Concurrency token of this settings record: send it back as If-Match when changing the settings. Never accepted in a request body.","nullable":true},"suppressClientEmails":{"type":"boolean","description":"Company-level switch on borrower mail: when true, nothing is sent to the company's borrowers in any category, transactional mail included. Only meaningful on a company document. Null means not decided here, so the company's type decides: on for a third-party originator company, off for any other.","nullable":true}},"additionalProperties":false,"description":"The notification overrides stored for one entity (company, user, client, loan or borrower pair). A null value anywhere means inherit from the next level up; a document exists only while it overrides something."},"CategorySettings":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/RecipientBranch"},"user":{"$ref":"#/components/schemas/RecipientBranch"}},"additionalProperties":false},"RecipientBranch":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Null = inherit the category from the next level up.","nullable":true},"items":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Template item key → value. Non-empty means this branch has explicit per-template\r\n            overrides; a key absent here falls back to `milestones`, then `enabled`,\r\n            then `knownTemplates`, then the next level up.","nullable":true},"milestones":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Loan-timeline milestone code → value, for the \"status\" category only. Sits between\r\n`items` and `enabled`: a template with no explicit item takes its\r\nmilestone's value when this branch names it. Keys are stored as written (PascalCase codes)\r\nbut the Cosmos contract resolver camelCases them on the way out, so every lookup is\r\ncase-insensitive — exactly as for `items`.","nullable":true},"knownTemplates":{"type":"array","items":{"type":"string"},"description":"Item keys known at the time this branch's Items were first written. A template added to the\r\ncatalog later and absent from both Items and KnownTemplates resolves to false while Items is\r\nnon-empty, per the resolver's default-off-when-customized rule.","nullable":true}},"additionalProperties":false,"description":"One recipient type's overrides within a category. A \"client\"/\"loanApplication\" document only\r\never populates `client`; the User branch is reserved for user\r\ndocuments and PATCH paths that target it against a client/loanApplication document are rejected."},"EffectiveNotificationPermissions":{"type":"object","properties":{"canEdit":{"type":"boolean","description":"True when the caller owns the entity (loan officer / client owner / the user\r\n            themselves) or holds an org-wide role."}},"additionalProperties":false,"description":"The caller's rights over the entity whose settings these are."},"EffectiveNotificationPolicy":{"type":"object","properties":{"suppressClientEmails":{"type":"boolean","description":"Borrower mail is off company-wide.\r\n            \r\n\r\nThe UI should <b>hide</b> the borrower/client options rather than show them switched off:\r\nnothing a user does at their own level can turn them back on, so rendering them as\r\ntogglable would be a lie. The user (agent) column stays fully editable."},"transactionalIsConfigurable":{"type":"boolean","description":"Whether the transactional category appears as configurable. False for an ordinary company —\r\nthose templates are shown but never switchable. True for a TPO, which may send its own\r\nlogin mail and so is allowed to turn ours off."},"isTpo":{"type":"boolean","description":"True when this company is a TPO. Exposed so the UI can explain <i>why</i> the borrower\r\noptions are missing rather than just omitting them."}},"additionalProperties":false,"description":"Company-wide rules that apply regardless of what any level below sets. These are not\r\npreferences the viewer can change here — they are the frame the rest of the settings sit in."},"ValidationProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The validation problems: each key is the name of the field that failed and its value lists the messages for that field. Present when `code` is `ValidationFailed`.","nullable":true},"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."}},"additionalProperties":{},"description":"The error body of a 400: the problem details shape, plus `errors`, which lists the problems by field when the request failed validation (`code` `ValidationFailed`). Branch on `code`."},"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/notification-settings/{entityType}/{entityId}":{"patch":{"tags":["Notification settings"],"summary":"Change notification settings for an entity","description":"**Required scope:** `update:notification-settings` (tokens with the legacy name `write:notification-settings` are also accepted)","operationId":"NotificationSettings_Patch","parameters":[{"name":"entityType","in":"path","description":"The level to change: `company`, `user`, `client`, `loanApplication` or `borrowerPair`, spelled exactly so. Any other value answers 400.","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","description":"The id of the entity at that level: a company, user, client or loan application `id`, or a borrower pair's `pairId` from a loan read. One that does not exist answers 404; one your application's acting user cannot reach answers 401.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationSettingsPatchOperation"}}}}},"responses":{"200":{"description":"Effective settings after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveNotificationSettings"}}}},"400":{"description":"Invalid path, unknown template, or a non-configurable category.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the update:notification-settings scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"The entity could not be found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"The settings changed underneath the request; retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Apply a client's notification defaults to their loan applications

> \*\*Required scope:\*\* \`update:notification-settings\` (tokens with the legacy name \`write:notification-settings\` are also accepted)

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Notification settings","description":"Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.\n\n**Scopes:** `read:notification-settings`, `update:notification-settings`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/notification-settings/client/{clientId}/apply-to-loans":{"post":{"tags":["Notification settings"],"summary":"Apply a client's notification defaults to their loan applications","description":"**Required scope:** `update:notification-settings` (tokens with the legacy name `write:notification-settings` are also accepted)","operationId":"NotificationSettings_ApplyToLoans","parameters":[{"name":"clientId","in":"path","description":"The client whose settings should apply: every loan-level override on the loans they are a borrower on is removed.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The ids of the removed override documents."},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the update:notification-settings scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"The client could not be found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Apply a user's notification defaults to their clients and loans

> \*\*Required scope:\*\* \`update:notification-settings\` (tokens with the legacy name \`write:notification-settings\` are also accepted)

```json
{"openapi":"3.0.4","info":{"title":"Henge Partner API","version":"1.22.0"},"tags":[{"name":"Notification settings","description":"Which emails and texts are sent, and to whom. Settings are layered: the company, then each user's defaults, then their clients, then each loan application, then each borrower pair on a loan, and every level can override the one above it. A read returns the effective value of every setting and the level that supplied it.\n\n**Scopes:** `read:notification-settings`, `update:notification-settings`"}],"servers":[{"url":"https://uat-api.hengelending.com/partner","description":"UAT (sandbox): build and test here"},{"url":"https://api.hengelending.com/partner","description":"Production"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Access token from POST /oauth/token, sent as `Authorization: Bearer <token>`.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ProblemDetails":{"required":["status","title","detail","instance","code","traceId"],"type":"object","properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem, or null when none is given.","nullable":true},"title":{"type":"string","description":"A short, human-readable summary of the problem; it does not change between occurrences of the same problem."},"status":{"type":"integer","description":"The HTTP status code of the response.","format":"int32"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence of the problem."},"instance":{"type":"string","description":"A URI that identifies this occurrence of the problem, typically the request path."},"code":{"type":"string","description":"A stable error code, such as `NotFound`, `ValidationFailed`, `Conflict` or `BusinessRuleViolation`. Present on every error; the Errors guide lists every value."},"traceId":{"type":"string","description":"The request's trace id. Quote it when you contact support about a failed call."},"requiredScope":{"type":"string","description":"The scope the token lacks, by its standard name. Present when `code` is `MissingScope` (403); ask your Henge contact to grant it to your credential."}},"additionalProperties":{},"description":"An error, in the RFC 9457 problem details shape. Branch on `code`, never on `title` or `detail`, which are for people and may change."}}},"paths":{"/notification-settings/user/{userId}/apply-to-clients":{"post":{"tags":["Notification settings"],"summary":"Apply a user's notification defaults to their clients and loans","description":"**Required scope:** `update:notification-settings` (tokens with the legacy name `write:notification-settings` are also accepted)","operationId":"NotificationSettings_ApplyToClients","parameters":[{"name":"userId","in":"path","description":"The user (loan officer) whose defaults should apply: every client- and loan-level override on their clients and loans is removed.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The ids of the removed override documents."},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The access token lacks the update:notification-settings scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"The user could not be found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-docs.hengelending.com/api/api-reference/notification-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
