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

# Organizations

[@qonto/embed-sdk](../README) / organizations

# Variable: organizations

> `const` **organizations**: `object`

The organizations namespace contains all the functions related to organizations'
operations such as retrieving bank accounts.

**Client-side only** - Uses proxy-based authentication (proxyEndpointDescriptor).
For server-side operations with accessToken, import from `'@qonto/embed-sdk/server/organizations'`.

## Type declaration

### getBankAccounts()

> **getBankAccounts**: (`operationSettings`) => `Promise`\<[`BankAccount`](../-internal-/interfaces/BankAccount)\[]>

Retrieves the bank accounts for the organization.

**Client-side only** - Uses proxy-based authentication.
For server-side operations, import from `'@qonto/embed-sdk/server/organizations'`.

#### Parameters

##### operationSettings

An object with operation-level settings such as
`proxyEndpointDescriptor` (required).

###### operationSettings

[`ClientOperationSettings`](../-internal-/interfaces/ClientOperationSettings)

#### Returns

`Promise`\<[`BankAccount`](../-internal-/interfaces/BankAccount)\[]>

A promise that resolves to the bank accounts for the organization.

#### Throws

`InvalidParametersError` If `proxyEndpointDescriptor` is not provided.

#### Throws

`EmbedApiError` If the API request fails or returns an error.

#### Example

```
const bankAccounts = await getBankAccounts({
  operationSettings: { proxyEndpointDescriptor }
});
```

### getMembership()

> **getMembership**: (`params`) => `Promise`\<[`Membership`](../-internal-/interfaces/Membership)>

Retrieves the membership information for the current user.

**Client-side only** - Uses proxy-based authentication.
For server-side operations, import from `'@qonto/embed-sdk/server/organizations'`.

#### Parameters

##### params

(Optional) An object containing:

* `operationSettings`: (Optional) An object with operation-level settings such as
  `proxyEndpointDescriptor`. If not provided here, the settings previously passed
  to the `initialize` function will be used.

###### operationSettings?

[`ClientOperationSettings`](../-internal-/interfaces/ClientOperationSettings)

#### Returns

`Promise`\<[`Membership`](../-internal-/interfaces/Membership)>

A promise that resolves to the membership information for the current user.

#### Throws

`InvalidParametersError` If `proxyEndpointDescriptor` is not provided here
or via `initialize`.

#### Throws

`EmbedApiError` If the API request fails or returns an error.

#### Examples

```
// Using proxyEndpointDescriptor passed to initialize
const membership = await getMembership();
```

```
// Passing proxyEndpointDescriptor per-call
const membership = await getMembership({
  operationSettings: { proxyEndpointDescriptor }
});
```

### getOrganization()

> **getOrganization**: (`operationSettings`) => `Promise`\<[`Organization`](../-internal-/interfaces/Organization)>

Retrieves the organization information.

**Client-side only** - Uses proxy-based authentication.
For server-side operations, import from `'@qonto/embed-sdk/server/organizations'`.

#### Parameters

##### operationSettings

An object with operation-level settings such as
`proxyEndpointDescriptor` (required).

###### operationSettings

[`ClientOperationSettings`](../-internal-/interfaces/ClientOperationSettings)

#### Returns

`Promise`\<[`Organization`](../-internal-/interfaces/Organization)>

A promise that resolves to the organization the current user belongs to.

#### Throws

`InvalidParametersError` If `proxyEndpointDescriptor` is not provided.

#### Throws

`EmbedApiError` If the API request fails or returns an error.

#### Example

```
const organization = await getOrganization({
  operationSettings: { proxyEndpointDescriptor }
});
```

## Example

```ts theme={null}
import { organizations } from '@qonto/embed-sdk/organizations';

const bankAccounts = await organizations.getBankAccounts({
  operationSettings: { proxyEndpointDescriptor }
});
```
