;

Callback notification

On completion of test, report is generated and a notification is sent to the callback URL. To receive such notifications, you need to register a callback URL that will be used to send the callback object for generated report.

Note: Notification is being sent only once if your endpoint is down or had an issue, we will try to post callback 5 times consecutively after which Mocha will stop this activity. To reply or reprocess failed callbacks use Process Callbacks API

Register a notification URL

You can register the callback URL by sending the "callbackURL" parameter value with invite candidate api call. Please note that the callback URL should be able to accept HTTP POST type request. Also make sure to turn on TLS v1.2 or above on endpoint else callback will fail.

Notification Types

There are 2 notification sent to specified callback endpoint. When test is in

  • In Progress
  • Complete / Terminated / Test Left

Field Data Type
CandidateEmailId String
AttemptedOn String
TotalScore Float
CandidateScore Float
ReportPDFUrl String
TestInvitationId Integer64
Status String
AttemptedOnUtc String
PerformanceCategory String
Notification body for "In Progress"
Sample Notification body
{ "CandidateEmailId": "[email protected]", "AttemptedOn": "09-Oct-2020 06:51 PM", "TotalScore": 0, "CandidateScore": 0, "ReportPDFUrl": null, "TestInvitationId": 3314697, "Status": "In Progress", "AttemptedOnUtc": "2020-10-09T13:21:53", "PerformanceCategory": null }
Notification body for "Complete / Terminated / Test Left"
Sample Notification body
{ "CandidateEmailId": "[email protected]", "AttemptedOn": "09-Oct-2020 06:51 PM", "TotalScore": 115, "CandidateScore": 6, "ReportPDFUrl": "https://app.imocha.io/PDFReport?id=OXP5R5ayMu8nrHfnh2g%3d%3d", "TestInvitationId": 331469, "Status": "Complete", "AttemptedOnUtc": "2020-10-09T13:21:53", "PerformanceCategory": "Beginner" }