Getting Started

Create an API Key

If you don't have an api key, follow the below steps to create one.

  1. Signin to interact (https://interact.xobin.com/signin)
  2. Navigate to API page from the left navbar.
  3. Click generate new api key button in top right of your window to create an api key.

Disable an API Key

If you want to disable your api key, follow the below steps to create one.

  1. Signin to interact (https://interact.xobin.com/signin)
  2. Navigate to API page from the left navbar.
  3. Under status click the button to enable or disable your api key.

Delete an API Key

If you want to delete your api key, follow the below steps to create one.

  1. Signin to interact (https://interact.xobin.com/signin)
  2. Navigate to API page from the left navbar.
  3. Under action column click the delete button to permanently delete your api key.

Users

Information about user

This endpoint is to list all the information about the user

Request URL

GET /<api_key>/me

Parameters

No parameters

Path Parameters

api_key string API Key obtained from interact. required

Return Value

json information about the user
_id string The user id
name string The name of the user
email string The email of the user
userType string The type of the user: Super-Admin/Admin/User
status string whether the user is verified or not
companyName string Company name of the user

Errors

ValidationError The parameters passed to the API call are invalid or not provided when required
MethodNotSupported The requested method is not allowed by the API endpoint.
NotFound The requested url endpoint is not available
InternalError An unexpected error occurred processing the request. Interact developers will be notified.

Examples

curl --request GET \
--url https://interact.xobin.com/API/V1/<api_key>/me \
--data '{}'
echo '{}' |  \
http GET https://interact.xobin.com/API/V1/<api_key>/me
import requests

url = "https://interact.xobin.com/API/V1/<api_key>/me"

payload = "{}"
response = requests.request("GET", url, data=payload)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://interact.xobin.com/API/V1/<api_key>/me")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request.body = "{}"

response = http.request(request)
puts response.read_body
var http = require("http");

var options = {
"method": "GET",
"hostname": "2factor.in",
"port": null,
"path": "/API/V1/<api_key>/me",
"headers": {}
};

var req = http.request(options, function (res) {
var chunks = [];

res.on("data", function (chunk) {
chunks.push(chunk);
});

res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});

req.write("{}");
req.end();
append('{}');

$request->setRequestUrl('https://interact.xobin.com/API/V1/<api_key>/me');
$request->setRequestMethod('GET');
$request->setBody($body);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/octet-stream");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("https://interact.xobin.com/API/V1/<api_key>/me")
.get()
.build();

Response response = client.newCall(request).execute();

Assessment

List Assessment Created by user

This endpoint is to list all the Assessment created by the users who owns the api key.

Request URL

GET /<api_key>/me/assessments

Parameters

No parameters

Path Parameters

api_key string API Key obtained from interact. required

Return Value

array a list of up to 1000 assessments created by the user who owns the api key.
return { } json an assessment
_id string The created assessment id
title string The title of the assessment
invites_sent integer The number of invitations sent to candidates for this assessment
invites_completed integer The number of candidates who completed the assessment after recieving an invitation.
date string the UTC timestamp when the assessment was created, in YYYY-MM-DD HH:MM:SS format

Errors

ValidationError The parameters passed to the API call are invalid or not provided when required
MethodNotSupported The requested method is not allowed by the API endpoint.
NotFound The requested url endpoint is not available
InternalError An unexpected error occurred processing the request. Interact developers will be notified.

Examples

curl --request GET \
--url https://interact.xobin.com/API/V1/<api_key>/me/assessments \
--data '{}'
echo '{}' |  \
  http GET https://interact.xobin.com/API/V1/<api_key>/me/assessments
import requests

url = "https://interact.xobin.com/API/V1/<api_key>/me/assessments"

payload = "{}"
response = requests.request("GET", url, data=payload)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://interact.xobin.com/API/V1/<api_key>/me/assessments")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request.body = "{}"

response = http.request(request)
puts response.read_body
var http = require("http");

var options = {
  "method": "GET",
  "hostname": "2factor.in",
  "port": null,
  "path": "/API/V1/<api_key>/me/assessments",
  "headers": {}
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{}");
req.end();
append('{}');

$request->setRequestUrl('https://interact.xobin.com/API/V1/<api_key>/me/assessments');
$request->setRequestMethod('GET');
$request->setBody($body);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/octet-stream");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
  .url("https://interact.xobin.com/API/V1/<api_key>/me/assessments")
  .get()
  .build();

Response response = client.newCall(request).execute();

List Assessments for a company

This endpoint is to list all the assessments that are created for a particular company.

Request URL

GET /<api_key>/company/assessments

Parameters

No parameters

Path Parameters

api_key string API Key obtained from interact. required

Return Value

array a list of up to 1000 assessments available for an assessment.
return { } json an assessment
_id string The created assessment id
title string The title of the assessment
invites_sent integer The number of invitations sent to candidates for this assessment
invites_completed integer The number of candidates who completed the assessment after recieving an invitation.
date string the UTC timestamp when the assessment was created, in YYYY-MM-DD HH:MM:SS format

Errors

ValidationError The parameters passed to the API call are invalid or not provided when required
MethodNotSupported The requested method is not allowed by the API endpoint.
NotFound The requested url endpoint is not available
InternalError An unexpected error occurred processing the request. Interact developers will be notified.

Examples

curl --request GET \
--url https://interact.xobin.com/API/V1/<api_key>/company/assessments \
--data '{}'
echo '{}' |  \
  http GET https://interact.xobin.com/API/V1/<api_key>/company/assessments
import requests

url = "https://interact.xobin.com/API/V1/<api_key>/company/assessments"

payload = "{}"
response = requests.request("GET", url, data=payload)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://interact.xobin.com/API/V1/<api_key>/company/assessments")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request.body = "{}"

response = http.request(request)
puts response.read_body
var http = require("http");

var options = {
  "method": "GET",
  "hostname": "2factor.in",
  "port": null,
  "path": "/API/V1/<api_key>/company/assessments",
  "headers": {}
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{}");
req.end();
append('{}');

$request->setRequestUrl('https://interact.xobin.com/API/V1/<api_key>/company/assessments');
$request->setRequestMethod('GET');
$request->setBody($body);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/octet-stream");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
  .url("https://interact.xobin.com/API/V1/<api_key>/company/assessments")
  .get()
  .build();

Response response = client.newCall(request).execute();

Send an Assessment Invite

This endpoint is to invite a candidate for a particular assessment and take the assessment

Request URL

POST /<api_key>/assessment/send/invite

Parameters

assessmentId* string The id of the assessment
name* string The name of the candidate
email* string The email of the candidate
message string Optional custom message can be sent along with the invitation to the candidate. Ignore the parameter to send invitation without custom message.

Path Parameters

api_key string API Key obtained from interact. required

Return Value

json information about the invitation that was sent
_id string The invitation id
name string The name of the candidate to whom the invitation was sent
email string The email of the candidate to whom the invitation was sent
status string The status of the invitation

Errors

ValidationError The parameters passed to the API call are invalid or not provided when required
MethodNotSupported The requested method is not allowed by the API endpoint.
NotFound The requested url endpoint is not available
InternalError An unexpected error occurred processing the request. Interact developers will be notified.

Examples

curl --request POST \
--url https://interact.xobin.com/API/V1/<api_key>/assessment/send/invite \
--data '{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}'
echo '{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}' |  \
  http post https://interact.xobin.com/API/V1/<api_key>/assessment/send/invite
import requests

url = "https://interact.xobin.com/API/V1/<api_key>/assessment/send/invite"

payload = '{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}'
response = requests.request("POST", url, data=payload)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://interact.xobin.com/API/V1/<api_key>/assessment/send/invite")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request.body = '{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}'

response = http.request(request)
puts response.read_body
var http = require("http");

var options = {
  "method": "POST",
  "hostname": "interact.xobin.com",
  "port": null,
  "path": "/API/V1/<api_key>/assessment/send/invite",
  "headers": {}
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write('{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}');
req.end();
append('{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}');

$request->setRequestUrl('https://interact.xobin.com/API/V1/<api_key>/assessment/send/invite');
$request->setRequestMethod('POST');
$request->setBody($body);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/octet-stream");
RequestBody body = RequestBody.create(mediaType, '{"assessmentId":"BDA.K-4dsfsG8I3Bsa30Oe99r0zMu4UVgfY","name":"John Doe","email":"johndoe@gmail.com"}');
Request request = new Request.Builder()
  .url("https://interact.xobin.com/API/V1/<api_key>/assessment-invite/send/invite")
  .post()
  .build();

Response response = client.newCall(request).execute();