Skip to content

Delete Opportunity

DELETE /external/v1/opportunities/:id

Permanently deletes an opportunity from your pipeline.

Authentication

Requires opportunities:delete permission.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the opportunity

DANGER

This action is permanent and cannot be undone. The opportunity and all associated conversation history will be permanently deleted.

Request

bash
curl --request DELETE \
  --url "https://app.getraze.com/external/v1/opportunities/opp_abc123def456" \
  --header "X-API-Key: YOUR_API_KEY"
javascript
const axios = require('axios');

const opportunityId = 'opp_abc123def456';

const response = await axios.delete(
  `https://app.getraze.com/external/v1/opportunities/${opportunityId}`,
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

console.log(response.data);
python
import requests

opportunity_id = 'opp_abc123def456'

response = requests.delete(
    f'https://app.getraze.com/external/v1/opportunities/{opportunity_id}',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)

print(response.json())

Response

json
{
  "success": true,
  "message": "Opportunity deleted successfully"
}

Errors

StatusCodeDescription
404NOT_FOUNDOpportunity not found

GetRaze - AI-Powered Lead Generation