Delete the Contact Info Email
Contents
Remove Contact Info Email
Base URL
https://apimobile.callproof.com
Endpoint
/api/contacts/{id}/info-email/{email_id}/info-personnel-email/{personnel_id}
Purpose
Deletes an email address from a contact. Depending on the path and body values, this can remove:
- an additional company email (`email_id` is a real ID and `contact_type` is not provided / is `0`)
- a person’s (personnel) email (`personnel_id` is a real ID and `contact_type` is not provided / is `0`)
- the contact’s primary email (`contact_type` is provided with a non-zero value)
HTTP Method
DELETE
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact |
| email_id | integer | Yes | Unique identifier of the additional company email to delete. Use 0 when deleting a personnel or primary email instead
|
| personnel_id | integer | Yes | Unique identifier of the person whose email should be cleared. Use 0 when deleting a company or primary email instead
|
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| contact_type | integer | No | Contact type identifier. When provided (non-zero), removes the contact’s primary email for that contact type. When omitted or 0, the deletion applies to the company email or personnel email based on the path IDs
|
cURL Example for Android
curl --location --request DELETE 'https://apimobile.callproof.com/api/contacts/{id}/info-email/{email_id}/info-personnel-email/{personnel_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location --request DELETE 'https://apimobile.callproof.com/api/contacts/{id}/info-email/{email_id}/info-personnel-email/{personnel_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Indicates that the email was removed 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, "Email has been deleted.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – the email could not be removed |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Invalid email ID ("Contact Email Id is Invalid"), invalid personnel ID ("Personnel Email Id is Invalid"), contact not found, invalid combination of IDs (for example, "Email_id/Personnel_id not passed."), or another deletion error.
- 401 – Authentication failed or the access token is missing/expired.