Deleting a comment in Zoho Desk via the API is straightforward — you issue a DELETE request to the appropriate endpoint, supplying the parent record ID and the comment ID. Beam Help is independent expert support for Zoho, not official Zoho support.
Why this matters
Comments accumulate across tickets, tasks, calls, contracts, events, accounts, and contacts in Zoho Desk. Whether you are cleaning up test data, removing sensitive information posted in error, or automating a data-retention policy, knowing the correct endpoint for each record type is essential. Getting the wrong endpoint means a 404 or permission error that can be hard to diagnose without a clear reference.
Step-by-step
Zoho Desk exposes a separate delete-comment endpoint for every major record type. Identify which record type holds the comment you want to remove, then follow the matching step below.
Step 1. Gather your IDs.
Before calling any endpoint you need two values: the ID of the parent record (ticket, task, call, etc.) and the ID of the specific comment. Both are returned by the corresponding list or fetch endpoints and are plain strings in Zoho Desk's API.
Step 2. Delete a comment on a ticket.
Send a DELETE request to /api/v1/tickets/{ticketid}/comments/{commentid}, replacing {ticketid} with the ticket's ID and {commentid} with the comment's ID. A successful call removes the comment from that ticket permanently. [3]
Step 3. Delete a comment on a task.
Use DELETE /api/v1/tasks/{taskId}/comments/{commentId} for comments attached to task records. Supply taskId and commentId as path parameters. [1]
Step 4. Delete a comment on a call.
For call-level comments, the endpoint is DELETE /api/v1/calls/{callId}/comments/{commentId}. Pass the call's ID and the comment's ID in the path. [5]
Step 5. Delete a comment on an event.
Event comments are removed via DELETE /api/v1/events/{eventId}/comments/{commentId}, with eventId and commentId as path parameters. [6]
Step 6. Delete a comment on a contract.
To remove a comment from a contract record, call DELETE /api/v1/contracts/{contractId}/comments/{commentId}. [2]
Step 7. Delete a comment on an account.
Account-level comments use DELETE /api/v1/accounts/{accountId}/comments/{commentId}, with accountId and commentId in the path. [4]
Step 8. Delete a comment on a contact.
For contact records, the endpoint is DELETE /api/v1/contacts/{contactId}/comments/{commentId}. [8]
Step 9. Confirm your OAuth scopes.
All Zoho Desk API calls require a valid OAuth token. For ticket operations the token must include at minimum Desk.tickets.DELETE. For tasks, events, and settings-related records, include Desk.tasks.DELETE, Desk.events.DELETE, and Desk.settings.DELETE respectively. Ensure your OAuth client is configured with the scopes that match the record types you are targeting. [7]
Common pitfalls
- Mismatched record type and endpoint. Each record type has its own comment sub-resource. Sending a ticket's comment ID to the
/tasks/endpoint will return an error because the comment does not exist under that parent. Always match the endpoint to the record type. [1][3] - Missing or insufficient OAuth scope. If your token was generated without the
DELETEscope for the relevant record type (e.g.,Desk.tickets.DELETE), the API will reject the request with an authorisation error. Re-generate the token with the correct scopes included. [7] - Incorrect ID format. Both the parent record ID and the comment ID must be passed as strings in the path. Passing an integer or a malformed value will cause the request to fail. [3]
What to check
- Verify that the
commentIdyou are targeting actually belongs to the parent record ID you are using in the path — a mismatch will result in a not-found error. [3][1] - Confirm your OAuth token includes the
DELETEpermission scope for the specific record type (tickets, tasks, events, etc.) before making the call. [7] - After the
DELETEcall returns successfully, fetch the parent record's comment list to confirm the comment no longer appears. [3]