---
title: "Save event email settings for one context and mode"
method: POST
path: "/organizations/{organizationId}/event-email-settings/{context}/{mode}"
tags: ["Event Email Settings"]
---

# Save event email settings for one context and mode

`POST /organizations/{organizationId}/event-email-settings/{context}/{mode}`

Creates or replaces event email settings for the given context and mode (upsert — if no record exists it is created, if one exists it is fully replaced). Both context and mode are matched against a case-sensitive route pattern — other casings return 404 at the routing layer before this operation executes. The request body should include a typeSettings array covering all six event-type values (initiated, approved, denied, cancelled, psvReady, inProgress), though this is not enforced by the server; any type with enabled: true must supply a non-blank template.subject and template.bodyHtml, otherwise the server returns 400. recipientPreferences is persisted at the context level and is shared across both modes for that context — changing it here also affects the other mode. Returns the full updated settings record. For updates only, PUT /{context}/{mode} is available and invokes this same upsert logic.

## Path parameters

- `context` 'practitioner' | 'facility', required
- `mode` 'credentialing' | 'recredentialing', required
- `organizationId` string, required

## Headers

- `tenant-id` string, required

## Request body

- EventEmailSettingsRequest — Request body for POST or PUT /organizations/{organizationId}/event-email-settings/{context}/{mode}. Context and mode are specified in the URL path, not in this body. Submitting this creates the settings record for that context+mode if none exists, or fully replaces it if one does.
  - `recipientPreferences` EventEmailRecipientPreferencesDto, required — Boolean flags controlling which recipient types receive event emails for a context.
    - `primaryEmail` boolean — true to send event emails to the practitioner's or facility's primary email on file; false or null to skip this recipient.
    - `caqhPrimaryEmail` boolean — true to send event emails to the CAQH-sourced primary email on file; false or null to skip this recipient.
    - `credentialingPrimaryContact` boolean — true to send event emails to the credentialing workflow's primary contact; false or null to skip this recipient.
    - `credentialingOfficeManager` boolean — true to send event emails to the office manager on the credentialing workflow; false or null to skip this recipient.
  - `ccEmail` string — CC email address applied to event emails for this context+mode. Stored at the mode level here — distinct from the context-level ccEmail settable via POST /{context}/cc-email, which takes priority on read when both are set. Must be a valid email address format (enforced by validation); omit to leave unset.
  - `typeSettings` EventEmailTypeSettingsDto[], required — One entry per event email type; should cover all six type values (initiated, approved, denied, cancelled, psvReady, inProgress), though this is not enforced by the server. Any entry with enabled: true must supply a non-blank template.subject and template.bodyHtml, or the request is rejected with 400.
    - `type` 'initiated' | 'approved' | 'denied' | 'cancelled' | 'psvReady' | 'inProgress', required — Which workflow event this entry configures: "initiated" (workflow started), "approved" (credentialing/recredentialing approved), "denied" (application denied), "cancelled" (workflow cancelled), "psvReady" (primary source verification complete), "inProgress" (workflow in progress).
    - `template` EventEmailTemplateDto, required — Subject and body content for one event email type's template.
      - `subject` string, required — Email subject line. Required and must be non-blank when the parent typeSettings entry has enabled: true.
      - `bodyHtml` string, required — Email body as HTML markup. Required and must be non-blank when the parent typeSettings entry has enabled: true.
    - `enabled` boolean, required — Whether an email is sent for this event type. When true, template.subject and template.bodyHtml must be non-blank.

## Response `200`

The full event email settings record after the create/replace, including resolved recipient preferences, ccEmail, logoUrl, logoWidth, and per-type template settings.

- EventEmailSettingsResponse — Event email settings for a single context+mode, as returned by GET, POST, or PUT /organizations/{organizationId}/event-email-settings/{context}/{mode}.
  - `context` 'practitioner' | 'facility', required — The context these settings apply to. "practitioner" covers practitioner-facing event emails; "facility" covers facility-facing ones.
  - `mode` 'credentialing' | 'recredentialing', required — The workflow mode these settings apply to. "credentialing" is the initial verification cycle; "recredentialing" is the periodic renewal cycle.
  - `recipientPreferences` EventEmailRecipientPreferencesDto, required — Boolean flags controlling which recipient types receive event emails for a context.
    - `primaryEmail` boolean — true to send event emails to the practitioner's or facility's primary email on file; false or null to skip this recipient.
    - `caqhPrimaryEmail` boolean — true to send event emails to the CAQH-sourced primary email on file; false or null to skip this recipient.
    - `credentialingPrimaryContact` boolean — true to send event emails to the credentialing workflow's primary contact; false or null to skip this recipient.
    - `credentialingOfficeManager` boolean — true to send event emails to the office manager on the credentialing workflow; false or null to skip this recipient.
  - `ccEmail` string — Resolved CC email for this context+mode: the context-level ccEmail if set, otherwise falling back to a mode-level value (credentialing checked before recredentialing, regardless of the mode requested). Null if neither is set.
  - `logoUrl` string — Resolved logo image URL for this context+mode, using the same context-then-credentialing-then-recredentialing fallback as ccEmail. Null if none is set.
  - `logoWidth` string — Resolved logo display width for this context+mode, using the same fallback as ccEmail/logoUrl, as a percentage string (e.g. "50%"); no format is enforced server-side. Null if none is set.
  - `typeSettings` EventEmailTypeSettingsDto[], required — One entry per configured event email type for this mode (initiated, approved, denied, cancelled, psvReady, inProgress).
    - `type` 'initiated' | 'approved' | 'denied' | 'cancelled' | 'psvReady' | 'inProgress', required — Which workflow event this entry configures: "initiated" (workflow started), "approved" (credentialing/recredentialing approved), "denied" (application denied), "cancelled" (workflow cancelled), "psvReady" (primary source verification complete), "inProgress" (workflow in progress).
    - `template` EventEmailTemplateDto, required — Subject and body content for one event email type's template.
      - `subject` string, required — Email subject line. Required and must be non-blank when the parent typeSettings entry has enabled: true.
      - `bodyHtml` string, required — Email body as HTML markup. Required and must be non-blank when the parent typeSettings entry has enabled: true.
    - `enabled` boolean, required — Whether an email is sent for this event type. When true, template.subject and template.bodyHtml must be non-blank.

## Other responses

- `400` — A typeSettings entry has enabled: true but is missing template.subject or template.bodyHtml.
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - User does not have required permissions
- `500` — Internal Server Error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
