Delete the ContactId Based Opportunities
Contents
Remove Contact Opportunity
Base URL
https://apimobile.callproof.com
Endpoint
/api/contacts/{id}/opportunities/{opportunity_id}
Purpose
Deletes a specific sales opportunity associated with a contact. The deletion also removes related linked accounts, linked people, and opportunity history for that opportunity. Only users with manager permission can perform this action.
HTTP Method
DELETE
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
- Manager permission is required to delete an opportunity.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact associated with the opportunity |
| opportunity_id | integer | Yes | Unique identifier of the opportunity to delete |
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location --request DELETE 'https://apimobile.callproof.com/api/contacts/{id}/opportunities/{opportunity_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location --request DELETE 'https://apimobile.callproof.com/api/contacts/{id}/opportunities/{opportunity_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Indicates that the opportunity was deleted successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "The selected opportunity was successfully deleted.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – the opportunity could not be deleted (for example, permission denied, contact not found, invalid opportunity, or processing error) |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – The user does not have manager permission ("Permission denied"), the contact was not found, the opportunity ID is invalid for the given contact, or another error occurred while removing the opportunity.
- 401 – Authentication failed or the access token is missing/expired.