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": {
            "type": "basic",
            "basic": {
                "username": "user",
                "password": "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 apikey and basic.

Auth Object Structure

Use the auth object inside webhooks to send authentication details for webhook delivery.

{
    "auth": {
        "type": "apikey | basic",
        "status": true,
        "apikey": {
            "key": "X-Webhook-Key",
            "value": "your-api-key"
        },
        "basic": {
            "username": "your-username",
            "password": "your-password"
        }
    }
}
  • type (string): Required if auth is provided. Allowed values: apikey, basic.

  • apikey (object): Required when type is apikey.

  • apikey.key (string): Header name that will be sent to your webhook endpoint.

  • apikey.value (string): Header value for the API key.

  • basic (object): Required when type is basic.

  • basic.username (string): Basic auth username.

  • basic.password (string): Basic auth password.

Auth Example - API Key

{
    "webhooks": {
        "submission": {
            "status": true,
            "url": "https://example.com/webhook/submission"
        },
        "auth": {
            "type": "apikey",
            "apikey": {
                "key": "X-Webhook-Key",
                "value": "my-secret-key"
            }
        }
    }
}

Auth Example - Basic

{
    "webhooks": {
        "start": {
            "status": true,
            "url": "https://example.com/webhook/start"
        },
        "auth": {
            "type": "basic",
            "basic": {
                "username": "webhook-user",
                "password": "webhook-pass"
            }
        }
    }
}

Note

  • The start webhook is triggered when the candidate starts the AI interview.

  • The submission webhook is triggered when the candidate submits the AI interview.

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

  • If auth is not provided, existing authentication settings will be preserved.

Response

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