Links

Update or Deactivate DID

Update or deactivate a DID
Users are able to update DID Documents for various reasons, such as to include a new section or to rotate the Verification Method keys within the DID Document.
With the /did/update API, users are able to input either:
  1. 1.
    The section of the DID Document they would like to update; or
  2. 2.
    The full updated DID Document body.
post
/did/update
Update a DID Document.

This endpoint updates a DID Document. As an input, it can take JUST the sections/parameters that need to be updated in the DID Document (in this scenario, it fetches the current DID Document and applies the updated section). Alternatively, it take the fully-assembled DID Document with updated sections as well as unchanged sections.

Parameters
No parameters
Body
Example
Schema
{
"did": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
"service": [
{
"id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1",
"type": "LinkedDomains",
"serviceEndpoint": [
"https://example.com"
]
}
],
"verificationMethod": [
{
"controller": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
"id": "did:cheqd:testnet :7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1",
"publicKeyBase58": "BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt",
"type": "Ed25519VerificationKey2018"
}
],
"authentication": [
"string"
],
"didDocument": {
"@context": [
"https://www.w3.org/ns/did/v1"
],
"id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
"controller": [
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
],
"verificationMethod": [
{
"id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1",
"type": "Ed25519VerificationKey2018",
"controller": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
"publicKeyBase58": "z6MkkVbyHJLLjdjU5B62DaJ4mkdMdUkttf9UqySSkA9bVTeZ"
}
],
"authentication": [
"did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"
],
"service": [
{
"id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1",
"type": "LinkedDomains",
"serviceEndpoint": [
"https://example.com"
]
}
]
}
}
application/x-www-form-urlencoded
Responses
200: OK
The request was successful.
400: Bad Request
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
401: Unauthorized
Access token is missing or invalid
500: Internal Server Error
An internal error has occurred. Additional state information plus metadata may be available in the response body.
Users are also able to deactivate DID Documents to prevent further updates and to provide client applications the relevant information that the DID Document is no longer actively used.
A /did/deactivate request must be signed by all of the Verification Method keys listed in the DID Document.
post
/did/deactivate/{did}
Deactivate a DID Document.

This endpoint deactivates a DID Document by taking the DID identifier as input. Must be called and signed by the DID owner.

Parameters
Path
did*
string
DID identifier to deactivate.
Responses
200: OK
The request was successful.
400: Bad Request
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
401: Unauthorized
Access token is missing or invalid
500: Internal Server Error
An internal error has occurred. Additional state information plus metadata may be available in the response body.