Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oHttp.BasicAuth = True
$oHttp.Login = "username"
$oHttp.Password = "password"
Local $oResp = $oHttp.QuickRequest("DELETE","https://domain.com/v2/apps/{{appId}}/integrations/:integrationId/webhooks/:webhookId")
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$oResp.GetBodySb($oSbResponseBody)
$oJResp = ObjCreate("Chilkat.JsonObject")
$oJResp.LoadSb($oSbResponseBody)
$oJResp.EmitCompact = False
ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oJResp.Emit() & @CRLF)
Local $iRespStatusCode = $oResp.StatusCode
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode >= 400) Then
ConsoleWrite("Response Header:" & @CRLF)
ConsoleWrite($oResp.Header & @CRLF)
ConsoleWrite("Failed." & @CRLF)
Exit
EndIf
Curl Command
curl -X DELETE
-u 'username:password'
https://domain.com/v2/apps/{{appId}}/integrations/:integrationId/webhooks/:webhookId
Postman Collection Item JSON
{
"name": "Delete Webhook",
"_postman_id": "9306f26d-faff-4c2a-a67d-dce45d21e284",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{url}}/v2/apps/{{appId}}/integrations/:integrationId/webhooks/:webhookId",
"host": [
"{{url}}"
],
"path": [
"v2",
"apps",
"{{appId}}",
"integrations",
":integrationId",
"webhooks",
":webhookId"
],
"variable": [
{
"key": "integrationId"
},
{
"key": "webhookId"
}
]
},
"description": "Deletes the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration."
},
"response": [
{
"id": "a14e6d0c-c661-4a00-84ad-4d0ed2b9b01b",
"name": "Not Found",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": {
"content": "Added as a part of security scheme: bearer",
"type": "text/plain"
},
"key": "Authorization",
"value": "Bearer <token>"
}
],
"url": {
"raw": "{{baseUrl}}/v2/apps/:appId/integrations/:integrationId/webhooks/:webhookId",
"host": [
"{{baseUrl}}"
],
"path": [
"v2",
"apps",
":appId",
"integrations",
":integrationId",
"webhooks",
":webhookId"
],
"variable": [
{
"key": "appId"
},
{
"key": "integrationId"
},
{
"key": "webhookId"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"id": "bf53cfa2-6411-4fc6-a58e-b264d115d61c",
"name": "Ok",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": {
"content": "Added as a part of security scheme: bearer",
"type": "text/plain"
},
"key": "Authorization",
"value": "Bearer <token>"
}
],
"url": {
"raw": "{{baseUrl}}/v2/apps/:appId/integrations/:integrationId/webhooks/:webhookId",
"host": [
"{{baseUrl}}"
],
"path": [
"v2",
"apps",
":appId",
"integrations",
":integrationId",
"webhooks",
":webhookId"
],
"variable": [
{
"key": "appId"
},
{
"key": "integrationId"
},
{
"key": "webhookId"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
}
]
}