Create a comment over a hash

Create a comment and if necessary confirm detection over a hash

This endpoint allows you to create a comment over certain hash, this comment may be visible to other partners (for example if they also detect the hash) and to monitor users who have a file with this hash.
A MonitorHashComment also have a detection attribute that could be set to 'confirmed' to ignore this particular hash from that moment on. Once the hash comment is marked as confirmed any new monitor analysis for this file that your engine will detect will not be shown anymore when requesting latests analyses. This behaviour can be reverted deleting the comment or updating it with detection attribute set to None.
Ignored hashes with detections still can be retrieved using /hashes endpoint with a filter "tag:ignored"

import requests

sha256 = '<hash-sha256>'
engine = '<your-engine-id>'

url = "https://www.virustotal.com/api/v3/monitor_partner/hashes/%s/comments" % sha256
data = {'data': [{'attributes': {
          'comment': '[TEXT]',
          'detection': 'confirmed',
          'engine': engine,
          'sha256': sha256},
        'type': 'monitor_hash_comment'}]}

response = requests.request("POST", url, data=json.dumps(data))
print(response.text)
{
  'data': [
    {
      'type': 'monitor_hash_comment',
      'id': '{id}',
      'attributes': {
        'comment': '{text}',
        'detection': 'confirmed',
        'engine': '{engine name}',
        'sha256': '{sha256}'
      }
    }
  ]
}
Language
Click Try It! to start a request and see the response here!