> 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/aca-py/dids/create-did.md).

# Create a DID

Create a did:cheqd Decentralized Identifier (DID) using the ACA-Py Agent.

Follow these instructions to create a new DID from ACA-Py Agent and publish the associated DID Document on cheqd ledger.

> ⚠️ **Before you begin...**
>
> Make sure you've correctly [configured the cheqd plugin's agent settings](/product/sdk/aca-py/setup-aca-py-agent.md) for ACA-Py.

For wallet storage, utilise a Postgres database to ensure key persistence, enabling future updates to the DID.

## Create DID

Populate the various `options`and `features`in the JSON request body and call the API to create the DID.&#x20;

{% openapi src="/files/VIzToYXSCuPwCrpBbLYU" path="/did/cheqd/create" method="post" %}
[swagger.json](https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2F6otKdslTxD5vA4zstkSG%2Fswagger.json?alt=media\&token=4be3b6bb-f452-4d59-b61c-c6dc0e597b74)
{% endopenapi %}

## Request Body

These are the variables that can be passed in the Body:

<details>

<summary>features (optional)</summary>

Optional Object with Key-Value format for additional features of the new DID. This is for future use.

</details>

<details>

<summary>options (optional)</summary>

Optional Object with Key-Value format for additional configuration options, recommendations below:

"network": testnet or mainnet

"key\_type": "ed25519" or "bls12381g2"

</details>

## List DIDs associated with your wallet <a href="#list-dids-associated-with-your-account" id="list-dids-associated-with-your-account"></a>

After creating a DID or multiple DIDs, users can list all the created DIDs associated with their wallet. Using the `/wallet/did` API.

{% openapi src="/files/VIzToYXSCuPwCrpBbLYU" path="/wallet/did" method="get" %}
[swagger.json](https://3569764573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVAMvpKH7PYzvXA6u6Cn%2Fuploads%2F6otKdslTxD5vA4zstkSG%2Fswagger.json?alt=media\&token=4be3b6bb-f452-4d59-b61c-c6dc0e597b74)
{% endopenapi %}


---

# 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/aca-py/dids/create-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.
