Delete webhook usando una URL
DELETE
/api/webhook-subscriptions/remove-by-url/
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Delete, RequestUri = new Uri("https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/?url=https%3A%2F%2Fexample.com"), Headers = { { "X-Koibox-Key", "<X-Koibox-Key>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/?url=https%3A%2F%2Fexample.com")) .header("X-Koibox-Key", "<X-Koibox-Key>") .method("DELETE", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/?url=https%3A%2F%2Fexample.com") .delete(null) .addHeader("X-Koibox-Key", "<X-Koibox-Key>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'DELETE', url: 'https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/', params: {url: 'https://example.com'}, headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/?url=https%3A%2F%2Fexample.com';const options = {method: 'DELETE', headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.koibox.cloud/api/webhook-subscriptions/remove-by-url/?url=https%3A%2F%2Fexample.com' \ --header 'X-Koibox-Key: <X-Koibox-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”url
required
string format: uri
Responses
Section titled “Responses”The webhook has been deleted successfully
The access key has not been provided in the X-Koibox-Key header
Headers
Section titled “Headers”WWW-Authenticate
string
Indicates the required header for authentication
No valid access key has been provided
The resource was not found
