Deleting a contact comment in Zoho Desk is done programmatically via the Desk REST API, using a dedicated DELETE endpoint that targets a specific comment on a specific contact record.
Why this matters
Contact comments in Zoho Desk store internal notes or observations attached to a contact record. Over time, outdated or incorrect comments can clutter a contact's history, and there is no bulk-cleanup tool in the standard UI — so knowing how to call the API directly is essential for keeping contact data clean. This is particularly useful for developers building integrations or admin scripts that manage contact data at scale.
Step-by-step
Step 1. Identify the two required identifiers before making any API call: the contactId of the contact record that owns the comment, and the commentId of the specific comment you want to remove. Both values are strings. You can retrieve them from earlier API calls that list or create contact comments, or by inspecting the contact record in your integration layer. [1]
Step 2. Construct the request URL using the pattern below, substituting your real values for the placeholders:
DELETE /api/v1/contacts/{contactId}/comments/{commentId}
For example, if your contact ID is 123456789 and your comment ID is 987654321, the path becomes:
DELETE /api/v1/contacts/123456789/comments/987654321
Step 3. Send the HTTP DELETE request to the Zoho Desk API base URL for your data centre, appending the path above. Include your authentication headers (OAuth 2.0 bearer token is the standard approach for Zoho Desk API calls). The operation name registered in the Zoho Desk API is deletecontactcomment. [1]
Step 4. If you are working in Python and using a Zoho Desk API client wrapper, the call maps to the following method signature:
delete_contact_comment(contactId: str, commentId: str, p: dict = None)
Pass your contactId and commentId as positional string arguments. The optional p parameter can carry additional query parameters if needed; pass None or omit it for a straightforward deletion. [1]
Step 5. Check the HTTP response status code returned by Zoho Desk. A 200 OK or 204 No Content response confirms the comment was removed successfully. Any 4xx response indicates a problem with the identifiers or your authentication token — see the pitfalls section below. [1]
Common pitfalls
- Wrong ID order. The endpoint requires
contactIdfirst andcommentIdsecond, both in the URL path. Swapping them will result in a404 Not Foundor an unintended deletion attempt on a different resource. [1] - Incorrect data types. Both
contactIdandcommentIdmust be passed as strings, not integers. If your integration stores IDs as numeric types, cast them to strings before constructing the request. [1] - Stale or invalid
commentId. If the comment has already been deleted or the ID was copied incorrectly, the API will return an error. Always verify the comment exists before attempting deletion, especially in automated scripts. [1] - Authentication scope. Ensure your OAuth token has the correct Zoho Desk scope that permits write/delete operations on contact records. A read-only token will be rejected even if the endpoint and IDs are correct. [1]
What to check
- Confirm both IDs are valid strings — retrieve them fresh from the Zoho Desk API rather than relying on cached values that may be stale.
- Verify the comment no longer appears on the contact record by making a subsequent GET request to the contact's comments list after the DELETE call succeeds.
- Review your OAuth token's expiry and scopes to ensure it covers contact comment management, so automated scripts don't fail silently in production.
---
*Beam Help is an independent expert support resource for Zoho products and is not official Zoho support. For platform-level issues, always cross-reference with Zoho's own documentation and support channels.*