Delete Comment Annotations
Comments Annotations
Delete Comment Annotations
POST
Delete Comment Annotations
Use this API to delete comment annotations from a document within an organization.
Additional filters can be applied using location IDs, annotation IDs, or user IDs — plus the agent filters (
agentId, agentSuggestions, agentUrls) to scope the delete to agent-authored annotations.
Endpoint
POST https://api.velt.dev/v2/commentannotations/delete
Headers
Your API key.
Your Auth Token.
Body
Params
Agent filters (V2 only, combinable). Unlike the Get Comment Annotations agent filters (one per request), the delete filters are AND-combined:
agentId + agentSuggestions + agentUrls deletes only that agent’s still-pending suggestions on those page(s); each alone deletes all suggestions / all of that agent’s annotations / all agent annotations for those pages respectively. They also intersect with annotationIds when both are supplied.Agent filters require the workspace to have advanced queries enabled — otherwise the request fails with NOT_FOUND (Advanced queries are not enabled...) rather than falling back to a document-wide delete. If none of the supplied agentUrls resolve to a valid page (e.g. blank or fragment-only URLs), the request fails with INVALID_ARGUMENT instead of widening the delete scope.Example Requests
1. Delete annotations by organizationId and documentId
2. Delete annotations by organizationId, documentId and locationIds
3. Delete annotations by organizationId, documentId, locationIds and userIds
4. Delete annotations by organizationId, documentId and userIds
5. Delete annotations by organizationId, documentId and annotationIds
6. Delete annotations by organizationId, documentId, locationIds and annotationIds
7. Delete annotations by documentId. This will work if the document was created without an organization.
8. Delete annotations by documentId and locationIds. This will work if the document was created without an organization.
9. Delete annotations by documentId and userIds. This will work if the document was created without an organization.
10. Delete annotations by documentId and annotationIds. This will work if the document was created without an organization.
11. Delete annotations by documentId, locationIds, and userIds. This will work if the document was created without an organization.
12. Delete annotations by documentId, locationIds, and annotationIds. This will work if the document was created without an organization.
13. Delete an agent’s still-pending suggestions for specific pages
Combines the agent filters (AND semantics): only annotations authored byspell-check that are still pending suggestions and stamped for one of the listed pages are deleted.

