---
title: "Bulk-assign or unassign facility credentialing workflows"
method: POST
path: "/facility-credentialing-workflows/assignments"
tags: ["FacilityCredentialingWorkflow"]
---

# Bulk-assign or unassign facility credentialing workflows

`POST /facility-credentialing-workflows/assignments`

Assigns one or more facility credentialing workflows to a set of users in a single call, distributing workflows evenly across the supplied user IDs using round-robin. **When to use:** Use to reassign a batch of workflows or to clear all assignees at once. To assign a single workflow, use `POST /facility-credentialing-workflows/{id}/assignments`. **Key behaviors:** * Existing assignees are replaced by the new assignment — this is not additive. * To unassign all workflows in the batch, pass an empty array for `assignedTo`. * Each workflow is processed independently; the response contains separate `successful` and `failed` arrays — inspect both. * * **Returns:** `200 OK` with bulk-result arrays listing which workflow IDs succeeded and which failed.

## Headers

- `tenant-id` string, required

## Request body

- BulkCreateFacilityAssignmentRequest — Request to create assignments for multiple facility credentialing workflows
  - `workflowIds` string[] — List of facility credentialing workflow IDs to assign. Required when isSelectAll is false. Ignored when isSelectAll is true (workflow IDs will be fetched using the filter).
  - `assignedTo` string[], required — List of user IDs to assign workflows to. Workflows will be evenly distributed across these users. If empty array, all workflows will be unassigned (assignedTo set to null).
  - `reason` string — Optional reason for the assignment
  - `filter` string — Filter criteria as JSON string (URL encoded). Used to fetch workflow IDs when isSelectAll is true. See GET /facility-credentialing-workflows endpoint documentation for filter format.
  - `isSelectAll` boolean — If true, fetch all workflow IDs matching the filter criteria instead of using workflowIds. When true, filter parameter is required and workflowIds will be ignored.

## Response `200`

Bulk assignment operation completed. Check successful and failed arrays for individual results.

- BulkFacilityAssignmentResponse — Response containing results of bulk facility assignment operation
  - `successful` AssignmentResult1[] — List of successful assignments
    - `workflowId` string — ID of the facility credentialing workflow
    - `assignment` FacilityAssignmentHistoryResponse — Response containing assignment history for a facility credentialing workflow
      - `workflowId` string — Unique identifier for the facility credentialing workflow
      - `tenantId` string — ID of the tenant
      - `tenantFacilityId` string — ID of the tenant facility
      - `assignments` AssignmentEntry1[] — Assignment history entries, with latest at index 0
        - `assignedFrom` string — User ID the assignment changed from
        - `assignedTo` string — User ID the assignment changed to
        - `assignedBy` string — User ID who made the assignment change
        - `assignedOn` string — Timestamp when the assignment was changed
        - `reason` string — Reason for the assignment change
    - `error` string — Error message if assignment failed
  - `failed` AssignmentResult1[] — List of failed assignments with error details
    - `workflowId` string — ID of the facility credentialing workflow
    - `assignment` FacilityAssignmentHistoryResponse — Response containing assignment history for a facility credentialing workflow
      - `workflowId` string — Unique identifier for the facility credentialing workflow
      - `tenantId` string — ID of the tenant
      - `tenantFacilityId` string — ID of the tenant facility
      - `assignments` AssignmentEntry1[] — Assignment history entries, with latest at index 0
        - `assignedFrom` string — User ID the assignment changed from
        - `assignedTo` string — User ID the assignment changed to
        - `assignedBy` string — User ID who made the assignment change
        - `assignedOn` string — Timestamp when the assignment was changed
        - `reason` string — Reason for the assignment change
    - `error` string — Error message if assignment failed
  - `totalProcessed` integer — Total number of workflows processed
  - `successCount` integer — Number of successful assignments
  - `failureCount` integer — Number of failed assignments

## Other responses

- `400` — Invalid request data
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - User does not have required permissions
- `500` — Internal Server Error - An unexpected error occurred

---

[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)
