Skip to main content

getSimilarEmails

You can use this method to retrieve emails similar to a given email.

Tip

After viewing the similar emails, you can delete all of them or select specific ones. To do this, refer to createResponseAction.

Parameters

Parameter

Description

Included in request

Type

Values

emailId

The ID of the reference email used to identify similar emails.

Mandatory

String

No additional requirements.

These are common parameters, available across all public API methods.

Parameter

Description

Included in request

Type

Values

id

This parameter adds an identifier to the request, linking it to its corresponding response.

The target replies with the same value in the response, allowing easy call tracking.

Mandatory

String

No additional requirements.

method

The name of the method you are using to send the request.

Mandatory

String

Must be a valid method name.

jsonrpc

The version of JSON-RPC used by the request and the response.

Mandatory

Integer

Possible values:

  • 2.0

params

An object containing the configuration of the request.

Mandatory

Object

No additional requirements.

Under the params object

page

The results page number.

Optional

Integer

Default value: 1.

perPage

The number of results displayed per page.

Optional

Integer

The upper limit is 1000 items per page.

Default value: 1000.

Return value

Attribute

Type

Description

result

Object

Contains the success status of the request, the total number of similar emails found, and the detailed list of those emails. Refer to result.

Objects

result

Attribute

Type

Description

success

Boolean

Indicates whether the operation was successful, returning true on success and false otherwise.

emails

Array of Objects

Each object contains the following settings:

  • _id (String) - The email ID associated with the node in GravityZone Control Center.

  • companyId (String) - The ID of the company where the email was received.

  • similarityHash (String) - The similarity hash used to identify the email.

  • subject (String) - The subject of the email.

  • to (Array of Strings) - The list of email recipients.

  • from (String) - The email of the sender.

  • mailId (String) - The external email ID.

  • userId (String) - The recipient’s external account identifier.

  • type (Integer) - The only supported type value is 1, which represents a Microsoft 365 (Office 365) email.

  • receivedTime (String) - The date and time when the email was received.

  • outgoing (Boolean) - It is true if the email was sent by someone in your company; false if it was received by someone in your company.

Note

The reference email is included in the list of returned emails.

total

Integer

The total number of similar emails found.

Example

Request

{
    "params": {
        "emailId": "AAMkAGFiOTUwZGQwLTA2M2EtNDdmMS05OTkzLWUzZWU2ODFiNjFiZQBGAAAAAACDOImdWGluQ7r9pFUliEgGBwCEBm6gCuzWSYeoOcRa3_5rAAAAAAEPAACEBm6gCuzWSYeoOcRa3_5rAAPFIK-oAAA=",
        "perPage": 1,
        "page": 1
    },
    "jsonrpc": "2.0",
    "method": "getSimilarEmails",
    "id": "7d2864e9-c67b-48a2-9ba3-0a11d47e83c8"
}

Response

{
    "id": "7d2864e9-c67b-48a2-9ba3-0a11d47e83c8",
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "emails": [
            {
                "_id": "6909ca075c65b7584a65deb3",
                "companyId": "6837077785c907e4ca044812",
                "similarityHash": "hash",
                "subject": "Test Email 2 - 2025-11-04T09:40:22.441Z",
                "to": ["user@bitdefender.onmicrosoft.com"],
                "from": "sender@bitdefender.onmicrosoft.com",
                "mailId": "BBNDAhkNTIyNjYzLTQ1ZmYtNDZlNi1iMjExLWVmZjhlYWRjYzIxNABGAAAAAAB7fiYJE372QbIC-lf_MXEHBwAJPJXoGMjpRYZoFcE4nZMWAAAAAAEPAAAJPJXoGMjpRYZoFcE4nZMWAAPF9SdyAAA=",
                "userId": "d0c55688-45c4-4bfc-a033-c49caa3b3b9e",
                "type": 1,
                "receivedTime": "2025-09-15T11:44:33",
                "outgoing": true
            }
        ],
        "total": 18
    }
}