---
title: "Delete a sales opportunity"
method: DELETE
path: "/sales-opportunities/{id}"
tags: ["Sales Opportunities"]
---

# Delete a sales opportunity

`DELETE /sales-opportunities/{id}`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/sales-opportunities/{id}`
- Auth: API key in header `clevergy-api-key`

Hard-deletes a sales opportunity. Currently only CONTRACT opportunities are
supported; other products return 404. Related notes are removed by cascade.
Emits a Pub/Sub DELETE event (tenant webhooks are not notified for DELETE).

## Path parameters

- `id` string, required

## Response `200`

Deleted contract sales opportunity

- ContractSalesOpportunity: CONTRACT sales opportunity details including contracting payload fields
  - `id` string, required
  - `product` 'CONTRACT', required
  - `status` 'STARTED' | 'POTENTIAL' | 'FORMALIZED' | 'CONVERTED' | 'REJECTED', required
  - `userId` string
  - `holder` string
  - `nif` string
  - `email` string
  - `phoneNumber` string
  - `houseId` string
  - `address` string
  - `tariffId` string
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `referralCode` string
  - `invoiceId` string
  - `invoiceAnalysisId` string
  - `contractedPower` number[]
  - `contactEmail` string
  - `contactName` string
  - `contactSurname` string
  - `contactPhone` string
  - `contactNif` string
  - `cups` string
  - `addressBlockNumber` string
  - `addressFloor` string
  - `addressStaircase` string
  - `addressDoor` string
  - `addressPostalCode` string
  - `addressAdditionalInfo` string
  - `bankAccountHolder` string
  - `iban` string
  - `submitted` boolean

## Other responses

- `401`: Unauthorized
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
