---
title: "Attach external"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › entities

`PUT /v2/entities/{id}/wallet/external`

## Path parameters

- `id` (`entity-wallet-attach-external.path.id`; string, required)
  - format `uuid`

## Request body

_Required._

- `walletAddress` (`entity-wallet-attach-external.walletAddress`; string, required)
  - minLength 1
- `chainId` (`entity-wallet-attach-external.chainId`; integer, optional)
  - min 0
- `walletType` (`entity-wallet-attach-external.walletType`; string, optional)
  - one of `"external"`, `"safe"`, `"smart_account"`

## Example request

```json
{
  "walletAddress": "string",
  "chainId": 0,
  "walletType": "external"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sureshake.com/v2/entities/<id>/wallet/external' \
  --header 'Content-Type: application/json' \
  --data '
{
  "walletAddress": "string",
  "chainId": 0,
  "walletType": "external"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/wallet/external';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({walletAddress: 'string', chainId: 0, walletType: 'external'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/entities/<id>/wallet/external"

payload = {
    "walletAddress": "string",
    "chainId": 0,
    "walletType": "external"
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "walletAddress": "string",
    "chainId": 0,
    "walletType": "managed",
    "status": "pending",
    "controlPolicy": {
      "property1": null,
      "property2": null
    },
    "createdByUserId": "string",
    "activatedAt": "string",
    "failureCode": "string",
    "failurePublicMessage": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "canManage": true,
    "explorerUrl": "string",
    "controllers": [
      {
        "userId": "string",
        "role": "string",
        "status": "string",
        "removedAt": "string",
        "removedByUserId": "string",
        "removalReason": "string"
      }
    ]
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`entity-wallet-attach-external.response.200.data`; object, required)
  - `id` (`entity-wallet-attach-external.response.200.data.id`; string, required)
    - format `uuid`
  - `entityId` (`entity-wallet-attach-external.response.200.data.entityId`; string, required)
    - format `uuid`
  - `walletAddress` (`entity-wallet-attach-external.response.200.data.walletAddress`; string, required, nullable)
  - `chainId` (`entity-wallet-attach-external.response.200.data.chainId`; integer, required)
  - `walletType` (`entity-wallet-attach-external.response.200.data.walletType`; string, required)
    - one of `"managed"`, `"external"`, `"safe"`, `"smart_account"`
  - `status` (`entity-wallet-attach-external.response.200.data.status`; string, required)
    - one of `"pending"`, `"active"`, `"failed"`, `"disabled"`
  - `controlPolicy` (`entity-wallet-attach-external.response.200.data.controlPolicy`; map<unknown>, required)
  - `createdByUserId` (`entity-wallet-attach-external.response.200.data.createdByUserId`; string, required)
  - `activatedAt` (`entity-wallet-attach-external.response.200.data.activatedAt`; string, required, nullable)
  - `failureCode` (`entity-wallet-attach-external.response.200.data.failureCode`; string, required, nullable)
  - `failurePublicMessage` (`entity-wallet-attach-external.response.200.data.failurePublicMessage`; string, required, nullable)
  - `createdAt` (`entity-wallet-attach-external.response.200.data.createdAt`; string, required)
  - `updatedAt` (`entity-wallet-attach-external.response.200.data.updatedAt`; string, required)
  - `canManage` (`entity-wallet-attach-external.response.200.data.canManage`; boolean, required)
  - `explorerUrl` (`entity-wallet-attach-external.response.200.data.explorerUrl`; string, required, nullable)
  - `controllers` (`entity-wallet-attach-external.response.200.data.controllers`; array<object>, required)
    - `userId` (`entity-wallet-attach-external.response.200.data.controllers.userId`; string, required)
    - `role` (`entity-wallet-attach-external.response.200.data.controllers.role`; string, required)
    - `status` (`entity-wallet-attach-external.response.200.data.controllers.status`; string, required)
    - `removedAt` (`entity-wallet-attach-external.response.200.data.controllers.removedAt`; string, required, nullable)
    - `removedByUserId` (`entity-wallet-attach-external.response.200.data.controllers.removedByUserId`; string, required, nullable)
    - `removalReason` (`entity-wallet-attach-external.response.200.data.controllers.removalReason`; string, required, nullable)
- `meta` (`entity-wallet-attach-external.response.200.meta`; object, optional)
  - `timestamp` (`entity-wallet-attach-external.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.400.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.401.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.403.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.404.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.409.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.500.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-wallet-attach-external.response.503.error`; object, required)
  - `code` (`entity-wallet-attach-external.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-wallet-attach-external.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`entity-wallet-attach-external.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-wallet-attach-external.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/entity-wallet-attach-external/index.md
