> ## 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 Swift.

<Note>
  Business Accounts are in **early access**. See the [overview](/docs/swift/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/swift/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).

```swift theme={"system"}
import DynamicSDKSwift

let sdk = DynamicSDK.instance()

guard let wallet = sdk.wallets.userWallets.first, let walletId = wallet.id else { return }

let response = try await sdk.businessAccounts.addSigner(
    accountAddress: wallet.address,
    chainName: wallet.chain,
    targetSignerIdentity: TargetIdentity(
        identifier: "teammate@acme.com",
        identifierType: .email
    ),
    businessAccountId: account.id,
    walletId: walletId,
    signerType: .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.

```swift theme={"system"}
let detail = try await sdk.businessAccounts.get(businessAccountId: account.id)

for signer in detail.signers where signer.walletId == walletId {
    print("\(signer.id), type: \(signer.type), user: \(signer.userId ?? "none")")
}
```

## Remove a signer

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

```swift theme={"system"}
let removed = try await sdk.businessAccounts.removeSigner(
    businessAccountId: account.id,
    walletId: walletId,
    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/swift/business-accounts/add-wallets), first.
</Warning>

## Next steps

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

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