---
title: "Replace all emails on a facility workflow"
method: PUT
path: "/facility-credentialing-workflows/{workflowId}/emails"
tags: ["FacilityCredentialingWorkflow"]
---

# Replace all emails on a facility workflow

`PUT /facility-credentialing-workflows/{workflowId}/emails`

Replaces the entire email list for the specified facility credentialing workflow with the array provided in the request body (replace-all / desired-state semantics). **When to use:** Supply the complete desired final list of emails. Omitting an existing email removes it. To clear all emails, send an empty array `[]`. **Preconditions:** The workflow must belong to the caller's tenant. **Returns:** `200 OK` with the updated workflow. Returns `404` if the workflow is not found.

## Path parameters

- `workflowId` string, required

## Headers

- `tenant-id` string, required

## Request body

- FacilityEmailUpdateRequest[]
  - `email` string, required — Email address
  - `emailType` string, required — Type of email
  - `source` string — Source of the email
  - `createdAt` string, date
  - `createdBy` string — The user who created the record
  - `updatedAt` string, date
  - `updatedBy` string — The user who last updated the record

## Response `200`

Emails updated successfully

- object

## Other responses

- `400` — Bad request - Invalid input or validation error
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Not found - Workflow not found
- `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)
