---
title: "Replace user-defined fields on a facility workflow"
method: PUT
path: "/facility-credentialing-workflows/{workflowId}/userdefinedfields"
tags: ["FacilityCredentialingWorkflow"]
---

# Replace user-defined fields on a facility workflow

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

Replaces the entire `userDefinedFields` object on the specified facility credentialing workflow with the object provided in the request body (replace-all / RESTful PUT semantics). **When to use:** Use to set or update custom metadata for a workflow. Omitting a key removes it. To clear all user-defined fields, send an empty object `{}`. **Constraints:** This field cannot be modified once the workflow reaches a completed or invalid status — a `400 Bad Request` is returned in that case (`WorkflowCompletedException` or `WorkflowStatusInvalidException`). **Schema:** **Returns:** `200 OK`. Returns `400` if the workflow is in a terminal status or if the input is otherwise invalid.

## Path parameters

- `workflowId` string, required

## Headers

- `tenant-id` string, required

## Request body

- object — User defined fields object with custom properties

## Response `200`

User defined fields updated successfully

- object

## Other responses

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