# \[deprecated] Delegate Wallet

`POST /wallets/:walletId/delegate`

{% hint style="danger" %}
Delegate Wallet is deprecated. Please use [Delegate Key](/d/api-docs/keys/delegate-key.md) instead.
{% endhint %}

In most cases, when you want to implement [Delegated Signing](/d/advanced-topics/delegated-signing.md), simply have the end-user create the wallet, in which case it will the non-custodial from the start.  There are some rare cases, however, where the wallet must be created before the user has accessed the system.  To accommodate this, we've added the ability to create a wallet from a service account, and then later delegate it (ie. transfer ownership of it) to an end user via this endpoint.

{% hint style="info" %}

* User action signature required. See [User Action Signing](/d/api-docs/authentication/user-action-signing.md) for more information.
* Request headers required. See [Request Headers](/d/advanced-topics/authentication/request-headers.md) for more information.
* Authentication required. See [Authentication Headers](/d/advanced-topics/authentication/request-headers.md#authentication-headers) for more information.
  {% endhint %}

## Required Permissions

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

## Parameters

### Path parameters

| Path parameter | Description                      |
| -------------- | -------------------------------- |
| `walletId`     | Unique identifier of the wallet. |

## Request Body

| Field    | Description                                       | Type   |
| -------- | ------------------------------------------------- | ------ |
| `userId` | The ID of the end user to delegate the wallet to. | String |

### Example

```shell
{
  "userId": "us-gk0i1-5bvju-xxxxxxxxxxxxxxxx"
}
```

## Response Body

The response indicates the status of the operation.

### 200 Success

```json
{
  "walletId": "wa-1f04s-lqc9q-xxxxxxxxxxxxxxxx",
  "status": "Delegated"
}
```


---

# 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/wallets/delegate-wallet.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.
