Skip to main content
Version: 2.0.0

Webhook Management API

Endpointwhisper-manage-callback
URLhttps://llmwhisperer-api.us-central.unstract.com/api/v2/whisper-manage-callback
MethodGET (gets details about webhook)
POST (registers a webhook)
Headersunstract-key: <YOUR API KEY>
Content-Type: application/json

Parameters

Only GET method requires parameters.

ParameterTypeDefaultRequiredDescription
webhook_namestringYesThe name of the webhook.

Request Body for POST method

{
"url": "<URL to be called after conversion is done>",
"auth_token": "<Token (bearer)>",
"webhook_name": "<Name of the webhook>"
}

When a webhook is registered with this API, it will send a dummy payload to the URL to check if the URL is functioning. If the URL is not functioning, the webhook will not be registered. The URL should return a 200 status code. Payload sent will be:

{
"payload_status": {
"status": "test",
"message": "Testing webhook"
},
"line_metadata": [],
"confidence_metadata": [],
"result_text": "WEBHOOK_TEST",
"metadata": {}
}

Example Curl Request

Register a webhook

curl -X POST --location 'https://llmwhisperer-api.us-central.unstract.com/api/v2/whisper-manage-callback' \
-H 'unstract-key: <Your API Key>' \
-H 'Content-Type: application/json' \
-d '{"url":"https://<url-of-webhook>","auth_token":"<Token (bearer)>","webhook_name":"<Name of the webhook>"}'

Get webhook details

curl -X GET --location 'https://llmwhisperer-api.us-central.unstract.com/api/v2/whisper-manage-callback?webhook_name=<Your webhook name>' \
-H 'unstract-key: <Your API Key>'

Response for GET method

HTTP StatusContent-TypeHeadersDescription
200application/jsonThe API will return a JSON with the webhook details. Refer below for JSON format

Example 200 Response

{    
"url": "<URL to be called after conversion is done>",
"auth_token": "<Token (bearer)>",
"webhook_name": "<Name of the webhook>"
}