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

# Manage Signers

> Grant and revoke the ability to sign with a business-account wallet from Flutter.

<Note>
  Business Accounts are in **early access**. See the [overview](/docs/flutter/business-accounts/overview) for the model.
</Note>

A **signer** can approve transactions and messages with a specific wallet. Signing access is separate from [membership roles](/docs/flutter/business-accounts/members-and-roles). Adding a signer grants them access, and removing one revokes only theirs, so the wallet and other signers stay intact.

<Info>
  Only an owner or admin can add signers, and the caller must already be an active signer on that wallet.
</Info>

## Add a signer

`addSigner` grants signing access to a user, and returns an `AddBusinessAccountSignerResponse` with the new `shareSetId`. Identify the target with a `TargetIdentity`: a known `userId`, or an `identifier` plus `identifierType` (for example an email, in which case the user is created if they do not exist yet).

```dart theme={"system"}
import 'package:dynamic_sdk/dynamic_sdk.dart';

final sdk = DynamicSDK.instance;

final wallet = sdk.wallets.userWallets.first;

final response = await sdk.businessAccounts.addSigner(
  accountAddress: wallet.address,
  chainName: wallet.chain,
  targetSignerIdentity: const TargetIdentity(
    identifier: 'teammate@acme.com',
    identifierType: BusinessAccountSignerIdentifierType.email,
  ),
  businessAccountId: account.id,
  walletId: wallet.id,
  signerType: BusinessAccountSignerType.endUser,
);

print(response.shareSetId);
```

<ParamField path="accountAddress" type="String" required>
  Address of the wallet the caller signs with, from `wallet.address`.
</ParamField>

<ParamField path="chainName" type="String" required>
  Chain of that wallet, from `wallet.chain` (for example `EVM` or `SOL`).
</ParamField>

<ParamField path="targetSignerIdentity" type="TargetIdentity" required>
  Who to add. Set `userId` for a known user, or `identifier` plus `identifierType`. For a phone number, also set `smsCountryCode`; for a social account, set `socialProvider`.
</ParamField>

<ParamField path="businessAccountId" type="String?">
  The account that owns the wallet.
</ParamField>

<ParamField path="walletId" type="String?">
  The wallet to add the signer to.
</ParamField>

<ParamField path="signerType" type="BusinessAccountSignerType?">
  `endUser` for a person, `server` for a server signer.
</ParamField>

<ParamField path="password" type="String?">
  Passphrase for the target's key share, when your environment encrypts shares.
</ParamField>

`identifierType` is a `BusinessAccountSignerIdentifierType`: `email`, `phoneNumber`, `externalUserId`, `socialUsername`, `socialAccountId`, or `id`.

## Read the current signers

`get` returns the account with its signers, so you can show who can sign and get the `signerId` needed for removal.

```dart theme={"system"}
final detail = await sdk.businessAccounts.get(
  businessAccountId: account.id,
);

for (final signer in detail.signers.where((s) => s.walletId == wallet.id)) {
  print('${signer.id}, type: ${signer.type.name}, user: ${signer.userId}');
}
```

## Remove a signer

`removeSigner` revokes a signer's access to one wallet, and returns the removed `BusinessAccountSigner`.

```dart theme={"system"}
final removed = await sdk.businessAccounts.removeSigner(
  businessAccountId: account.id,
  walletId: wallet.id,
  signerId: signerId,
);
```

<Warning>
  You cannot remove the **last active signer** on a wallet, because nobody could then approve transactions. Add another signer, or [remove the wallet](/docs/flutter/business-accounts/add-wallets), first.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Members and roles" icon="users" href="/docs/flutter/business-accounts/members-and-roles">
    Administer who can manage the account.
  </Card>

  <Card title="Sign transactions" icon="signature" href="/docs/flutter/business-accounts/signing">
    Use a signer's share to sign.
  </Card>
</CardGroup>
