;

Invite candidate

Registers candidate for given test using "Default test link".
API Behavior

API will create "Default test link" in system for given test (if not present already), and all future invites (using this API) will apply configuration from default link.

By default, API does not send email to candidate.

This API is handy (kind of shortcut) in case you do not want retrieve test link every single time just to send invites to candidate. If you wish to use specific test link to invite, check "Invite candidate by test link" API.

POST https://apiv3.interviewmocha.com/v3/tests/{testId}/invite
  • Docs
  • Try it
Request URL Parameters
Field Type Required Default Description
testId Integer64 Yes - Unique identifier of the test
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. Callback object can be found here
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 or 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/292930/invite

Sample Request Body
Request Body
{ "email":"amey@yopmail.com", "name":"amey", "callbackURL":"https://www.interviewmocha.com/", "redirectURL":"https://www.interviewmocha.com/", "disableMandatoryFields":0, "hideInstruction":0 }
Successful response

Status 201 Created

Response
{ "testInvitationId": 2807324, "testUrl":"https://test.interviewmocha.com/IMInstructions?bk1kdWNyYXdudzN" }
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
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