PUT Add Webhooks in an AI Interview¶
This API updates webhook settings for a specific AI interview.
Request URL¶
PUT /ai-interviews/settings/webhooks/<ai_interview_id>
Body Parameters¶
{
"webhooks": {
"start": {
"status": true,
"url": "https://example.com/webhook/start"
},
"submission": {
"status": true,
"url": "https://example.com/webhook/submission"
},
"auth": {
"status": true,
"type": "basic",
"basic": {
"username": "webhook-user",
"password": "webhook-pass"
}
}
}
}
Warning
Make sure to add your API key in the Header of the request using the key apiKey.
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
ai_interview_id |
int |
AI interview ID whose webhook settings should be updated. |
start |
object |
Webhook configuration for when the candidate starts. |
submission |
object |
Webhook configuration for when the candidate submits. |
status |
boolean |
Whether the webhook is enabled. |
url |
string |
The URL to receive event notifications. |
auth |
object |
Optional auth object. Supports |
auth.status |
boolean |
Must be |
auth.type |
string |
Authentication type: |
auth.basic.username |
string |
Basic auth username. Must be a string, not an object. |
auth.basic.password |
string |
Basic auth password. |
auth.apikey.header |
string |
Header name sent to your webhook endpoint. |
auth.apikey.apikey |
string |
API key value sent in that header. |
Auth Object Structure¶
Use the auth object inside webhooks to send authentication details for webhook delivery.
{
"auth": {
"status": true,
"type": "basic",
"basic": {
"username": "your-username",
"password": "your-password"
},
"apikey": {
"header": "X-Webhook-Key",
"apikey": "your-api-key"
}
}
}
status(boolean): Must betrueto enable authentication on delivery.type(string): Required ifauthis provided. Allowed values:apikey,basic.apikey(object): Required whentypeisapikey.apikey.header(string): Header name that will be sent to your webhook endpoint.apikey.apikey(string): Header value for the API key.basic(object): Required whentypeisbasic.basic.username(string): Basic auth username. Must be a string, not an object.basic.password(string): Basic auth password.
Auth Example - API Key¶
{
"webhooks": {
"submission": {
"status": true,
"url": "https://example.com/webhook/submission"
},
"auth": {
"status": true,
"type": "apikey",
"apikey": {
"header": "X-Webhook-Key",
"apikey": "my-secret-key"
}
}
}
}
Auth Example - Basic¶
{
"webhooks": {
"start": {
"status": true,
"url": "https://example.com/webhook/start"
},
"auth": {
"status": true,
"type": "basic",
"basic": {
"username": "webhook-user",
"password": "webhook-pass"
}
}
}
}
Note
The
startwebhook is triggered when the candidate starts the AI interview.The
submissionwebhook is triggered when the candidate submits the AI interview.Either one or both webhooks can be included in the request body.
If
authis not provided, existing authentication settings will be preserved.auth.statusmust betruefor authentication to be applied when delivering webhooks.auth.basic.usernameandauth.basic.passwordmust be strings. Objects are rejected.
Response¶
{
"status": "success",
"message": "Webhooks updated successfully"
}