Overview
This page provides code examples in multiple languages for common Gather API operations. Use these examples as starting points for your integration.Authentication
- cURL
- JavaScript
- Python
- Ruby
Copy
# Set your API key
API_KEY="qapi_your-api-key-here"
# Make request
curl -X GET https://api.prod.qualifi.hr/qsi/gather/questions \
-H "x-api-key: ${API_KEY}"
Copy
const apiKey = 'qapi_your-api-key-here';
const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/questions', {
headers: {
'x-api-key': apiKey
}
});
const data = await response.json();
Copy
import requests
api_key = 'qapi_your-api-key-here'
response = requests.get(
'https://api.prod.qualifi.hr/qsi/gather/questions',
headers={'x-api-key': api_key}
)
data = response.json()
Copy
require 'net/http'
api_key = 'qapi_your-api-key-here'
uri = URI('https://api.prod.qualifi.hr/qsi/gather/questions')
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = api_key
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
Create Question
- cURL
- JavaScript
- Python
- Ruby
Copy
curl -X POST https://api.prod.qualifi.hr/qsi/gather/questions \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"userId": "user-uuid",
"title": "Tell me about yourself",
"questionScript": "Tell me about yourself and your background.",
"audioURL": "https://example.com/audio/question1.mp3"
}'
Copy
const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/questions', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: 'user-uuid',
title: 'Tell me about yourself',
questionScript: 'Tell me about yourself and your background.',
audioURL: 'https://example.com/audio/question1.mp3'
})
});
const question = await response.json();
Copy
response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/questions',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'userId': 'user-uuid',
'title': 'Tell me about yourself',
'questionScript': 'Tell me about yourself and your background.',
'audioURL': 'https://example.com/audio/question1.mp3'
}
)
question = response.json()
Copy
require 'net/http'
require 'json'
uri = URI('https://api.prod.qualifi.hr/qsi/gather/questions')
req = Net::HTTP::Post.new(uri)
req['x-api-key'] = api_key
req['Content-Type'] = 'application/json'
req.body = {
userId: 'user-uuid',
title: 'Tell me about yourself',
questionScript: 'Tell me about yourself and your background.',
audioURL: 'https://example.com/audio/question1.mp3'
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
Create Interview
- cURL
- JavaScript
- Python
- Ruby
Copy
curl -X POST https://api.prod.qualifi.hr/qsi/gather/interviews \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"title": "Software Engineer Interview",
"displayName": "Software Engineer Interview",
"interviewType": "standard",
"questionIds": ["question-id-1", "question-id-2"]
}'
Copy
const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/interviews', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Software Engineer Interview',
displayName: 'Software Engineer Interview',
interviewType: 'standard',
questionIds: ['question-id-1', 'question-id-2']
})
});
const interview = await response.json();
Copy
response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/interviews',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'title': 'Software Engineer Interview',
'displayName': 'Software Engineer Interview',
'interviewType': 'standard',
'questionIds': ['question-id-1', 'question-id-2']
}
)
interview = response.json()
Copy
uri = URI('https://api.prod.qualifi.hr/qsi/gather/interviews')
req = Net::HTTP::Post.new(uri)
req['x-api-key'] = api_key
req['Content-Type'] = 'application/json'
req.body = {
title: 'Software Engineer Interview',
displayName: 'Software Engineer Interview',
interviewType: 'standard',
questionIds: ['question-id-1', 'question-id-2']
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
Create Candidate and Send Invite
- cURL
- JavaScript
- Python
- Ruby
Copy
# Create candidate
curl -X POST https://api.prod.qualifi.hr/qsi/gather/candidates \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phone": "+1234567890"
}'
# Create candidate interview and send invite
curl -X POST https://api.prod.qualifi.hr/qsi/gather/candidate-interviews \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"candidateId": "candidate-id",
"interviewId": "interview-id",
"sendInvite": true,
"deliveryTypes": ["email"]
}'
Copy
// Create candidate
const candidateResponse = await fetch('https://api.prod.qualifi.hr/qsi/gather/candidates', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phone: '+1234567890'
})
});
const candidate = await candidateResponse.json();
// Create candidate interview and send invite
const inviteResponse = await fetch('https://api.prod.qualifi.hr/qsi/gather/candidate-interviews', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
candidateId: candidate.data.id,
interviewId: 'interview-id',
sendInvite: true,
deliveryTypes: ['email']
})
});
const invite = await inviteResponse.json();
Copy
# Create candidate
candidate_response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/candidates',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'firstName': 'John',
'lastName': 'Doe',
'email': '[email protected]',
'phone': '+1234567890'
}
)
candidate = candidate_response.json()
# Create candidate interview and send invite
invite_response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/candidate-interviews',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'candidateId': candidate['data']['id'],
'interviewId': 'interview-id',
'sendInvite': True,
'deliveryTypes': ['email']
}
)
invite = invite_response.json()
Copy
# Create candidate
candidate_uri = URI('https://api.prod.qualifi.hr/qsi/gather/candidates')
candidate_req = Net::HTTP::Post.new(candidate_uri)
candidate_req['x-api-key'] = api_key
candidate_req['Content-Type'] = 'application/json'
candidate_req.body = {
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phone: '+1234567890'
}.to_json
candidate_response = Net::HTTP.start(candidate_uri.hostname, candidate_uri.port, use_ssl: true) do |http|
http.request(candidate_req)
end
candidate = JSON.parse(candidate_response.body)
# Create candidate interview and send invite
invite_uri = URI('https://api.prod.qualifi.hr/qsi/gather/candidate-interviews')
invite_req = Net::HTTP::Post.new(invite_uri)
invite_req['x-api-key'] = api_key
invite_req['Content-Type'] = 'application/json'
invite_req.body = {
candidateId: candidate['data']['id'],
interviewId: 'interview-id',
sendInvite: true,
deliveryTypes: ['email']
}.to_json
invite_response = Net::HTTP.start(invite_uri.hostname, invite_uri.port, use_ssl: true) do |http|
http.request(invite_req)
end
Get Interview Results
- cURL
- JavaScript
- Python
- Ruby
Copy
curl -X GET https://api.prod.qualifi.hr/qsi/gather/candidate-interviews/{id}/results \
-H "x-api-key: ${API_KEY}"
Copy
const response = await fetch(
`https://api.prod.qualifi.hr/qsi/gather/candidate-interviews/${candidateInterviewId}/results`,
{
headers: {
'x-api-key': apiKey
}
}
);
const results = await response.json();
Copy
response = requests.get(
f'https://api.prod.qualifi.hr/qsi/gather/candidate-interviews/{candidate_interview_id}/results',
headers={'x-api-key': api_key}
)
results = response.json()
Copy
uri = URI("https://api.prod.qualifi.hr/qsi/gather/candidate-interviews/#{candidate_interview_id}/results")
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = api_key
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
results = JSON.parse(response.body)
Create Team
- cURL
- JavaScript
- Python
Copy
curl -X POST https://api.prod.qualifi.hr/qsi/gather/teams \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"teams": [
{
"name": "Engineering Team",
"displayName": "Engineering",
"description": "Engineering and development team"
}
]
}'
Copy
const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/teams', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
teams: [
{
name: 'Engineering Team',
displayName: 'Engineering',
description: 'Engineering and development team'
}
]
})
});
const teams = await response.json();
Copy
response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/teams',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'teams': [
{
'name': 'Engineering Team',
'displayName': 'Engineering',
'description': 'Engineering and development team'
}
]
}
)
teams = response.json()
Create User
- cURL
- JavaScript
- Python
Copy
curl -X POST https://api.prod.qualifi.hr/qsi/gather/users \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"users": [
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"teamIds": ["team-uuid"]
}
]
}'
Copy
const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/users', {
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
users: [
{
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
teamIds: ['team-uuid']
}
]
})
});
const users = await response.json();
Copy
response = requests.post(
'https://api.prod.qualifi.hr/qsi/gather/users',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'users': [
{
'firstName': 'John',
'lastName': 'Doe',
'email': '[email protected]',
'teamIds': ['team-uuid']
}
]
}
)
users = response.json()
Copy Interview
- cURL
- JavaScript
- Python
Copy
curl -X POST https://api.prod.qualifi.hr/qsi/gather/interviews/{interviewId}/copy \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"teamId": "target-team-uuid",
"copyKeywords": false
}'
Copy
const response = await fetch(
`https://api.prod.qualifi.hr/qsi/gather/interviews/${interviewId}/copy`,
{
method: 'POST',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
teamId: 'target-team-uuid',
copyKeywords: false
})
}
);
const interview = await response.json();
Copy
response = requests.post(
f'https://api.prod.qualifi.hr/qsi/gather/interviews/{interview_id}/copy',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'teamId': 'target-team-uuid',
'copyKeywords': False
}
)
interview = response.json()
List Survey Questions
- cURL
- JavaScript
- Python
Copy
curl -X GET "https://api.prod.qualifi.hr/qsi/gather/survey-questions?page=0&pageSize=50" \
-H "x-api-key: ${API_KEY}"
Copy
const params = new URLSearchParams({
page: '0',
pageSize: '50'
});
const response = await fetch(
`https://api.prod.qualifi.hr/qsi/gather/survey-questions?${params}`,
{
headers: {
'x-api-key': apiKey
}
}
);
const surveyQuestions = await response.json();
Copy
params = {
'page': 0,
'pageSize': 50
}
response = requests.get(
'https://api.prod.qualifi.hr/qsi/gather/survey-questions',
headers={'x-api-key': api_key},
params=params
)
surveyQuestions = response.json()
Get Analytics
- cURL
- JavaScript
- Python
Copy
curl -X GET "https://api.prod.qualifi.hr/qsi/gather/analytics?startDate=2024-01-01&endDate=2024-01-31" \
-H "x-api-key: ${API_KEY}"
Copy
const params = new URLSearchParams({
startDate: '2024-01-01',
endDate: '2024-01-31'
});
const response = await fetch(
`https://api.prod.qualifi.hr/qsi/gather/analytics?${params}`,
{
headers: {
'x-api-key': apiKey
}
}
);
const analytics = await response.json();
Copy
params = {
'startDate': '2024-01-01',
'endDate': '2024-01-31'
}
response = requests.get(
'https://api.prod.qualifi.hr/qsi/gather/analytics',
headers={'x-api-key': api_key},
params=params
)
analytics = response.json()
Update Team Branding
- cURL
- JavaScript
- Python
Copy
curl -X PATCH https://api.prod.qualifi.hr/qsi/gather/teams/{teamId}/branding \
-H "x-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"accentColor": "482eeb",
"teamButtonColor": "ffffff",
"logoUrl": "https://example.com/logo.png"
}'
Copy
const response = await fetch(
`https://api.prod.qualifi.hr/qsi/gather/teams/${teamId}/branding`,
{
method: 'PATCH',
headers: {
'x-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
accentColor: '482eeb',
teamButtonColor: 'ffffff',
logoUrl: 'https://example.com/logo.png'
})
}
);
const team = await response.json();
Copy
response = requests.patch(
f'https://api.prod.qualifi.hr/qsi/gather/teams/{team_id}/branding',
headers={
'x-api-key': api_key,
'Content-Type': 'application/json'
},
json={
'accentColor': '482eeb',
'teamButtonColor': 'ffffff',
'logoUrl': 'https://example.com/logo.png'
}
)
team = response.json()

