---
title: "Bulk-delete records from one credentialing workflow section"
method: POST
path: "/credentialing-workflows/{workflowId}/{sectionName}/bulk-delete"
tags: ["CredentialingWorkflow"]
---

# Bulk-delete records from one credentialing workflow section

`POST /credentialing-workflows/{workflowId}/{sectionName}/bulk-delete`

Deletes multiple records from a single section in one action (CP-36357, CP-37276). The supported sections are enumerated on the sectionName parameter; any other section is rejected with 400. Each recordId uses the '{section}-{index}' format (e.g. 'practiceLocations-3') and its section must match the sectionName path parameter, so a request can never delete outside the section it targets. Deletion is a single read-modify-write and soft-deletes the records: each removed record is archived into deletedData with the supplied intent/reason/reasonText, exactly as the single-record delete does. Partial failures (malformed, wrong section, out-of-bounds recordIds) are reported per record and do not block the valid deletions. NOTE: recordIds are positional, so this request must not be retried automatically — a replay after a successful-but-unseen response would delete whatever records shifted into those indices. Re-fetch the section and rebuild recordIds before any retry.

## Path parameters

- `sectionName` string, required
- `workflowId` string, required

## Headers

- `tenant-id` string, required

## Request body

- BulkDeleteSectionRecordsRequest — Identifiers of the section records to delete in one action, plus the deletion metadata applied to all of them.
  - `recordIds` string[], required — Record identifiers in '{section}-{index}' format; the section must match the sectionName path parameter. At most 500 per request.
  - `deletion` DeleteSectionRecordRequest — Metadata required when soft-deleting a credentialing section record.
    - `intent` string — Deletion intent. Null is accepted when the soft-delete modal is disabled and intent is not collected from the user.
    - `reason` string — Deletion reason. Null is accepted when the soft-delete modal is disabled and reason is not collected from the user.
    - `reasonText` string — Free-text explanation; required when reason is OTHER. Max 2000 characters.

## Response `200`

At least one record was deleted; body reports the deleted and failed records

- BulkDeleteSectionRecordsResponse — Outcome of a section bulk-delete request, per record.
  - `section` string, required — The section the records were deleted from.
  - `deleted` string[], required — Record identifiers that were successfully deleted.
  - `failed` BulkDeleteSectionRecordsFailedRecord[], required — Records that could not be deleted, with the reason for each.
    - `recordId` string, required — The record identifier that failed.
    - `reason` string, required — Human-readable reason the record was not deleted.

## Other responses

- `400` — Unsupported section, empty/blank/invalid recordIds, invalid deletion metadata, a blank tenant-id, or a missing request body
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Credentialing workflow not found
- `422` — No record was deleted — every recordId failed (malformed, wrong section, or out-of-bounds); the body carries the per-record failure reasons
- `500` — Internal server error
- `503` — Feature disabled by kill switch

---

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