## Delete a pipeline for a custom object type

**delete** `/v1/objects/{entitySlug}/pipelines/{id}`

> [!WARNING]
This endpoint is in beta and isn't available to every workspace yet. Its parameters and response schemas may change, including breaking changes.

Deletes the pipeline and its stages, clearing the stage of every record in one. Automations and saved filters that reference it are left as they are. With `dryRun=true`, runs every check and returns the count without deleting anything. A workspace without multiple pipelines is refused with 403 `crm.pipeline.configuration_disabled`.

Requires a workspace owner or admin.

**[Required scopes](/using-the-api/scopes/):** `custom_objects:read` and `config:delete`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Path Parameters

- `entitySlug: string`

  The slug of the custom object type.

- `id: string`

  The pipeline, by its `id` (`pd_…`) or its `slug` (e.g. `$default-pipeline`).

### Query Parameters

- `dryRun: optional boolean`

  Check the request and count the records it would clear, without changing anything. Defaults to false.

### Body Parameters

- `body: optional object {  }`

### Returns

- `ObjectDeletePipelineResponse object { affectedRecordCount }`

  - `affectedRecordCount: number`

    Number of records whose stage is, or would be, cleared.

### Example

```http
curl https://api.lightfield.app/v1/objects/$ENTITY_SLUG/pipelines/$ID \
    -X DELETE \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY"
```

#### Response

```json
{
  "affectedRecordCount": 0
}
```
