CodeInterview API
Code Interview provides simple RESTful web API for your data. All endpoints will return results in JSON format.
For example, if you’d like to use the API to fetch list of all your interviews, you’d use the following endpoint:
https://api.codeinterview.io/1/pads?key=283h4g4h4h
Notes
- All API requests go to https://api.codeinterview.io
- The /1 part of the URI is the API version
Authentication
You will need an API Key for all requests to the API server. Your API key can be accessed by clicking your name on top-right corner and going to Settings.
Note
You can only access the interviews you are already part of.
Endpoints
GET /1/pads
Fetch the list of all interviews that are owned by you and your team.
RESPONSE
[
{
"id": "82388c2b7e632",
"name": "Interview with Luke",
"timestamp": 1903849200000,
"ended_at": 1903935600000,
"tags": ["intern", "jedi"]
},
{
"id": "9727633b7e632",
"name": "Interview with Solo",
"timestamp": 1901257200000,
"ended_at": 1901343600000
}
]
POST /1/pads/new
Create a new pad and return id and URL.
REQUEST
Argument | Example | Required | Description |
---|---|---|---|
name | Interview with Luke | Optional | A name/title for this new pad. |
RESPONSE
{
"message": "success",
"id": "82388c2b7e632",
"url": "https://codeinterview.io/82388c2b7e632"
}
GET /1/pads/:id
Retrieve details of an interview including last code, selected language and interviewer notes.
REQUEST
Sendid
of the interview as a route parameter.RESPONSE
{
"id": "82388c2b7e632",
"name": "Interview with Luke",
"timestamp": 1903849200000,
"ended_at": 1903935600000,
"tags": ["intern", "jedi"],
"code":"#include <iostream>\nusing namespace std;\n\nint main() {\n\tcout<<"Hello Dear";\n\treturn 0;\n}\n",
"notes":"Candidate may need a Yoda bootcamp.",
"language":"C/C++"
}
POST /1/pads/:id/end
End the interview, locking candidate's access to it.
REQUEST
Sendid
of the interview as a route parameter. Body of the request should be empty.RESPONSE
{
"msg":"success"
}