---
title: "TypeB24"
description: "Public contract implemented by every entry-point class (B24Frame, B24Hook, B24OAuth). Single source of truth for the SDK surface."
canonical_url: "https://bitrix24.github.io/b24jssdk/docs/working-with-the-rest-api/types-type-b24"
last_updated: "2026-08-25"
---
# TypeB24

> Public contract implemented by every entry-point class (B24Frame, B24Hook, B24OAuth). Single source of truth for the SDK surface.

`TypeB24`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""} is the unified type implemented by `B24Frame`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}, `B24Hook`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}, and `B24OAuth`{className="language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight" language="ts-type" style=""}. Use it as a parameter type when your code shouldn't care which transport it talks to.

```ts
import type { TypeB24 } from '@bitrix24/b24jssdk'

async function listAdminTasks($b24: TypeB24): Promise<unknown[]> {
  const response = await $b24.actions.v2.callList.make<{ id: number, title: string }>({
    method: 'tasks.task.list',
    params: { filter: { '!=STATUS': '5' }, select: ['ID', 'TITLE'] },
    idKey: 'id', // tasks return lowercase id
    cursorIdKey: 'ID', // ...but sort / filter by uppercase ID
    customKeyForResult: 'tasks',
    requestId: 'admin-tasks'
  })
  return response.isSuccess ? response.getData()! : []
}
```

## Shape

```ts-type
type TypeB24 = {
  readonly isInit: boolean
  init(): Promise<void>
  destroy(): void

  getLogger(): LoggerInterface
  setLogger(logger: LoggerInterface): void

  get auth(): AuthActions
  get actions(): ActionsManager
  get tools(): ToolsManager

  setRestrictionManagerParams(params: RestrictionParams): Promise<void>

  getTargetOrigin(): string
  getTargetOriginWithPath(): Map<ApiVersion, string>

  getHttpClient(version: ApiVersion): TypeHttp
  setHttpClient(version: ApiVersion, client: TypeHttp): void

  // @deprecated — use actions.v2.* / actions.v3.* instead.
  // Removed in 3.0.0:
  callMethod(method: string, params?: object, start?: number): Promise<AjaxResult>
  callListMethod(method: string, params?: object, progress?: null | ((p: number) => void), customKeyForResult?: string | null): Promise<Result>
  fetchListMethod(method: string, params?: any, idKey?: string, customKeyForResult?: string | null): AsyncGenerator<any[]>
  callBatch(calls: any[] | object, isHaltOnError?: boolean, returnAjaxResult?: boolean): Promise<Result>
  callBatchByChunk(calls: any[], isHaltOnError: boolean): Promise<Result>
}
```

> [!CAUTION]
> `callMethod` / `callListMethod` / `fetchListMethod` / `callBatch` / `callBatchByChunk` will be removed in **3.0.0**. Migrate to `actions.v{2,3}.{call,callList,fetchList,batch,batchByChunk}.make(options)`.

## Related Types

- [`AuthActions`](https://github.com/bitrix24/b24jssdk/blob/main/packages/jssdk/src/types/auth.ts){rel="[\"nofollow\"]"} — returned by `auth`.
- [`ActionsManager`](https://github.com/bitrix24/b24jssdk/blob/main/packages/jssdk/src/core/actions/manager.ts){rel="[\"nofollow\"]"} — returned by `actions`. Houses `v2.*` and `v3.*`.
- [`ToolsManager`](https://github.com/bitrix24/b24jssdk/blob/main/packages/jssdk/src/core/tools/manager.ts){rel="[\"nofollow\"]"} — returned by `tools`. Houses `healthCheck` and `ping`.
- [`TypeHttp`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/core-http.md) — returned by `getHttpClient(version)`.
- [`RestrictionParams`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/limiters.md) — argument to `setRestrictionManagerParams`.
- [`ApiVersion`](https://github.com/bitrix24/b24jssdk/blob/main/packages/jssdk/src/types/b24.ts){rel="[\"nofollow\"]"} — `'v2'` or `'v3'`.

## Sitemap

See the full [sitemap](/b24jssdk/sitemap.md) for all pages.
