> For the complete documentation index, see [llms.txt](https://docs.cheqd.io/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheqd.io/product/sdk/credo/dids/deactivate-did.md).

# Deactivate a DID

Deactivate a did:cheqd DID using the Credo Agent.

This guide explains how to **deactivate a `did:cheqd`** using a configured Credo Agent. Deactivating a DID marks it as no longer usable but does **not** remove it from the ledger — the DID can still be resolved and its deactivated state will be reflected in its metadata.

## Prerequisites

Before deactivating a DID, ensure that:

* The **Credo agent is configured** with cheqd support
* The DID you are deactivating was created and is controlled by your agent
* You have access to the signing key used to authorize DID updates

## Behavior of Deactivated DIDs

* Deactivated DIDs **remain resolvable**
* DID resolvers will indicate that the DID is **deactivated**
* The DID and its associated document become **immutable and non-functional**
* Deactivation is **permanent**

### Parameters

| Parameter | Required | Description                                                    |
| --------- | -------- | -------------------------------------------------------------- |
| `did`     | ✅        | The full `did:cheqd` identifier you wish to deactivate         |
| `options` | ❌        | Optional settings, including a `versionId` to track the update |

### Example: Deactivate a cheqd DID

```ts
await agent.dids.deactivate({
  did: 'did:cheqd:testnet:b84817b8-43ee-4483-98c5-f03760816411',
  options: {
    versionId: '3.0', // Optional: for tracking version history or audit purposes
  },
})
```

***

### Notes

* The optional `versionId` parameter allows you to assign a custom version identifier to the deactivation transaction
* Once deactivated, the DID cannot be updated, reactivated, or used for issuing credentials
* You can still resolve the DID to verify its deactivated status via the `deactivated: true` metadata


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cheqd.io/product/sdk/credo/dids/deactivate-did.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
