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

# SDKs

> Install the TypeScript client and call the Beach API.

## Official SDKs

The TypeScript SDK is published as [@beach-depository/sdk](https://www.npmjs.com/package/@beach-depository/sdk).

## Installation

```bash theme={null}
npm install @beach-depository/sdk
```

## Quick start

```typescript theme={null}
import { BeachApiClient, BeachApiEnvironment } from "@beach-depository/sdk"

const token = process.env.BEACH_API_KEY
if (!token) throw new Error("Set BEACH_API_KEY to a pv_sandbox_ or pv_live_ key")

const client = new BeachApiClient({
  token,
  environment: BeachApiEnvironment.Sandbox,
})

const page = await client.fboAccounts.list({ page: 1, limit: 25 })
```

`token` is your [API key](/getting-started#authorization). `BeachApiEnvironment.Sandbox` targets the sandbox; for live traffic, pass `baseUrl: "https://api.beachdepository.com"` instead of `environment`.

Calls are grouped by resource:

| Client | What it covers |
| - | - |
| `client.organization` | Organization profile and members |
| `client.fboAccounts` | FBO accounts, including `addresses` and `aliases` |
| `client.products` | Products |
| `client.inventory` | Inventory items |
| `client.inboundShipments` | Inbound shipments |
| `client.outboundRequests` | Outbound requests |
| `client.outboundShipments` | Outbound shipments |
| `client.transfers` | Transfers |
| `client.statements` | Statements |
| `client.labels` | Label rates |
| `client.webhooks` | Webhook endpoints |

A non-success response throws `BeachApiError`, with `statusCode`, `message`, and `body`.

## Idempotency

Create methods that support [idempotency](/getting-started#idempotency) take an optional `idempotencyKey` in the request options. The client sends it as the `Idempotency-Key` header.

```typescript theme={null}
const account = await client.fboAccounts.create(
  {
    firstName: "Jane",
    lastName: "Smith",
    email: "jane@example.com",
    phone: "+15551234567",
  },
  { idempotencyKey: "64099353-b48b-4dcd-98b7-74df1cc57933" },
)
```

Retrying that call with the same key within 24 hours returns the original response instead of creating a second account.
