# Create a DID

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](https://docs.cheqd.io/product/sdk/aca-py/setup-aca-py-agent) 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="<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>" 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="<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>" 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 %}
