Introduction
Welcome to the InterviewApp API! This API can be use to integrate the InterviewApp service on your service and manage your candidates and your interviews on InterviewApp.
We have language bindings in Shell, Java/Scala, and PHP! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
All bindings are available on github on the interview app repo, you can make pull request if you want to make improvement or if you found bugs.
Authentication
InterviewApp uses a pair of API keys to allow access to the API. You can request your API keys on the settings panel of the InterviewApp dashboard. There is an API key and a Secret API key. Both are used to generate a unique url for each request you make on the InterviewApp API.
Auth request
DEFINITION
POST /v1/auth/
EXAMPLE REQUEST
curl -XPOST "https://itwapp.io/api/v1/auth/" -H "Content-Type: application/json" --data '
{
"mail" : "jerome@itwapp.io",
"password" : "jeromeestleplusbeaudeshommes"
}
'
You can also have keys with this api call.
HTTP Request
POST https://itwapp.io/api/v1/auth/
Body Parameters
Parameter | Description |
---|---|
String Your mail used to sign up to InterviewApp. Any collaborator can login through this call. |
|
password |
String Your password |
Result
It will respond with the API key and the Secret API key.
{
"apiKey": "YOUR_KEY_HERE",
"secretKey": "SECRET_KEY"
}
Parameter | Description |
---|---|
apiKey | |
secretKey |
Sign request
To authorize access to resource /api/exemple?foo=bar, use this code:
#!/bin/bash
function HmacSHA256() {
echo -n "$1" | openssl dgst -sha256 -hmac "$2" -binary | base64
}
function md5() {
echo -n "$1" | md5sum | cut -c 1-32
}
function sign() {
hmac=$(HmacSHA256 "$1" "$2")
md5 $hmac
}
URL="/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
signature=$(sign "GET:$URL" "$KEY")
curl "https://itwapp.io$URL&signature=$signature"
## Make sure to replace `$KEY` with your Secret API key, `YOUR_KEY_HERE` with your API key.
The generation of any URL is done by following the workflow described below. For example, let's say you want to access the resource /api/exemple?foo=bar
- First, you need to provide the API key to the url on query string parameter. It will be used to authenticate you to the service:
/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE
- Next, you have to append the current timestamp in millisecond on parameter. It will be used to invalidate old requests in case someone would have intercepted the request and would want to use it again later:
/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS
- Finally, you have to calculate the signature of this request. Use the previous url with the HTTP mode (GET/POST/PUT/DELETE) :
GET:/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS
- Calculate the HmacSHA256 of this string with the secret key provided to you by InterviewApp. Next, shorten it with md5 value. This md5 value is the signature you must append to the url:
/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS&signature=MD5_VALUE
- The url above is the final url you have to send to the InterviewApp API. If this url is not valid, you will receive the HTTP response code 401 - Unauthorized
https://itwapp.io/api/exemple?foo=bar&apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS&signature=MD5_VALUE
Applicant
The applicant object
The interview object JSON is structured as detailed below:
{
"_id" : "53fb562418060018063095db",
"mail" : "jerome@itwapp.io",
"questions" : [
{
"content": "question 1",
"readingTime": 60,
"answerTime": 60,
"number": 1
}
],
"responses" : [
{
"file": "https://video-prod-itwapp.s3.amazonaws.com/XXXXX/XXXX.mp4",
"duration": 60,
"fileSize": 1048576,
"number": 1,
"thumbnail": "https://video-prod-itwapp.s3.amazonaws.com/XXXXX/XXXX-00001.png"
}
],
"interview" : "53fb562418060018063095da",
"dateBegin" : 1409045626568,
"dateEnd" : 1409045926568,
"dateAnswer" : 1409046526568,
"emailView" : true,
"linkClicked" : true,
"firstname" : "Jérôme",
"lastname" : "Heissler",
"phone" : "0123456789",
"lang" : "fr",
"videoLink" : "",
"text" : "",
"deleted" : false,
"callback": "https://itwapp.io",
"status": 0
}
Attributes
_id: | String This is the applicant's unique identifier. |
mail: | String This is the applicant's email. |
questions: | List of Questions This is the list of questions sent to the applicant. |
responses: | List of Responses This is the list of video responses for the list of questions submitted. |
interview: | String The identifier of the corresponding interview. |
dateBegin: | Number The date on which the interview was sent to the applicant. |
dateEnd: | Number The deadline for the applicant to complete the interview. |
dateAnswer: | Number The date on which the applicant completed the interview. If the applicant hasn't completed the interview yet, dateAnswer equals to 0 |
emailView: | Boolean It indicates if the applicant has opened the invitation email. This will only apply if an email was sent to the applicant through the InterviewApp API. See applicant creation |
linkClicked: | Boolean It indicates if the applicant have clicked the link of the interview in the invitation email. It will apply only if an email was sent to the applicant through the InterviewApp API. See applicant creation |
firstname: | String The applicant's first name. |
lastname: | String The applicant's last name. |
phone: | String The applicant's phone number. |
lang: | String The language chosen for the interview. |
videoLink: | String The introduction video displayed before the interview. |
text: | String The short description shown before the interview. |
deleted: | Boolean It indicates if the applicant has been deleted. |
callback: | String The redirection URL at the end of the interview. |
status: | Int Applicant status :
|
Get a Specific Applicant
DEFINITION
GET /v1/applicant/<ID>
EXAMPLE REQUEST
URL="/api/v1/applicant/53fb562418060018063095dd?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "GET:$URL" "$KEY")
curl "https://itwapp.io$URL&signature=$MD5"
This endpoint retrieves a specific applicant.
HTTP Request
GET https://itwapp.io/api/v1/applicant/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the applicant to retrieve |
Create an applicant
DEFINITION
POST /v1/applicant/
EXAMPLE REQUEST
URL="/api/v1/applicant/?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "POST:$URL" "$KEY")
curl -XPOST "https://itwapp.io$URL&signature=$MD5" -H "Content-Type: application/json" --data '
{
"mail" : "jerome@itwapp.io",
"alert" : false,
"interview" : "53fb562418060018063095dd",
"lang" : "en",
"deadline" : 1409045626568
}
'
## OR
URL="/api/v1/applicant/?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "POST:$URL" "$KEY")
curl -XPOST "https://itwapp.io$URL&signature=$MD5" -H "Content-Type: application/json" --data '
{
"mail" : "jerome@itwapp.io",
"alert" : false,
"question" : [
{
"content": "question 1",
"readingTime": 60,
"answerTime": 60,
"number": 1
}
],
"lang" : "en",
"deadline" : 1409045626568
}
'
This endpoint creates an interview. If successful, it returns the new applicant. There are two ways for creating an applicant. You can either specify an interview which the applicant will have to take or send a list of questions directly. If you choose this second option, an interview will be generated automatically using this list of questions and will be associated to the applicant.
If some parameters are missing, you will be returned a BadRequest.
HTTP Request
POST https://itwapp.io/api/v1/applicant/
Body Parameters
Parameter | Description |
---|---|
String The applicant's email |
|
lang |
String Specify the language of the interview interface. You can choose between fr and en. |
alert |
Boolean Specify if an email should be sent to the applicant. |
deadline |
Timestamp millisecond The deadline for the applicant to complete the interview. |
interview |
String The ID of the interview that the applicant should complete. |
questions |
A list of question. It will be ignored if interview parameters were found show child parameters |
message |
(Optional) String The message sent with the invitation email |
phone |
(Optional) String The applicant’s phone number |
firstname |
(Optional) String The applicant's first name. If not specified, the applicant will be required to enter it when applying. The applicant can also change it before taking the online interview. |
interviewName |
(Optional) String. It will be ignored if interview parameters are found. The interview name. If not specified, a name will be generated for the interview. |
videoLink |
(Optional) String The Youtube video to be embedded |
textIntro |
(Optional) String The introductory text of the interview |
callback |
(Optional, default: https://itwapp.io) String The redirection URL at the end of the interview. |
Delete a Specific Applicant
DEFINITION
DELETE /v1/applicant/<ID>
EXAMPLE REQUEST
URL="/api/v1/applicant/53fb562418060018063095dd?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "DELETE:$URL" "$KEY")
curl -XDELETE "https://itwapp.io$URL&signature=$MD5"
This endpoint deletes a specific applicant.
HTTP Request
DELETE https://itwapp.io/api/v1/applicant/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the applicant to delete |
Interview
The interview object
The interview object JSON is structured as detailed below:
{
"_id": "53fb562418060018063095db",
"name": "Interview Test",
"questions": [],
"video": "https://www.youtube.com/watch?v=-5K-wmNKavA",
"text": "Welcome to your video interview test: Interview Test",
"callback": "https://itwapp.io",
"sent": 0,
"answers": 0,
"new": 0
}
Attributes
_id: | String This is the unique identifier of the interview. |
name: | String This is the name of the interview, as displayed to the applicant. |
questions: | List of Questions It will be displayed to the applicant in the interview interface only. |
video: | String This is the link of the Youtube video chosen as the introduction video. It will be shown to the candidate before the interview starts. |
text: | String This is a short description for the interview. It is displayed along with the Youtube video. |
callback: | String The redirection URL at the end of the interview. |
sent: | Int Number of invitation sent to pass this interview. |
answers: | Int Number of applicant that have completed the interview. |
new: | Int Number of applicant not yet see. |
Get All Interviews
DEFINITION
GET /v1/interview/
EXAMPLE REQUEST
URL="/api/v1/interview/?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "GET:$URL" "$KEY")
curl "https://itwapp.io$URL&signature=$MD5"
This endpoint retrieves all the interviews you created. These interviews will be returned sorted by creation date, the most recently created interview appearing on top of the list.
HTTP Request
GET https://itwapp.io/api/v1/interview/
Query Parameters
Parameter | Default | Description |
---|---|---|
next | None | This ID is used to paginate. It corresponds to the ID of an interview. When this ID is passed to the url, all interviews appearing after this ID in the list will be returned. |
Get a Specific Interview
DEFINITION
GET /v1/interview/<ID>
EXAMPLE REQUEST
URL="/api/v1/interview/53fb562418060018063095dd?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "GET:$URL" "$KEY")
curl "https://itwapp.io$URL&signature=$MD5"
This endpoint retrieves a specific interview.
HTTP Request
GET https://itwapp.io/api/v1/interview/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the interview to retrieve |
Get all applicants corresponding to one interview
DEFINITION
GET /v1/interview/<ID>/applicant
EXAMPLE REQUEST
URL="/api/v1/interview/<ID>/applicant?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "GET:$URL" "$KEY")
curl "https://itwapp.io$URL&signature=$MD5"
This endpoint retrieves all applicants for a specific interview. Applicants will be returned sorted by creation date, the most recently created appearing on top of the list.
HTTP Request
GET https://itwapp.io/api/v1/interview/<ID>/applicant
Query Parameters
Parameter | Default | Description |
---|---|---|
next | None | This ID is used to paginate. It corresponds to the ID of an applicant. When this ID is passed to the url, all applicants appearing after this ID in the list will be returned. |
Create an interview
DEFINITION
POST /v1/interview/
EXAMPLE REQUEST
URL="/api/v1/interview/?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "POST:$URL" "$KEY")
curl -XPOST "https://itwapp.io$URL&signature=$MD5" -H "Content-Type: application/json" --data '
{
"name": "interview 1",
"questions": [
{
"content": "question 1",
"readingTime": 60,
"answerTime": 60,
"number": 1
}
],
"video": "",
"text": ""
}
'
This endpoint creates an interview. If successful, it returns the new interview you created.
If some parameters are missing, you will be returned a BadRequest.
HTTP Request
POST https://itwapp.io/api/v1/interview/
Body Parameters
Parameter | Description |
---|---|
name |
String The name |
questions |
A list of questions show child param |
video |
String The Youtube video to be embedded |
text |
String The short description |
callback |
(Optional, default: https://itwapp.io) String The redirection URL at the end of the interview. |
Update an interview
DEFINITION
PUT /v1/interview/<ID>
EXAMPLE REQUEST
URL="/api/v1/interview/<ID>?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "PUT:$URL" "$KEY")
curl -XPUT "https://itwapp.io$URL&signature=$MD5" -H "Content-Type: application/json" --data '
{
"name": "interview 1",
"questions": [
{
"content": "question 1 - Updated",
"readingTime": 60,
"answerTime": 60,
"number": 1
},
{
"content": "question 2",
"readingTime": 60,
"answerTime": 60,
"number": 2
}
],
"video": "",
"text": ""
}
'
This endpoint updates an interview. If successful, it returns the updated interview. If some parameters are missing, you will be returned a BadRequest.
HTTP Request
PUT https://itwapp.io/api/v1/interview/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the interview to update |
Body Parameters
Parameter | Description |
---|---|
name |
String The name |
questions |
A list of questions show child param |
video |
String The Youtube video to be embedded |
text |
String The short description |
callback |
(Optional, default: http://itwapp.io) String The redirection URL at the end of the interview. |
Delete a Specific Interview
DEFINITION
DELETE /v1/interview/<ID>
EXAMPLE REQUEST
URL="/api/v1/interview/53fb562418060018063095dd?apiKey=YOUR_KEY_HERE×tamp=CURRENT_TIMESTAMP_MILLIS"
MD5=$(sign "DELETE:$URL" "$KEY")
curl -XDELETE "https://itwapp.io$URL&signature=$MD5"
This endpoint retrieves a specific interview.
HTTP Request
DELETE https://itwapp.io/api/v1/interview/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the interview to be deleted |
withApplicant | Boolean default false. This parameter specifies whether all applicants corresponding to this interview must also be deleted or not. |
Question
The question object
The interview object JSON is structured as detailed below:
{
"content": "question 1",
"readingTime": 60,
"answerTime": 60,
"number": 1
}
Attributes
content: | String This is the question. |
readingTime: | Number This is the max duration available for the applicant to read the question and prepare the answer. Accepted value are : 60, 120, 180, 240, 300 |
answerTime: | Number This is the max duration available for the applicant to answer the question. Accepted value are : 60, 120, 180, 240, 300 |
number: | Number This is the position of the question in the interview. |
Response
The response object
The interview object JSON is structured like this:
{
"file": "https://video-prod-itwapp.s3.amazonaws.com/XXXXX/XXXX.mp4",
"duration": 60,
"fileSize": 1048576,
"number": 1,
"thumbnail": "https://video-prod-itwapp.s3.amazonaws.com/XXXXX/XXXX-00001.png"
}
Attributes
file: | String This is the url of the video response. |
duration: | Number This is the duration of the video response. |
fileSize: | Number This is the file size of this video response in byte. |
number: | Number This is the position of the video response in the interview. |
thumbnail: | String This is the thumbnail url for this video. |
Errors
The InterviewApp API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request contains missing or wrong parameters. |
401 | Unauthorized -- Your request isn't properly signed. |
404 | Not Found -- The specified resource could not be found. |
500 | Internal Server Error -- We encountered a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |