# `createChangeThresholdTransaction`

Creates a Safe transaction to change the threshold of the connected Safe.

## Usage


<Tabs items={['example.ts', 'setup.ts']}>
  <Tabs.Tab>
    ```typescript
    import { safeClient } from './setup.ts'

    const transaction = await safeClient.createChangeThresholdTransaction({
      threshold: 2
    })

    const txResult = await safeClient.send({
      transactions: [transaction]
    })
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ```typescript
    import { createSafeClient } from '@safe-global/sdk-starter-kit'
    
    export const safeClient = await createSafeClient({
      provider,
      signer,
      safeAddress: '0x...'
    })
    ```
  </Tabs.Tab>
</Tabs>


## Returns

`Promise<TransactionBase>`

The Safe transaction to change the threshold of the connected Safe.

## Parameters

### `threshold`

- **Type:** `string`

The new threshold of the connected Safe. If not provided, the current threshold is used.

```typescript focus=2
const transaction = await safeClient.createChangeThresholdTransaction({
  threshold
})
```
