---
title: "Import dids into your wallet"
description: "You can import existing DIDs into your wallet using the following API endpoint:"
stack: "Community Stack (open source) — version 0.21.0"
stack_version: "0.21.0"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/community-stack/wallet/did-management/import-dids
generated: 2026-07-20
---
# Import dids into your wallet

You can import existing DIDs into your wallet using the following API endpoint:

**Option: CURL**

**Endpoint:** 
`/wallet-api/wallet/{wallet}/dids/import` | [API Reference](https://wallet.test.waltid.cloud/swagger/index.html#/DIDs/post_wallet_api_wallet__wallet__dids_import)

**Example Request:**

```bash
curl -X 'POST' \
    'https://wallet.test.waltid.cloud/wallet-api/wallet/{wallet_id}/
dids/import' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiSzdrSzdVVmdnd0JKNWRCeFpxZGhFWFZ1VktfWGdsQzRfQl9kckoxOWE5RSIsIngiOiJBbXhmcUZtZkpUTGtQelNSZUxQRGJJYzhtTmNmWjN1MDNZbUVGNTQ1QW5zIn0",
  "key": {
    "kty": "OKP",
    "d": "GypvW9liOrvh-woOUpYCg3g5ZiELpKQfK0bPO6M-VGU",
    "crv": "Ed25519",
    "kid": "K7kK7UVggwBJ5dBxZqdhEXVuVK_XglC4_B_drJ19a9E",
    "x": "AmxfqFmfJTLkPzSReLPDbIc8mNcfZ3u03YmEF545Ans"
  },
  "alias": "test"
}
'
```

**Body Parameters:**
- `did`: The DID to be imported in the wallet.
- `key`: The private key associated with the DID in JWK format or can be a String PEM.
- `alias` (optional): An alias for the DID to help identify it within the wallet
- **Response Codes:**
- `201`: DID imported successfully.
- `400`: Invalid DID or missing/invalid key material.
- `401`: Invalid authentication.
- `409`: DID already exists.
