Beam Help
Get help now

How-to · Zoho DESK

How to delete a contract comment in Zoho Desk

Remove a comment from a contract record via API.

Deleting a comment on a contract in Zoho Desk is accomplished via a straightforward REST API call that targets the specific contract and comment identifiers. This guide walks you through the exact endpoint and parameters you need.


> Beam Help is independent expert support for Zoho — we are not official Zoho support.


---


Why this matters


When collaborating on contracts, team members may leave outdated, incorrect, or sensitive comments that need to be removed. Zoho Desk exposes a dedicated delete endpoint for contract comments, making it possible to clean up comment threads programmatically — useful for automated workflows, admin tooling, or bulk clean-up scripts.


---


Step-by-step


Step 1. Identify the two key identifiers you will need before making any API call: the contractId (the unique ID of the contract record) and the commentId (the unique ID of the specific comment you want to remove). Both values can typically be retrieved from earlier API responses or from the contract's detail view in Zoho Desk. [1]


Step 2. Construct your DELETE request to the following endpoint:


DELETE /api/v1/contracts/{contractId}/comments/{commentId}

Replace {contractId} and {commentId} with the actual values you collected in Step 1. [1]


Step 3. If you are using the Python SDK wrapper, call the method as shown below, passing the contract ID, comment ID, and an optional parameters dictionary (p):


client.delete_contract_comment(
    contractId="your_contract_id",
    commentId="your_comment_id",
    p=None  # optional additional parameters
)

The method issues a DELETE request internally to the same endpoint path. [1]


Step 4. Check the HTTP response code returned by the API. A successful deletion will return a 2xx status. If you receive a 4xx error, verify that both IDs are correct and that your API credentials have sufficient permissions to delete comments on that contract. [1]


---


Common pitfalls


  • Wrong ID type: Passing a human-readable contract number instead of the system-generated contractId UUID will cause the request to fail. Always use the internal identifier returned by the Zoho Desk API, not the display reference number. [1]
  • Insufficient permissions: Not all API tokens or user roles have delete privileges on contract comments. Ensure the authenticated user or service account has the appropriate access level for the contract in question. [1]
  • Optional p parameter misuse: The p parameter accepts a dictionary of additional query parameters. Passing malformed data here (e.g., a non-dict type) can cause the SDK to raise an exception before the request is even sent. Pass None if no extra parameters are needed. [1]

---


What to check


  • Confirm both IDs are valid by first calling the relevant GET endpoint for the contract's comments and verifying that contractId and commentId appear in the response before attempting deletion. [1]
  • Verify the comment is gone by re-fetching the comment list for that contract after the DELETE call and confirming the targeted comment no longer appears. [1]
  • Review tagging side-effects: If the deleted comment contained @mention tags directed at collaborators or approvers, those users may have already received in-app and email notifications — deletion of the comment does not retract those alerts. [2]

Sources cited

  1. [1] DELETE /api/v1/contracts/{contractId}/comments/{commentId}
  2. [2] What's new in Zoho Contracts?
  3. [3] Zoho FSM | Integrating Zoho FSM with Zoho Desk
  4. [4] Remove Zoho contract upsell at customer sign completion page
  5. [5] Customizing contract status
  6. [6] Zoho Community | Connect, network, and share on Zoho Forums
  7. [7] Zoho Analytics On-Premise API