PUT Update Webhooks in an Assessment

This API updates the existing webhook of an assessment.

Request URL

PUT /webhooks/<assessment_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"
            }
        }
    }
}

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"
            }
        }
    }
}

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"
            }
        }
    }
}

Warning

Make sure to add your API key in Header of the request

Parameters

Parameter

Type

Description

assessment_id

int

Assessment ID whose webhooks should be updated

start

object

Webhook for when the assessment starts.

submission

object

Webhook for when the assessment is submitted.

status

boolean

Whether the webhook is enabled.

url

string

The URL to receive event notifications.

auth

object

Authentication configuration for webhook delivery.

auth.status

boolean

Must be true to enable and apply authentication.

auth.type

string

Authentication type: basic or apikey.

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 start webhook is triggered when the candidate starts the assessment.

  • The submission webhook is triggered when the candidate submits the assessment.

  • Either one or both webhooks can be included in the request body.

  • auth.basic.username and auth.basic.password must be strings. Objects are rejected.

Response

{
    "status": "success",
    "message": "Webhook updated successfully"
}