Delete a DID
curl --request DELETE \
--url https://api.example.com/dids/{did}import requests
url = "https://api.example.com/dids/{did}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/dids/{did}', 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.example.com/dids/{did}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.example.com/dids/{did}"
req, _ := http.NewRequest("DELETE", url, nil)
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.example.com/dids/{did}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dids/{did}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyDIDs
Delete a DID
Submit a signed identity deletion request
Delete a DID
curl --request DELETE \
--url https://api.example.com/dids/{did}import requests
url = "https://api.example.com/dids/{did}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/dids/{did}', 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.example.com/dids/{did}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.example.com/dids/{did}"
req, _ := http.NewRequest("DELETE", url, nil)
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.example.com/dids/{did}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dids/{did}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyThis endpoint submits the
The JSON body must include the same DID-key proof fields as Deactivate a DID, with
delete_did control operation for an OpenPayload DID. Use it only when the identity is meant to be removed from the registry. For a device retirement, use Tombstone a device instead.
Request
string
required
The complete DID to delete, URL-encoded in the path.
action: "delete_did": did, current control_nonce as nonce, future valid_until, authorized signer_key_id, canonical_payload, and signature. Sign the locally constructed canonical payload bytes. The Directory rejects a path and body DID mismatch, stale nonce, expired request, or mismatched payload.
The 202 Accepted response contains the DID, status: "accepted", extrinsic: "apply_control_with_proof", and tx_hash. It confirms submission only. Verify the resulting registry state after chain finalization. A deleted DID may no longer resolve; clients must not assume a 202 response has already removed it.
Straight to the point
DELETE /dids/{did}
Action: delete_did
Accepted submission: 202; verify after finalization

