Webhooks
Delete Webhook
Deletes a webhook by its ID. The webhook must belong to the authenticated project.
DELETE
/
webhooks
/
{id}
curl --request DELETE \
--url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234 \
--header 'Authorization: Bearer AS_your-api-key'
import requests
webhook_id = "60d5ec49f1b2c72d9c8b1234"
url = f"https://api.autosend.com/v1/webhooks/{webhook_id}"
headers = {
"Authorization": "Bearer AS_your-api-key"
}
response = requests.delete(url, headers=headers)
print(response.json())
const webhookId = '60d5ec49f1b2c72d9c8b1234';
fetch(`https://api.autosend.com/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer AS_your-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$webhookId = '60d5ec49f1b2c72d9c8b1234';
$url = "https://api.autosend.com/v1/webhooks/{$webhookId}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
webhookID := "60d5ec49f1b2c72d9c8b1234"
url := "https://api.autosend.com/v1/webhooks/" + webhookID
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
public class DeleteWebhook {
public static void main(String[] args) {
try {
String webhookId = "60d5ec49f1b2c72d9c8b1234";
URL url = new URL("https://api.autosend.com/v1/webhooks/" + webhookId);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Authorization", "Bearer AS_your-api-key");
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
webhook_id = '60d5ec49f1b2c72d9c8b1234'
uri = URI("https://api.autosend.com/v1/webhooks/#{webhook_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri.request_uri)
request['Authorization'] = 'Bearer AS_your-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"message": "Webhook deleted successfully",
}
This endpoint accepts a project API key (
AS_ prefix). The webhook must belong to the authenticated project.curl --request DELETE \
--url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234 \
--header 'Authorization: Bearer AS_your-api-key'
import requests
webhook_id = "60d5ec49f1b2c72d9c8b1234"
url = f"https://api.autosend.com/v1/webhooks/{webhook_id}"
headers = {
"Authorization": "Bearer AS_your-api-key"
}
response = requests.delete(url, headers=headers)
print(response.json())
const webhookId = '60d5ec49f1b2c72d9c8b1234';
fetch(`https://api.autosend.com/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer AS_your-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$webhookId = '60d5ec49f1b2c72d9c8b1234';
$url = "https://api.autosend.com/v1/webhooks/{$webhookId}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
webhookID := "60d5ec49f1b2c72d9c8b1234"
url := "https://api.autosend.com/v1/webhooks/" + webhookID
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
public class DeleteWebhook {
public static void main(String[] args) {
try {
String webhookId = "60d5ec49f1b2c72d9c8b1234";
URL url = new URL("https://api.autosend.com/v1/webhooks/" + webhookId);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Authorization", "Bearer AS_your-api-key");
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
webhook_id = '60d5ec49f1b2c72d9c8b1234'
uri = URI("https://api.autosend.com/v1/webhooks/#{webhook_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri.request_uri)
request['Authorization'] = 'Bearer AS_your-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"message": "Webhook deleted successfully",
}
Authorizations
Project API key header of the form Bearer
AS_<key>.Path Parameters
The unique identifier of the webhook to delete.Example:
"60d5ec49f1b2c72d9c8b1234"Response
Webhook deleted successfully (200)Indicates if the request was successful
Confirmation messageExample:
"Webhook deleted successfully"Error Responses
Returned when no webhook with the given ID exists in the project.
{
"success": false,
"error": {
"message": "Webhook not found",
"code": "WEBHOOK_NOT_FOUND",
}
}
Was this page helpful?
⌘I
curl --request DELETE \
--url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234 \
--header 'Authorization: Bearer AS_your-api-key'
import requests
webhook_id = "60d5ec49f1b2c72d9c8b1234"
url = f"https://api.autosend.com/v1/webhooks/{webhook_id}"
headers = {
"Authorization": "Bearer AS_your-api-key"
}
response = requests.delete(url, headers=headers)
print(response.json())
const webhookId = '60d5ec49f1b2c72d9c8b1234';
fetch(`https://api.autosend.com/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer AS_your-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$webhookId = '60d5ec49f1b2c72d9c8b1234';
$url = "https://api.autosend.com/v1/webhooks/{$webhookId}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
webhookID := "60d5ec49f1b2c72d9c8b1234"
url := "https://api.autosend.com/v1/webhooks/" + webhookID
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.HttpURLConnection;
import java.net.URL;
public class DeleteWebhook {
public static void main(String[] args) {
try {
String webhookId = "60d5ec49f1b2c72d9c8b1234";
URL url = new URL("https://api.autosend.com/v1/webhooks/" + webhookId);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Authorization", "Bearer AS_your-api-key");
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
webhook_id = '60d5ec49f1b2c72d9c8b1234'
uri = URI("https://api.autosend.com/v1/webhooks/#{webhook_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri.request_uri)
request['Authorization'] = 'Bearer AS_your-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"message": "Webhook deleted successfully",
}