Below V2 API documentation is being deprecated. For latest API docs, visit

Update Test Link

  • Description

    Modify existing test link settings
  • URL structure

    https://api.interviewmocha.com/v2/org/tests/{testId}/testlinks/{testLinkId}

  • Request Method

    POST

  • Request Data

    Request URL Parameters
    Parameter Description Default Data Type Is Mandatory
    testId Test Id associated with particular test None Int64 Yes
    testLinkId Unique Test Link Id None Int64 Yes
    Request Body Parameters
    Parameter Description Default Data Type Is Mandatory
    testLinkName Name of test link None String Yes
    accessTime Represent access time set for current link 0 Int Yes
    timeZoneId Time zone in which test should be accessible as per given start datetime and end datetime Account Default Int Yes
    inviteCandidateOnly Candidate invited using email can appear for test. Sharing test link will not work 0 Int No
    imageProctoring Enable image proctoring for test link 0 Int No
    emailToStakeholder Send email to stakeholders if candidate completes test Account Email String No
    testLinkStatus Enable or disable test link 1 Int No
    Access Time
    Parameter Description Data Type Values
    accessTime Zero(0) denotes that test can be accessed anytime Int64 0
    accessTime One(1) denotes that test is time bound Int64 1
    accessTime Two(2) denotes that test is slot wise Int64 2
    If Access Time = 0 (Anytime)

    Description: Test is accessible to anyone with test URL or access key

    Parameter Description Default Data Type Is Mandatory
    timeZoneId Time zone in which test should be accessible as per given start datetime and end datetime Account Default Int Yes
    If Access Time = 1 (Time Bound)

    Description: Using time bound invitation, any invitation sent with these settings make it mandatory to candidate to give test within that date time period.

    For Example:Candidate can access test from 2nd Feb 2018 04:00PM to 3rd Feb 2018 05:00 PM

    Following parameters needs to be included in request body if Access Time = 1

    Parameter Description Data Type Is Mandatory
    startDateTime UTC date time in string
    Format Example: 2018-02-15T16:00:00 (15th Feb 2018 04:00:00 PM)
    String Yes
    endDateTime UTC date time in string
    Format Example: 2018-02-16T17:00:00 (16th Feb 2018 05:00:00 PM)
    String Yes
    timeZoneId Time zone in which test should be accessible as per given start datetime and end datetime Int Yes
    If Access Time = 2 (Slot wise)

    Description: Using slot wise invitation, any invitation sent with these settings make it mandatory to candidate to give test within that date and specifically in that time period.

    For Example:Candidate can access test from 2nd Feb 2018 to 3rd Feb 2018 In only 4:00 PM to 05:00 PM time slot on both days 2nd Feb and 3rd Feb 2018.

    Following parameters needs to be included in request body if Access Time = 2

    Parameter Description Data Type Is Mandatory
    startDateTime UTC date time in string
    Format Example: 2018-02-15T16:00:00 (15th Feb 2018 04:00:00 PM)
    String Yes
    endDateTime UTC date time in string
    Format Example: 2018-02-16T17:00:00 (16th Feb 2018 05:00:00 PM)
    String Yes
    timeZoneId Time zone in which test should be accessible as per given start datetime and end datetime Int Yes
  • Test Link Status Table

    Parameter If Then
    testLinkStatus 1 Test link is active
    testLinkStatus 3 Test link is inactive

    TimeZoneId Table

    More information
  • Response Data

    Parameters
    Argument Name Description Return Data Type
    statuscode Status code returned with every response String
    description Status code message String
    result Wrapper Object Object
    result.testLinkId Unique Id of test link Int64
    result.testId Test Id associated with particular test Int64
    result.testLinkName Name of test link String
    result.testLinkAccessKey Unique access key required to appear for test String
    result.accessTime Represent access time set for current test link Int
    result.startDateTime UTC date time in string String
    result.endDateTime UTC date time in string String
    result.timeZoneId Time zone in which test should be accessible as per given start datetime and end datetime Int
    result.inviteCandidateOnly Only candidate invited using email can appear for test Int
    result.imageProctoring Enable image proctoring for test link Int
    result.emailToStakeholder Send email to stakeholders when candidate complete the test String
    result.testLinkStatus Enable or disable test link Int
  • Sample Code

    Example Curl request will look like this:

    curl -i -H "x-api-key:YOUR_API_KEY_HERE" -H "content-type:application/json;charset=utf-8" -X POST https://api.interviewmocha.com/v2/org/tests/144659/testlinks/35183 -d '{ "testLinkName": "PICT1", "accessTime": 0, "timeZoneId": 1720, "inviteCandidateOnly": 0, "imageProctoring": 1, "emailToStakeholder": "test@interviewmocha.com", "testLinkStatus": 1, "startDateTime": "" , "endDateTime": "" }'

    Sample response:
     {
        "statuscode": "200.1",
        "description": "The request has succeeded.",
        "result": {
            "testLinkId": 35183,
            "testId": 144659,
            "testLinkName": "PICT1",
            "testLinkAccessKey": "8f6fd01558",
            "accessTime": 0,
            "startDateTime": null,
            "endDateTime": null,
            "timeZoneId": 1720,
            "inviteCandidateOnly": 0,
            "imageProctoring": 1,
            "emailToStakeholder": "test@interviewmocha.com",
            "testLinkStatus": 1
        }
    }