Skip to main content
DELETE
/
api
/
v1
/
webhook
/
delete
Delete Subscription
curl --request DELETE \
  --url https://api.dojah.io/api/v1/webhook/delete \
  --header 'AppId: <appid>' \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "service": "<string>"
}
'
import requests

url = "https://api.dojah.io/api/v1/webhook/delete"

payload = { "service": "<string>" }
headers = {
"AppId": "<appid>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'DELETE',
headers: {
AppId: '<appid>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({service: '<string>'})
};

fetch('https://api.dojah.io/api/v1/webhook/delete', 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://api.dojah.io/api/v1/webhook/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'service' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"AppId: <appid>",
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.dojah.io/api/v1/webhook/delete"

payload := strings.NewReader("{\n \"service\": \"<string>\"\n}")

req, _ := http.NewRequest("DELETE", url, payload)

req.Header.Add("AppId", "<appid>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.dojah.io/api/v1/webhook/delete")
.header("AppId", "<appid>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dojah.io/api/v1/webhook/delete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["AppId"] = '<appid>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "entity": "webhook deleted successfully"
}
{
  "error": "Invalid request parameters"
}
{
  "error": "App Couldn't be Validated"
}
AppId
string
required
Application ID from dashboard

BODY PARAMS

service
string
required
The name of service to be deleted e.g sms, ngn_wallet

RESPONSES

200
json
json
400
Object
401
Object
{
  "entity": "webhook deleted successfully"
}
{
  "error": "Invalid request parameters"
}
{
  "error": "App Couldn't be Validated"
}