Entretiens · Questionnaires
Créer un entretien, le suivre, relancer le candidat et récupérer son résultat.
Chaque appel porte votre clé et l'id du recruteur : voir Authentification et clés. Les listes, les erreurs et les quotas suivent les Conventions. Les descriptions ci-dessous sont celles du code : elles sont en anglais, comme les identifiants techniques.
Les exemples lisent votre clé, l'id du recruteur et les identifiants dans des variables d'environnement : CLE, RECRUTEUR_ID, puis AGENT_ID, INTERVIEW_ID… Une réponse d'exemple montre les champs principaux : l'API peut en renvoyer d'autres. Tous ces appels sont aussi dans la collection Postman.
Créer sans doublon
Cette règle vaut pour trois appels : Créer un entretien, Créer des entretiens en lot et Créer un questionnaire.
Si un appel de création part deux fois (délai dépassé, relance automatique…), aucun doublon n'est créé et le candidat ne reçoit pas de seconde invitation.
Un appel est un doublon quand le même candidat a déjà, avec le même agent virtuel, un entretien pas encore commencé et créé il y a moins de 5 minutes. Le candidat est reconnu à son e-mail ; pour un questionnaire, à son e-mail ou à son téléphone.
| Création | Réponse sur un doublon |
|---|---|
| Un entretien, un questionnaire | erreur 409, dont details donne l'identifiant de l'entretien existant |
| Une liste de candidats | 201 : le doublon est ignoré, les autres sont créés ; la réponse ne contient que les entretiens créés |
{
"statusCode": 409,
"code": "CONFLICT",
"message": "This candidate already has a pending interview with this agent.",
"details": [
{ "field": "candidateEmail", "message": "Already invited: interview b3e7d1a4-5c92-4f6e-8d0a-2a9f6c1e7b48." }
],
"requestId": "87309bff-2a18-4455-8e19-9439311446b1"
}Sur une 409 après un délai dépassé, votre premier appel a donc bien créé l'entretien : reprenez son identifiant dans details plutôt que de réessayer.
Un second entretien reste toujours possible : un deuxième tour, un lien renvoyé plus tard, ou un autre agent virtuel passent normalement.
Lister les entretiens
GET /partner/interviews
List interviews
Paginated: page from 1, pageSize up to 100. See « Listes » in the conventions.
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
page | query | integer | non | Défaut : 1. |
pageSize | query | integer | non | Défaut : 20. |
search | query | string | non | |
status | query | pending · in_progress · completed · failed · voicemail · no_answer · refused · not_available · recruiter_requested · condition_not_met · archived | non | |
agentId | query | string (uuid) | non | |
organizationId | query | string (uuid) | non | |
batchId | query | string | non | |
requestedByUserId | query | string (uuid) | non | |
clientName | query | string | non | |
completedFrom | query | string (date) | non | YYYY-MM-DD, with status=completed only |
completedTo | query | string (date) | non | YYYY-MM-DD, with status=completed only |
testsOnly | query | true · false | non | Défaut : false. |
sort | query | createdAt · completedAt · expirationAt · score | non | Défaut : createdAt. |
order | query | asc · desc | non | Défaut : desc. |
Réponses
| Code | Description |
|---|---|
200 | |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl "https://api.smart-interview.ai/partner/interviews?agentId=$AGENT_ID&status=pending" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews?agentId=' . getenv('AGENT_ID') . '&status=pending');
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews?agentId=${process.env.AGENT_ID}&status=pending`, {
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.get(
f"https://api.smart-interview.ai/partner/interviews?agentId={os.environ['AGENT_ID']}&status=pending",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"data": [
{
"id": "b3e7d1a4-5c92-4f6e-8d0a-2a9f6c1e7b48",
"status": "pending",
"purpose": "recruitment",
"firstname": "Camille",
"lastname": "Martin",
"candidateEmail": "camille.martin@example.com",
"phone": null,
"agentId": "6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": null,
"batchName": null,
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video",
"phone"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"skills": [
{
"title": "Mise en place & organisation",
"description": "Organiser son poste et préparer les ingrédients avant le service",
"weight": 40
}
],
"methodologies": {
"id": "STAR",
"title": "Méthode STAR",
"description": "Situation, tâche, action, résultat",
"criteria": [
{
"criterion": "Situation",
"expected": "Décrit un contexte précis"
}
]
},
"customConditions": [
{
"title": "Horaires",
"description": "Le candidat est-il disponible le week-end ?",
"isMandatory": true
}
]
},
"createdAt": "2026-11-23T10:00:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T10:00:00.000Z",
"deletedAt": null
}
],
"page": 1,
"pageSize": 20,
"total": 1,
"hasMore": false
}WARNING
Les champs du résultat, sauf version, agentTitle, shareLink et conditionInterruption : demandez le lien avec share-link. metadata, analysis et agentData sont hors contrat ; transcript vaut null, sauf si votre organisation a demandé l'envoi de la transcription intégrale.
Créer un entretien
POST /partner/interviews
Create an interview and invite the candidate
organizationId and requestedByUserId are replaced by those of the acting user.
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
agentId | string | oui | The agent ID (ex. 6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13) |
firstname | string | oui | The candidate first name (ex. Camille) |
candidateEmail | string | oui | The candidate email (ex. camille.martin@example.com) |
lastname | string | oui | The candidate last name (ex. Martin) |
phone | string | non | The candidate phone number (ex. +33639980100) |
requestedByUserId | string | oui | Required, but replaced by the acting user with an API key (ex. -) |
organizationId | string | oui | Required, but replaced by the organization of the acting user with an API key (ex. -) |
expirationAt | string | non | Expiration date and time (ISO 8601) when the interview link becomes invalid (ex. 2026-12-31T23:00:00.000Z) |
batchName | string | non | Optional custom name for the batch (ex. Saison été 2026) |
triggerCall | boolean | non | Whether to trigger an outbound call instead of sending email (ex. false) |
sendMessage | boolean | non | Whether to send a WhatsApp/SMS message instead of sending email (ex. false) |
allowedInterviewTypes | string[] | non | Allowed interview types. Can be "video", "phone", or both (ex. video,phone) |
reminders | object | non | Custom reminder schedules. If not provided, default reminders will be created |
Réponses
| Code | Description |
|---|---|
201 | Interview created |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
409 | Duplicate: this candidate already has a pending interview with this agent, created less than 5 minutes ago. details gives its id. Nothing is created nor sent. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"agentId": "$AGENT_ID",
"firstname": "Camille",
"lastname": "Martin",
"candidateEmail": "camille.martin@example.com",
"organizationId": "-",
"requestedByUserId": "-"
}
EOF<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'agentId' => getenv('AGENT_ID'),
'firstname' => 'Camille',
'lastname' => 'Martin',
'candidateEmail' => 'camille.martin@example.com',
'organizationId' => '-',
'requestedByUserId' => '-',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch('https://api.smart-interview.ai/partner/interviews', {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
agentId: process.env.AGENT_ID,
firstname: 'Camille',
lastname: 'Martin',
candidateEmail: 'camille.martin@example.com',
organizationId: '-',
requestedByUserId: '-',
}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
"https://api.smart-interview.ai/partner/interviews",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
json={
"agentId": os.environ["AGENT_ID"],
"firstname": "Camille",
"lastname": "Martin",
"candidateEmail": "camille.martin@example.com",
"organizationId": "-",
"requestedByUserId": "-",
},
)
print(response.status_code, response.json())Réponse 201 :
{
"id": "b3e7d1a4-5c92-4f6e-8d0a-2a9f6c1e7b48",
"status": "pending",
"purpose": "recruitment",
"firstname": "Camille",
"lastname": "Martin",
"candidateEmail": "camille.martin@example.com",
"phone": null,
"agentId": "6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": null,
"batchName": null,
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video",
"phone"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"skills": [
{
"title": "Mise en place & organisation",
"description": "Organiser son poste et préparer les ingrédients avant le service",
"weight": 40
}
],
"methodologies": {
"id": "STAR",
"title": "Méthode STAR",
"description": "Situation, tâche, action, résultat",
"criteria": [
{
"criterion": "Situation",
"expected": "Décrit un contexte précis"
}
]
},
"customConditions": [
{
"title": "Horaires",
"description": "Le candidat est-il disponible le week-end ?",
"isMandatory": true
}
]
},
"createdAt": "2026-11-23T10:00:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T10:00:00.000Z",
"deletedAt": null
}WARNING
Soumis à la règle Créer sans doublon : un appel envoyé deux fois ne crée pas de second entretien.
Obtenir le lien d'invitation
POST /partner/interviews/{id}/invitation-link
Generate the invitation link of an interview
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Return the invitation URL and its code |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/$INTERVIEW_ID/invitation-link" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/' . getenv('INTERVIEW_ID') . '/invitation-link');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/${process.env.INTERVIEW_ID}/invitation-link`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/interviews/{os.environ['INTERVIEW_ID']}/invitation-link",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"url": "https://app.smart-interview.ai/candidates?code=Xk4pQ7wNz",
"code": "Xk4pQ7wNz"
}Renvoyer l'invitation par e-mail
POST /partner/interviews/{id}/resend-email
Resend interview invitation email to candidate
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Email successfully resent |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/$INTERVIEW_ID/resend-email" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/' . getenv('INTERVIEW_ID') . '/resend-email');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/${process.env.INTERVIEW_ID}/resend-email`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/interviews/{os.environ['INTERVIEW_ID']}/resend-email",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"message": "Email successfully resent"
}Renvoyer l'invitation par WhatsApp
POST /partner/interviews/{id}/resend-message
Resend interview invitation message (WhatsApp) to candidate
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Message successfully resent |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/$INTERVIEW_ID/resend-message" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/' . getenv('INTERVIEW_ID') . '/resend-message');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/${process.env.INTERVIEW_ID}/resend-message`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/interviews/{os.environ['INTERVIEW_ID']}/resend-message",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"message": "Message successfully resent"
}WARNING
Envoie un vrai message WhatsApp au candidat, sur le téléphone de l’entretien : un entretien sans téléphone est refusé (400).
Redonner une chance au candidat
POST /partner/interviews/{id}/retry
Give candidate another chance by resetting interview to pending
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Interview successfully reset and email sent |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/$INTERVIEW_ID/retry" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/' . getenv('INTERVIEW_ID') . '/retry');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/${process.env.INTERVIEW_ID}/retry`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/interviews/{os.environ['INTERVIEW_ID']}/retry",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"message": "Interview reset successfully"
}WARNING
Seulement sur un entretien terminé : un entretien en attente est refusé (400).
Partager le compte rendu
POST /partner/interviews/{id}/share-link
Generate public recap share link
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Return the public recap URL and its code |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/$INTERVIEW_ID/share-link" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/' . getenv('INTERVIEW_ID') . '/share-link');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/${process.env.INTERVIEW_ID}/share-link`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/interviews/{os.environ['INTERVIEW_ID']}/share-link",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"url": "https://app.smart-interview.ai/interviews/recap/b3e7d1a4-5c92-4f6e-8d0a-2a9f6c1e7b48?code=Rt8vL2mQc",
"code": "Rt8vL2mQc"
}Créer des entretiens en lot
POST /partner/interviews/batch
Create multiple interviews in a batch
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
agentId | string | oui | The agent ID (ex. 6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13) |
requestedByUserId | string | oui | Required, but replaced by the acting user with an API key (ex. -) |
organizationId | string | oui | Required, but replaced by the organization of the acting user with an API key (ex. -) |
expirationAt | string | non | Expiration date and time (ISO 8601) when the interview link becomes invalid (ex. 2026-12-31T23:00:00.000Z) |
candidates | CandidateDto[] | oui | Array of candidates for the batch |
batchName | string | non | Optional custom name for the batch (ex. Saison été 2026) |
sendEmail | boolean | non | Send invitations via email instead of WhatsApp message (ex. false) |
allowedInterviewTypes | string[] | non | Allowed interview types. Can be "video", "phone", or both (ex. video,phone) |
reminders | object | non | Custom reminder schedules. If not provided, default reminders will be created |
Réponses
| Code | Description |
|---|---|
201 | Return created interviews with batch ID |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/interviews/batch" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"agentId": "$AGENT_ID",
"organizationId": "-",
"requestedByUserId": "-",
"batchName": "Saison été 2026",
"sendEmail": true,
"candidates": [
{
"firstname": "Lucas",
"lastname": "Petit",
"candidateEmail": "lucas.petit@example.com"
},
{
"firstname": "Inès",
"lastname": "Moreau",
"candidateEmail": "ines.moreau@example.com"
}
]
}
EOF<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/batch');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'agentId' => getenv('AGENT_ID'),
'organizationId' => '-',
'requestedByUserId' => '-',
'batchName' => 'Saison été 2026',
'sendEmail' => true,
'candidates' => [
[
'firstname' => 'Lucas',
'lastname' => 'Petit',
'candidateEmail' => 'lucas.petit@example.com',
],
[
'firstname' => 'Inès',
'lastname' => 'Moreau',
'candidateEmail' => 'ines.moreau@example.com',
],
],
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch('https://api.smart-interview.ai/partner/interviews/batch', {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
agentId: process.env.AGENT_ID,
organizationId: '-',
requestedByUserId: '-',
batchName: 'Saison été 2026',
sendEmail: true,
candidates: [
{
firstname: 'Lucas',
lastname: 'Petit',
candidateEmail: 'lucas.petit@example.com',
},
{
firstname: 'Inès',
lastname: 'Moreau',
candidateEmail: 'ines.moreau@example.com',
},
],
}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
"https://api.smart-interview.ai/partner/interviews/batch",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
json={
"agentId": os.environ["AGENT_ID"],
"organizationId": "-",
"requestedByUserId": "-",
"batchName": "Saison été 2026",
"sendEmail": True,
"candidates": [
{
"firstname": "Lucas",
"lastname": "Petit",
"candidateEmail": "lucas.petit@example.com",
},
{
"firstname": "Inès",
"lastname": "Moreau",
"candidateEmail": "ines.moreau@example.com",
},
],
},
)
print(response.status_code, response.json())Réponse 201 :
[
{
"id": "1a6c9e3f-8b2d-4f7a-9c5e-0d4b7a2e6f91",
"status": "pending",
"purpose": "recruitment",
"firstname": "Lucas",
"lastname": "Petit",
"candidateEmail": "lucas.petit@example.com",
"phone": null,
"agentId": "6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": "batch_1795435200000_k3m9x2p7q",
"batchName": "Saison été 2026",
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video",
"phone"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"skills": [
{
"title": "Mise en place & organisation",
"description": "Organiser son poste et préparer les ingrédients avant le service",
"weight": 40
}
],
"methodologies": {
"id": "STAR",
"title": "Méthode STAR",
"description": "Situation, tâche, action, résultat",
"criteria": [
{
"criterion": "Situation",
"expected": "Décrit un contexte précis"
}
]
},
"customConditions": [
{
"title": "Horaires",
"description": "Le candidat est-il disponible le week-end ?",
"isMandatory": true
}
]
},
"createdAt": "2026-11-23T10:05:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T10:05:00.000Z",
"deletedAt": null
},
{
"id": "5e2b8d4a-6f1c-4a9e-b7d3-8c0f2e5a9b16",
"status": "pending",
"purpose": "recruitment",
"firstname": "Inès",
"lastname": "Moreau",
"candidateEmail": "ines.moreau@example.com",
"phone": null,
"agentId": "6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": "batch_1795435200000_k3m9x2p7q",
"batchName": "Saison été 2026",
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video",
"phone"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"skills": [
{
"title": "Mise en place & organisation",
"description": "Organiser son poste et préparer les ingrédients avant le service",
"weight": 40
}
],
"methodologies": {
"id": "STAR",
"title": "Méthode STAR",
"description": "Situation, tâche, action, résultat",
"criteria": [
{
"criterion": "Situation",
"expected": "Décrit un contexte précis"
}
]
},
"customConditions": [
{
"title": "Horaires",
"description": "Le candidat est-il disponible le week-end ?",
"isMandatory": true
}
]
},
"createdAt": "2026-11-23T10:05:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T10:05:00.000Z",
"deletedAt": null
}
]WARNING
Soumis à la règle Créer sans doublon : un appel envoyé deux fois ne crée pas de second entretien.
Lire un entretien
GET /partner/interviews/by-id/{id}
Get interview by internal ID (authenticated)
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl "https://api.smart-interview.ai/partner/interviews/by-id/$INTERVIEW_ID" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/interviews/by-id/' . getenv('INTERVIEW_ID'));
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/interviews/by-id/${process.env.INTERVIEW_ID}`, {
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.get(
f"https://api.smart-interview.ai/partner/interviews/by-id/{os.environ['INTERVIEW_ID']}",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"id": "b3e7d1a4-5c92-4f6e-8d0a-2a9f6c1e7b48",
"status": "pending",
"purpose": "recruitment",
"firstname": "Camille",
"lastname": "Martin",
"candidateEmail": "camille.martin@example.com",
"phone": null,
"agentId": "6f1c2a9e-3b7d-4e58-9a21-7c4d8e0b5f13",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": null,
"batchName": null,
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video",
"phone"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"skills": [
{
"title": "Mise en place & organisation",
"description": "Organiser son poste et préparer les ingrédients avant le service",
"weight": 40
}
],
"methodologies": {
"id": "STAR",
"title": "Méthode STAR",
"description": "Situation, tâche, action, résultat",
"criteria": [
{
"criterion": "Situation",
"expected": "Décrit un contexte précis"
}
]
},
"customConditions": [
{
"title": "Horaires",
"description": "Le candidat est-il disponible le week-end ?",
"isMandatory": true
}
]
},
"createdAt": "2026-11-23T10:00:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T10:00:00.000Z",
"deletedAt": null
}WARNING
Les champs du résultat, sauf version, agentTitle, shareLink et conditionInterruption : demandez le lien avec share-link. metadata, analysis et agentData sont hors contrat ; transcript vaut null, sauf si votre organisation a demandé l'envoi de la transcription intégrale.
Lister les questionnaires
GET /partner/questionnaires
List questionnaires, filtered by verdict and call outcome
Paginated: page from 1, pageSize up to 100. See « Listes » in the conventions.
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
page | query | integer | non | Défaut : 1. |
pageSize | query | integer | non | Défaut : 20. |
search | query | string | non | |
status | query | pending · in_progress · completed · failed · voicemail · no_answer · refused · not_available · recruiter_requested · condition_not_met | non | |
verdict | query | compliant · minor_deviation · non_compliant · inconclusive | non | |
agentId | query | string (uuid) | non | |
organizationId | query | string (uuid) | non | |
order | query | asc · desc | non | Défaut : desc. |
Réponses
| Code | Description |
|---|---|
200 | |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl "https://api.smart-interview.ai/partner/questionnaires?agentId=$QUESTIONNAIRE_AGENT_ID" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires?agentId=' . getenv('QUESTIONNAIRE_AGENT_ID'));
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/questionnaires?agentId=${process.env.QUESTIONNAIRE_AGENT_ID}`, {
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.get(
f"https://api.smart-interview.ai/partner/questionnaires?agentId={os.environ['QUESTIONNAIRE_AGENT_ID']}",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"data": [
{
"id": "3c9f1e7b-2a5d-4b8e-9f6c-1d7a4e0b8c25",
"status": "pending",
"purpose": "questionnaire",
"firstname": "Hugo",
"lastname": "Lefèvre",
"candidateEmail": "hugo.lefevre@example.com",
"phone": "+33639980101",
"agentId": "a8d4f2c6-9e1b-4d7a-8f3c-5b0e6a2d9c74",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": null,
"batchName": null,
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"questions": [
{
"id": "q1",
"order": 1,
"label": "Avez-vous reçu vos EPI ?",
"answerType": "yes_no",
"expectedAnswer": "yes",
"criticality": "blocking"
}
],
"midpointAnnouncement": true
},
"createdAt": "2026-11-23T11:00:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T11:00:00.000Z",
"deletedAt": null
}
],
"page": 1,
"pageSize": 20,
"total": 1,
"hasMore": false
}Créer un questionnaire
POST /partner/questionnaires
Create a questionnaire for a phone number
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
agentId | string | oui | The questionnaire agent (ex. a8d4f2c6-9e1b-4d7a-8f3c-5b0e6a2d9c74) |
firstname | string | oui | The person first name (ex. Hugo) |
lastname | string | oui | The person last name (ex. Lefèvre) |
phone | string | non | Required to place a call or to send the link on WhatsApp (ex. +33639980101) |
candidateEmail | string | non | Required to send the link by email (ex. hugo.lefevre@example.com) |
mode | call · link | non | How the person takes the questionnaire: call on the phone, link from their browser (ex. link) |
organizationId | string | non | Replaced by the organization of the acting user with an API key |
requestedByUserId | string | non | Replaced by the acting user with an API key |
Réponses
| Code | Description |
|---|---|
201 | Questionnaire created |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
409 | Duplicate: this candidate already has a pending interview with this agent, created less than 5 minutes ago. details gives its id. Nothing is created nor sent. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/questionnaires" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"agentId": "$QUESTIONNAIRE_AGENT_ID",
"firstname": "Hugo",
"lastname": "Lefèvre",
"candidateEmail": "hugo.lefevre@example.com",
"phone": "+33639980101",
"mode": "link"
}
EOF<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'agentId' => getenv('QUESTIONNAIRE_AGENT_ID'),
'firstname' => 'Hugo',
'lastname' => 'Lefèvre',
'candidateEmail' => 'hugo.lefevre@example.com',
'phone' => '+33639980101',
'mode' => 'link',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch('https://api.smart-interview.ai/partner/questionnaires', {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
agentId: process.env.QUESTIONNAIRE_AGENT_ID,
firstname: 'Hugo',
lastname: 'Lefèvre',
candidateEmail: 'hugo.lefevre@example.com',
phone: '+33639980101',
mode: 'link',
}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
"https://api.smart-interview.ai/partner/questionnaires",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
json={
"agentId": os.environ["QUESTIONNAIRE_AGENT_ID"],
"firstname": "Hugo",
"lastname": "Lefèvre",
"candidateEmail": "hugo.lefevre@example.com",
"phone": "+33639980101",
"mode": "link",
},
)
print(response.status_code, response.json())Réponse 201 :
{
"id": "3c9f1e7b-2a5d-4b8e-9f6c-1d7a4e0b8c25",
"status": "pending",
"purpose": "questionnaire",
"firstname": "Hugo",
"lastname": "Lefèvre",
"candidateEmail": "hugo.lefevre@example.com",
"phone": "+33639980101",
"agentId": "a8d4f2c6-9e1b-4d7a-8f3c-5b0e6a2d9c74",
"organizationId": "e4a8c2f1-7d3b-4b9e-a6c5-1f0d9e8b2a37",
"requestedByUserId": "9d2f6b1e-4a8c-4e7d-b3f5-6c0a1e9d8b24",
"candidateData": null,
"batchId": null,
"batchName": null,
"feedbackRating": null,
"feedbackComment": null,
"resendCount": 0,
"isTesting": false,
"allowedInterviewTypes": [
"video"
],
"transcript": null,
"metadata": null,
"analysis": null,
"agentData": {
"questions": [
{
"id": "q1",
"order": 1,
"label": "Avez-vous reçu vos EPI ?",
"answerType": "yes_no",
"expectedAnswer": "yes",
"criticality": "blocking"
}
],
"midpointAnnouncement": true
},
"createdAt": "2026-11-23T11:00:00.000Z",
"completedAt": null,
"expirationAt": null,
"updatedAt": "2026-11-23T11:00:00.000Z",
"deletedAt": null
}WARNING
Réservé aux organisations qui ont accès aux questionnaires : sinon, l'appel est refusé (403).
Soumis à la règle Créer sans doublon : un appel envoyé deux fois ne crée pas de second entretien.
Envoyer le lien d'un questionnaire
POST /partner/questionnaires/{id}/link
Get the questionnaire link, and send it on WhatsApp or by email when a channel is given
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
channel | whatsapp · email | non | The channel the link goes out on. Left out: nothing is sent, the link is returned (ex. email) |
Réponses
| Code | Description |
|---|---|
200 | The link, plus the channel it went out on when one was asked for |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/questionnaires/$QUESTIONNAIRE_ID/link" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"channel": "email"
}
EOF<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires/' . getenv('QUESTIONNAIRE_ID') . '/link');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'channel' => 'email',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/questionnaires/${process.env.QUESTIONNAIRE_ID}/link`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
channel: 'email',
}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/questionnaires/{os.environ['QUESTIONNAIRE_ID']}/link",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
json={
"channel": "email",
},
)
print(response.status_code, response.json())Réponse 200 :
{
"url": "https://app.smart-interview.ai/candidates?code=Hn5wB9kTe",
"code": "Hn5wB9kTe",
"sentOn": "email"
}Relancer un questionnaire
POST /partner/questionnaires/{id}/retry
Reset a completed questionnaire to pending and solicit the person again
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Questionnaire successfully reset and sent again |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/questionnaires/$QUESTIONNAIRE_ID/retry" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires/' . getenv('QUESTIONNAIRE_ID') . '/retry');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/questionnaires/${process.env.QUESTIONNAIRE_ID}/retry`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/questionnaires/{os.environ['QUESTIONNAIRE_ID']}/retry",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"message": "Questionnaire reset successfully"
}WARNING
Seulement sur un questionnaire terminé : un questionnaire en attente est refusé (400).
Partager le résultat d'un questionnaire
POST /partner/questionnaires/{id}/share-link
Generate public questionnaire report share link
Paramètres
| Nom | Emplacement | Type | Requis | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description |
|---|---|
200 | Return the public report URL and its code |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/questionnaires/$QUESTIONNAIRE_ID/share-link" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID"<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires/' . getenv('QUESTIONNAIRE_ID') . '/share-link');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch(`https://api.smart-interview.ai/partner/questionnaires/${process.env.QUESTIONNAIRE_ID}/share-link`, {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
},
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
f"https://api.smart-interview.ai/partner/questionnaires/{os.environ['QUESTIONNAIRE_ID']}/share-link",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
)
print(response.status_code, response.json())Réponse 200 :
{
"url": "https://app.smart-interview.ai/questionnaires/report/3c9f1e7b-2a5d-4b8e-9f6c-1d7a4e0b8c25?code=Hn5wB9kTe",
"code": "Hn5wB9kTe"
}Envoyer des liens en lot
POST /partner/questionnaires/bulk-send-link
Send the questionnaire link to several people at once
Corps de la requête
| Champ | Type | Requis | Description |
|---|---|---|---|
questionnaireIds | string[] | oui | The questionnaires whose link is sent (ex. 3c9f1e7b-2a5d-4b8e-9f6c-1d7a4e0b8c25) |
channel | whatsapp · email | non | The channel the links go out on. Left out: WhatsApp (ex. email) |
Réponses
| Code | Description |
|---|---|
200 | Links sent, with the per-questionnaire tally |
400 | Invalid request: details lists the fields at fault. Also an unsupported X-API-Version. |
401 | Missing, revoked or expired API key, or missing or unknown acting user. |
403 | Unknown API key, or the acting user may not act with this key or lacks the role. |
404 | Not found, or not in the organizations of your key. |
429 | Quota of the key exceeded: the Retry-After header gives the seconds to wait. |
500 | Unexpected error: quote the requestId to the support. |
Exemple
curl -X POST "https://api.smart-interview.ai/partner/questionnaires/bulk-send-link" \
-H "x-api-key: $CLE" \
-H "x-acting-user-id: $RECRUTEUR_ID" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"questionnaireIds": [
"$QUESTIONNAIRE_ID"
],
"channel": "email"
}
EOF<?php
$curl = curl_init('https://api.smart-interview.ai/partner/questionnaires/bulk-send-link');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('CLE'),
'x-acting-user-id: ' . getenv('RECRUTEUR_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'questionnaireIds' => [
getenv('QUESTIONNAIRE_ID'),
],
'channel' => 'email',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_RESPONSE_CODE), PHP_EOL, $response, PHP_EOL;const response = await fetch('https://api.smart-interview.ai/partner/questionnaires/bulk-send-link', {
method: 'POST',
headers: {
'x-api-key': process.env.CLE,
'x-acting-user-id': process.env.RECRUTEUR_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
questionnaireIds: [
process.env.QUESTIONNAIRE_ID,
],
channel: 'email',
}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.post(
"https://api.smart-interview.ai/partner/questionnaires/bulk-send-link",
headers={
"x-api-key": os.environ["CLE"],
"x-acting-user-id": os.environ["RECRUTEUR_ID"],
},
json={
"questionnaireIds": [
os.environ["QUESTIONNAIRE_ID"],
],
"channel": "email",
},
)
print(response.status_code, response.json())Réponse 200 :
{
"message": "Bulk send completed: 1 link(s) sent successfully, 0 failed",
"successCount": 1,
"failedCount": 0,
"failedIds": []
}
