POST Add/Update webhooks¶
This API sets up webhooks in assessment settings
Request URL¶
POST /webhooks
Body Parameters¶
{
"webhooks": {
"start": {
"status": true,
"url": "https://example.com/webhook/start"
},
"submission": {
"status": true,
"url": "https://example.com/webhook/submission"
},
"updates": {
"status": true,
"url": "https://example.com/webhook/updates"
},
"auth": {
"status": true,
"type": "basic",
"basic": {
"username": "webhook-user",
"password": "webhook-pass"
}
}
},
"updateAll": false,
"updateAuth": true
}
Auth Example - Basic¶
{
"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"
}
}
},
"updateAll": true,
"updateAuth": true
}
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"
}
}
},
"updateAuth": true
}
Warning
Make sure to add your API key in Header of the request
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
start |
object |
When the candidate starts the assessment. |
submission |
object |
When the candidate submits the assessment. |
updates |
object |
When the recruiter creates, updates, archives or deletes the assessment |
status |
boolean |
Whether the webhook is enabled. |
url |
string |
The URL to receive event notifications. |
updateAll |
boolean |
If true, webhooks are updated in all the assessments else, it is only updated in assessment settings. |
updateAuth |
boolean |
If true, authentication settings in |
auth |
object |
Authentication configuration for webhook delivery (optional). |
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. |
Note
The
startwebhook is triggered when the candidate starts the assessment.The
submissionwebhook is triggered when the candidate submits the assessment.The
updateswebhook is triggered when an assessment is created, updated, archived or deleted.You can include any combination of
start,submission, andupdatesin the request body. Omitted keys keep their existing values where supported.Set
updateAuthtotruewhen updatingwebhooks.auth.auth.basic.usernameandauth.basic.passwordmust be strings. Objects are rejected.
Response¶
{
"status": "success",
"message": "Webhook added successfully",
"webhook": {
"start": {
"status": true,
"url": "https://example.com/webhook/start"
},
"submission": {
"status": true,
"url": "https://example.com/webhook/submission"
},
"updates": {
"status": true,
"url": "https://example.com/webhook/updates"
},
"auth": {
"status": true,
"type": "basic",
"basic": {
"username": "webhook-user",
"password": null,
"hasPassword": true
}
}
}
}