;

Invite candidate by test link

Registers candidate for given test using specific test link.
API Behavior

Inviting candidate using test link, will copy settings from given test link and apply that to invite. Useful, in case, if you wish to keep same settings for each invitations or segregate invites based on test links for example campus recruitment or remote assessment.

By default, API does not send email to candidate.

Each test link will behave in isolated fashion when inviting same candidate across different testlink of that test. You can invite same candidate (candidate is considered same if email address used is same), in different test link for the same test.

Original Invitation Status Invite API Behavior
Invitation Pending (Test Attempt not taken) Invite API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request. 
Invitation Cancelled Invite API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request and changes the Invitation Status to Pending
Invitation Expired Invite API doesn't throw an error. It returns back the pending invitation. However it replaces the old Access time and timezoneid with the new details passed in the API request and changes the Invitation Status to Pending.
Test Status- Complete Invite API doesn't throw an error. It returns the same invitation but if the Candidate attempts the test, the Test platform will show message “You have already appeared for the test. Please contact test administrator for further assistance.”
Test Status- In Progress Invite API doesn't throw an error. It returns the current invitation for which the Test is in Progress
Test Status- Test Left Invite API doesn't throw an error It returns the same invitation if the Candidate attempts the test, the Test platform will show message “You have already appeared for the test. Please contact test administrator for further assistance."
POST https://apiv3.imocha.io/v3/tests/{testId}/testlinks/{testLinkId}/invite
  • Docs
  • Try it
Request URL Parameters
Field Type Required Default Description
testId Integer64 Yes - Unique identifier of the test
testLinkId Integer64 Yes - Unique identifier of the test link
Request Body Parameters
Field Type Required Default Description
email String Yes - Email address of candidate
name String Yes - Full name of candidate
callbackUrl String No - Receive candidate test completion notification at your mentioned endpoint
redirectUrl String No - Redirect candidate to given URL after test completion
disableMandatoryFields Integer No 0 When enabled, email and name fields not required. System auto generates random values both fields.
hideInstruction Integer No 0 Skips test instruction page
sendEmail String No no When enabled sends test invitation email to candidate.By default disabled. Possible values yes/no
Response
Field Type Description
testInvitationId Integer64 Unique identifier given to each test attempt
testUrl String URL which candidate can access to appear for the test
Example API endpoint

URL 1: /v3/tests/{testId}/testlinks/{testLinkId}/invite

Sample Request Body
Request Body
{ "email":"[email protected]", "name":"amey", "callbackURL":"https://www.imocha.io/", "redirectURL":"https://www.imocha.io/", "disableMandatoryFields":0, "hideInstruction":0 }
Successful response

Status 200 OK

Response
{ "testInvitationId": 2807324, "testUrl":"https://test.imocha.io/IMInstructions?bk1kdWNyYXdudzN", "status":"Complete" }
Failed response

Status 400 Bad Request

If required parameters have invalid values.

Response
{ "errors": [ "'Email' must not be empty.", "Email address is in invalid format" ] }
Parameter Value Description Parameter Type Data Type
testId test Id associated with particular test Query Integer64
testLinkId Unique Test Link Id associated with particular test Query Integer64
emailId Email Id of Candidate Body String
fullName Full name of Candidate Body String
callbackURL After completion of test callback object will be send on this URL Body String
redirectURL After completion of test candidate will redirect to this URL Body String
disableMandatoryFields When enabled, email and name fields not required. System auto generates random values for both fields. Body Integer
hideInstruction Skips test instruction page Body Integer
sendEmail When enabled sends test invitation email to candidate.By default disabled Body String
  • Response Body