Phish API

The Phish API is used by customers who have the Phishing module in MyCompliance.

API Calls

  1. GetAllContent – GET
    Used to get all phish content for a customer.
  2. GetPhishResults – GET
    Used to get all the results for an individual phish simulation.
  3. GetPhishAudits – GET
    Used to get all audits for an individual phish.
  4. GetUserPhishResult – GET
    Used to get all the results for a user for an individual phish simulation. 
  5. GetUserResults – GET
    Used to get the phish simulation results for an individual user.

API Call Examples

GetAllContent – GET

Example

$url = "https://api.metacompliance.com/Phish/GetAllContent?key=7025499D-FB89-438F-
8F3D-96C2EA0678G9"
$contentType = "application/json"

Invoke-RestMethod $url -Headers $headers -ContentType $contentType -Method GET

JSON returned

[
{
"ContentID": 1589,
"Name": "Test Phish",
"State": "ARCHIVE",
"Description": "Test Phish",
"Type": "Phish",
"Language": "English",
"MajorVersion": 1,
"MinorVersion": 0
},
{
"ContentID": 1590,
"Name": "Test Phish1",
"State": "ARCHIVE",
"Description": "Test Phish1",
"Type": "Phish",
"Language": "English",
"MajorVersion": 2,
"MinorVersion": 0
},
{
"ContentID": 1609,
"Name": "Test Phish2",
"State": "CREATE",
"Description": "Test Phish2",
"Type": "Phish",
"Language": "English",
"MajorVersion": 1,
"MinorVersion": 0
}
]

GetPhishResults – GET
Example

$url = "https://api.metacompliance.com/Phish/GetPhishResults?key=7025499D-FB89-
438F-8F3D-96C2EA0678G9&contentName=Phish Test1&contentID=18314"
$contentType = "application/json"

Optional query parameter – customerTimeStamp

$url = "https://api.metacompliance.com/Phish/GetPhishResults?key=7025499D-FB89-
438F-8F3D-96C2EA0678G9&contentName=Phish Test1&contentID=18314
&customerTimeStamp=2020-05-29 10:32:00"

Invoke-RestMethod $url -Headers $headers -ContentType $contentType -Method GET

JSON returned

{
"ContentID": 18314,
"Name": "Phish Test1",
"State": "PUBLISH",
"Type": "Phish",
"Language": "English",
"MajorVersion": 1,
"MinorVersion": 0,
"UserResults": [
{
"Email": "testuser1@metacompliance.com",
"UserID": 450546,
"ContentID": 18314,
"AuditStatus": "Adobe",
"Response": "Opened",
"Clicked": "Clicked",
"ClickCount": 1,
"Timestamp": "2019-05-15T09:31:07.28"
},
{
"Email": "testuser2@metacompliance.com",
"UserID": 450547,
"ContentID": 18314,
"AuditStatus": "Adobe",
"Response": "Opened",
"Clicked": "Clicked",
"Timestamp": "2019-05-15T09:31:29.18"
}
]
}

GetPhishAudits – GET
Example

$url = "https://api.metacompliance.com/Phish/GetPhishAudits?key=7025499D-FB89-438F-
8F3D-96C2EA0678G9&contentName=Phish01&contentID=18792"
$contentType = "application/json"

Optional query parameter – customerTimeStamp

$url = "https://api.metacompliance.com/Phish/GetPhishAudits?key=7025499D-FB89-438F-
8F3D-96C2EA0678G9&contentName=Phish01&contentID=18792
&customerTimeStamp=2020-05-29 10:32:00"

Invoke-RestMethod $url -Headers $headers -ContentType $contentType -Method GET

JSON returned

[
{
"PhishName": "Phish01",
"PhishTemplate": "-",
"DateOpened": "-",
"Clicked": "-",
"ClickCount": "0",
"DataEntry": "0",
"AttachmentOpened": "-",
"LearningExperience": "-",
"LearningAction": "-",
"TimeInLearning": "-",
"DateOfActions": "-",
"IPAddress": "-",
"OS": "-",
"CampaignName": "-",
"UserID": "2445673574",
"Action": "-",
"EmailReported": "No",
"DeliveryStatus": "Delivered",
"Language": "English",
"State": "PUBLISH",
"SCIMPostcode": "-",
"DeliveryTime": "2023-04-20 10:11:26 AM",
"ContentID": "18792",
"Name": "Test User 1",
"Email": "testuser1@metacompliance.com",
"Department": "Development",
"Version": null,
"Timestamp": null,
"UserStatus": "Active",
"CollectiveName": null,
"SubGroup": "-",
"UserType": "AD",
"OU": "Development",
"Domain": "metacompliance",
"SCIMDepartment": "-",
"SCIMStreetAddress": "-",
"SCIMRegion": "-",
"SCIMCountry": "-",
"SCIMLocality": "-",
"SCIMGroup": "-",
"EnrollmentDate": null,
"Supervisor": "-",
"SupervisorsManager": "-",
"CF1": "-",
"CF2": "-",
"CF3": "-",
"CF4": "-",
"CF5": "-",
"AnonResponse": null
}
]

GetUserPhishResult – GET
Example

$url = "https://api.metacompliance.com/Phish/GetUserPhishResult?key=7025499D-FB89-
438F-8F3D-96C2EA0678G9&email=testuser1@metacompliance.com&contentID=18314"
$contentType = "application/json"

Invoke-RestMethod $url -Headers $headers -ContentType $contentType -Method GET

JSON returned

[
{
"Email": "testuser1@metacompliance.com",
"UserID": 450546,
"Name": "Phish Test1",
"ContentID": 18314,
"AuditStatus": "Adobe",
"Response": "Opened",
"Clicked": "Clicked",
"ClickCount": 1,
"Timestamp": "2019-05-15T09:31:07.28"
}
]

GetUserResults – GET
Example

$url = "https://api.metacompliance.com/Phish/GetUserResults?key=7025499D-FB89-438F-
8F3D-96C2EA0678G9&email=testuser1@metacompliance.com"
$contentType = "application/json"

Invoke-RestMethod $url -Headers $headers -ContentType $contentType -Method GET

JSON returned

[
{
"Email": "testuser1@metacompliance.com",
"UserID": 450546,
"Name": "Phish Offers",
"ContentID": 1634,
"AuditStatus": "4th July Offers - Old Navy",
"Response": "Opened",
"Clicked": "Clicked",
"ClickCount": 2,
"Timestamp": "2019-03-03T00:00:00"
},
{
"Email": "testuser1@metacompliance.com",
"UserID": 450546,
"Name": "Amazon Test",
"ContentID": 1723,
"AuditStatus": "Amazon",
"Response": "Opened",
"Clicked": "Clicked",
"ClickCount": 2,
"Timestamp": "2019-03-03T00:00:00"
}
]
Back to all articles