웹훅 삭제
curl --request DELETE \
--url https://sajuapi.dev/v1/webhooks/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/webhooks/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sajuapi.dev/v1/webhooks/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body웹훅
웹훅 삭제
DELETE
/
v1
/
webhooks
/
{id}
웹훅 삭제
curl --request DELETE \
--url https://sajuapi.dev/v1/webhooks/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/webhooks/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sajuapi.dev/v1/webhooks/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyv1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
현재는 v0 API를 사용하세요.
이 작업은 되돌릴 수 없습니다. 삭제된 웹훅의 시크릿과 전송 기록은 복구할 수 없습니다.
Path 파라미터
string
required
삭제할 웹훅의 ID입니다.
whk_ 접두사로 시작합니다.Response
성공
웹훅 삭제에 성공하면 삭제 확인 정보가 반환됩니다.실패
| 상태 코드 | 에러 타입 | 설명 |
|---|---|---|
| 401 | authentication_error | API 키가 유효하지 않음 |
| 404 | not_found | 웹훅을 찾을 수 없음 |
| 429 | rate_limited | 요청 한도 초과 |
요청 예시
curl -X DELETE https://api.sajuapi.dev/v1/webhooks/whk_abc123def456 \
-H "X-API-Key: bs_live_xxx"
const response = await fetch(
'https://api.sajuapi.dev/v1/webhooks/whk_abc123def456',
{
method: 'DELETE',
headers: {
'X-API-Key': 'bs_live_xxx'
}
}
);
const result = await response.json();
import requests
response = requests.delete(
'https://api.sajuapi.dev/v1/webhooks/whk_abc123def456',
headers={'X-API-Key': 'bs_live_xxx'}
)
result = response.json()
응답 예시
{
"id": "whk_abc123def456",
"deleted": true,
"deleted_at": "2025-01-16T15:00:00Z"
}
응답 필드
| 필드 | 타입 | 설명 |
|---|---|---|
id | string | 삭제된 웹훅의 ID입니다. |
deleted | boolean | 삭제 성공 여부입니다. 항상 true입니다. |
deleted_at | string | 삭제 시간입니다. ISO 8601 형식입니다. |
⌘I