Delete subscription
Remove a destination subscription from a topic.
DELETE
/topics/{id}/subscriptions/{sub_id}
Remove a destination subscription from a topic.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Path Parameters
id
string
required
path
Topic ID
sub_id
string
required
path
Subscription ID
Responses
200
Subscription deleted
application/jsonsuccess
boolean
REQUIRED
401
Unauthorized
404
Not found
curl -X DELETE 'https://hookstream.io/v1/topics/string/subscriptions/string' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/topics/string/subscriptions/string', {
method: 'DELETE',
headers: {
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
response = requests.delete('https://hookstream.io/v1/topics/string/subscriptions/string', headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://hookstream.io/v1/topics/string/subscriptions/string", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
200
Response
{
"success": true
}
DELETE
/topics/{id}/subscriptions/{sub_id}