# Get Key by ID

`GET /keys/{keyId}`

Retrieves a key by its ID.

{% hint style="info" %}

* Request headers required. See [Request Headers](https://app.gitbook.com/o/puStYG2QYnebEAexXqmt/s/tnSPOZGQ2hBmgoVWX5H6/advanced-topics/authentication/request-headers) for more information.
* Authentication required. See [Authentication Headers](https://app.gitbook.com/o/puStYG2QYnebEAexXqmt/s/tnSPOZGQ2hBmgoVWX5H6/advanced-topics/authentication/request-headers#authentication-headers) for more information.
  {% endhint %}

## Required Permissions

| Name        | Conditions      |
| ----------- | --------------- |
| `Keys:Read` | Always Required |

## Parameters

### Path parameters

| Path parameter | Description                   |
| -------------- | ----------------------------- |
| `keyId`        | Unique identifier of the key. |

## Response Body

See [Create Key response](/d/api-docs/keys/create-key.md#response) plus the following additional fields

| Field     | Description                                        | Type - Optional    |
| --------- | -------------------------------------------------- | ------------------ |
| `wallets` | List of wallets the key can sign transactions for. | Array\<WalletInfo> |
| `store`   | Key store used by this key                         | KeyStoreInfo       |

#### WalletInfo

<table data-full-width="false"><thead><tr><th>Property</th><th>Description</th><th>Type - Optional</th></tr></thead><tbody><tr><td><code>id</code></td><td>ID of the wallet.</td><td>String</td></tr><tr><td><code>network</code></td><td>Network wallet is bound to.</td><td>String</td></tr></tbody></table>

#### KeyStoreInfo

<table data-full-width="false"><thead><tr><th>Property</th><th>Description</th><th>Type - Optional</th></tr></thead><tbody><tr><td><code>kind</code></td><td>Type of key store. Either <code>Mpc</code> or <code>Hsm</code>.</td><td>String</td></tr><tr><td><code>keyId</code></td><td>Internal key identifier. This id is used for the Layer 4 backup</td><td>String</td></tr></tbody></table>

### 200 Success

```json
{
  "id": "key-6ece3-9l565-xxxxxxxxxxxxxxxx",
  "scheme": "ECDSA",
  "curve": "secp256k1",
  "publicKey": "02660461d66a637ea2d2ee3565669ad794f51ca3e0812ff03a0fe4820a19754839",
  "status": "Active",
  "custodial": true,
  "dateCreated": "2025-03-26T20:25:52.909Z",
  "wallets": [
    {
      "id": "wa-1f04s-lqc9q-xxxxxxxxxxxxxxxx",
      "network": "Ethereum"
    },
    {
      "id": "wa-2g15t-2rh0y-xxxxxxxxxxxxxxxx",
      "network": "Polygon"
    }
  ],
  "store": {
    "kind": "Mpc",
    "keyId": "mpckey-4o12d-ghjk6-xxxxxxxxxxxxxxxx"
  }
}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-legacy.dfns.co/d/api-docs/keys/get-key-by-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
