> For the complete documentation index, see [llms.txt](https://polkasafe.gitbook.io/polkasafe-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polkasafe.gitbook.io/polkasafe-sdk/guides-and-tutorials/create-multisig.md).

# Create Multisig

Developers can create multisig wallets using the SDK. This functionality enables the setup of wallets with multiple signatories, enhancing the security and decentralization of fund management.

`Note: createMultisig will only create a multisig you need to do a existential deposite to onchain your multisig wallet`

```typescript
// To create a multisig wallet, a minimum of two signatories and a threshold of two are required.
// The signatories can be other user addresses participating in the multisig setup.
// Threshold represents the minimum number of approvals required from the signatories to send a transaction

const signatories = ['...', '...', '...'] // Array of substrate address
const threshold = 2 // number
const multisigName = 'Polka Multisig'

const { data, error } = await client.createMultisig(signatories, threshold, multisigName);

if (data){
    console.log(data)
    // use your data
}
else if(error){
    console.log(error)
}
```

#### Response Data

```json
{
  "address": "5Hq6ZUJQi5PeRNVxXgi8tgjnuLdok2fyCXske1GixE5vZZ4X",
  "created_at": "2023-05-16T12:36:39.240Z",
  "updated_at": "2023-05-16T12:36:39.240Z",
  "disabled": false,
  "name": "Doc Test",
  "signatories": [
    "5CFSybkjCJsddmUoYpCuobzcZntmDqbnNBxknpn8rTRwt7DC",
    "5DZeMuT9k1NhaZHH9unxNakK4sGPpkXaV4x6zKmPuUMyxn83",
    "5EF9om9xiFbRMgjPcrH9fc2G8QUUXF4iibnFoPW2PRTC2shS",
  ],
  "network": "rococo",
  "threshold": 3
}
```

[Generic Error](/polkasafe-sdk/guides-and-tutorials/generic-errors.md)
