Delete Device
curl --request DELETE \
--url https://api.eka.care/notification/delete-device \
--header 'Authorization: Bearer <token>' \
--header 'device-id: <device-id>'import requests
url = "https://api.eka.care/notification/delete-device"
headers = {
"device-id": "<device-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'device-id': '<device-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/notification/delete-device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://api.eka.care/notification/delete-device")
.header("device-id", "<device-id>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/notification/delete-device");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("device-id", "<device-id>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/notification/delete-device")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["device-id"] = '<device-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "Unauthorized access.",
"error_code": 401
}{
"message": "Internal server error.",
"error_code": 500
}User App
Delete Device
To be called when the device is logged out or uninstalled. This endpoint allows clients to remove a registered device by specifying its device ID in the header. Upon successful deletion, the device will no longer receive notifications. The device-id parameter in the header is required.
DELETE
/
notification
/
delete-device
Delete Device
curl --request DELETE \
--url https://api.eka.care/notification/delete-device \
--header 'Authorization: Bearer <token>' \
--header 'device-id: <device-id>'import requests
url = "https://api.eka.care/notification/delete-device"
headers = {
"device-id": "<device-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'device-id': '<device-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/notification/delete-device', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://api.eka.care/notification/delete-device")
.header("device-id", "<device-id>")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/notification/delete-device");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("device-id", "<device-id>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/notification/delete-device")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["device-id"] = '<device-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "Unauthorized access.",
"error_code": 401
}{
"message": "Internal server error.",
"error_code": 500
}Was this page helpful?

