> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# DELETE /v1/crm/pipelines/{pipeline_id}/stages/{stage_id}

> Delete a stage, moving the deals it holds to another stage first.

Deletes a stage. If deals are in it, `move_to` names the stage of the same pipeline they go to first; each is moved as if moved on the board, so moving them into a closing stage wins or loses them, and each move sends its own webhook event. A pipeline keeps at least one stage.

<Note>Needs the `crm.pipelines:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `pipeline_id` | integer | Yes | The pipeline's id. |
| `stage_id` | integer | Yes | The stage's id, in this pipeline. |

## Query parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `move_to` | integer | When it holds deals | Another stage of this pipeline, for the deals in this one. |

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.fireflo.au/v1/crm/pipelines/3/stages/12?move_to=11" \
    -H "Authorization: Bearer $OMNI_API_KEY"
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.delete(
      "https://api.fireflo.au/v1/crm/pipelines/3/stages/12?move_to=11",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
  )
  print(response.status_code)
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/crm/pipelines/3/stages/12?move_to=11", {
    method: "DELETE",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
    },
  });
  console.log(response.status);
  ```
</CodeGroup>

## Response

`204 No Content` — no body.

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 400 | `invalid_request` | The stage holds deals and `move_to` is missing, `move_to` isn't another stage of this pipeline (`field` is `move_to`), or it is the pipeline's only stage (`field` is `stage`). |
| 404 | `not_found` | No pipeline of this account's has that id. |
| 404 | `not_found` | That pipeline has no stage with that id. |
| 404 | `module_off` | The account doesn't have Pipelines on. |
| 403 | `scope_missing` | The key doesn't have the `crm.pipelines:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.