This guide walks you through creating your first interview using the Gather API, from creating questions to sending invites to candidates.
1
Create your first question
Start by creating a question with text-to-speech audio generation:
cURL
JavaScript
Python
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" }'
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();console.log('Question ID:', question.data.id);
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()print('Question ID:', question['data']['id'])
Save the question ID from the response. You’ll need it when creating the interview.
2
Create additional questions
Create a few more questions for your interview:
{ "userId": "user-uuid", "title": "Why are you interested in this role?", "questionScript": "Why are you interested in this position?", "audioURL": "https://example.com/audio/question2.mp3"}
{ "userId": "user-uuid", "title": "What are your strengths?", "questionScript": "What do you consider to be your greatest strengths?", "audioURL": "https://example.com/audio/question3.mp3"}