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

# BatchSessions

> TypeScript SDK reference for the BatchSessions resource

## listBatchSessions

`GET /v1/batch-sessions` — List Batch Sessions

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.listBatchSessions();
console.log(result);
```

## createBatchSession

`POST /v1/batch-sessions` — Create Batch Sessions

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.createBatchSession({
  body: {
    count: 1
  }
});
console.log(result);
```

## getBatchSession

`GET /v1/batch-sessions/{batch_id}` — Get Batch Session Status

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.getBatchSession({
  path: {
    batch_id: 'your-batch-id'
  }
});
console.log(result);
```

## updateBatchSession

`PATCH /v1/batch-sessions/{batch_id}` — Update Batch Session

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.updateBatchSession({
  path: {
    batch_id: 'your-batch-id'
  },
  body: {
    status: 'cancelled'
  }
});
console.log(result);
```

## deleteBatchSession

`DELETE /v1/batch-sessions/{batch_id}` — Delete Batch Sessions

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.deleteBatchSession({
  path: {
    batch_id: 'your-batch-id'
  }
});
console.log(result);
```

## retryBatchSession

`POST /v1/batch-sessions/{batch_id}/retry` — Retry Failed Batch Sessions

```typescript theme={null}
import { client, BatchSessions } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await BatchSessions.retryBatchSession({
  path: {
    batch_id: 'your-batch-id'
  },
  body: {}
});
console.log(result);
```
