Skip to main content

Delete Lost Opportunity

Permanently remove a lost opportunity from the system. This operation cannot be undone.

πŸ”Ή Endpoint Details​

DELETE /api/v1/lost-opportunities/{id}

πŸ”’ Authentication​

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

πŸ“ Path Parameters​

ParameterTypeRequiredDescription
idstring (UUID)YesID of the lost opportunity to delete

🧩 Request Example​

curl -X DELETE "https://openapi.onlive.site/api/v1/lost-opportunities/123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

πŸ“₯ Response​

Success Response (200 OK)​

Returns the deleted Lost Opportunity entity.

Response Example​

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"organizationName": "Acme Inc.",
"entityType": "iCall",
"interactionId": "call_abc123",
"status": "rejected",
"reason": "Customer chose a competitor",
"comment": "Customer asked to be contacted again in Q3",
"origin": "Website contact form",
"userEmail": "[email protected]",
"userPhone": "+33612345678",
"extraFields": { "department": "Sales" },
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"userGroup": "Sales Team",
"involvedAgent": "123e4567-e89b-12d3-a456-426614174002",
"visibleAt": "2025-05-13T15:00:00Z",
"externalId": "frm_abc123",
"createdAt": "2025-05-13T15:00:00Z",
"updatedAt": "2025-05-13T18:00:00Z"
}

❌ Error Responses​

StatusDescription
404Lost opportunity not found

This endpoint follows the standard error format.

πŸ“˜ Notes​

  • Deletion is permanent and cannot be undone
  • The lost opportunity must belong to your organization
  • You must have appropriate permissions to delete lost opportunities

βœ… Common Use Cases​

  • 🧹 Cleanup: Remove duplicate or test records
  • πŸ”’ Compliance: Erase records on right-to-be-forgotten requests
  • πŸ—‘οΈ Spam: Discard records flagged as noise