Webhook Management API
Endpoint | whisper-manage-callback |
URL | https://llmwhisperer-api.us-central.unstract.com/api/v2/whisper-manage-callback |
Method | GET (gets details about webhook)POST (registers a webhook) |
Headers | unstract-key: <YOUR API KEY> Content-Type: application/json |
Parameters
Only GET
method requires parameters.
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
webhook_name | string | Yes | The 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 Status | Content-Type | Headers | Description |
---|---|---|---|
200 | application/json | The 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>"
}