# Gumlet TypeScript API

Complete reference of every operation, grouped by resource. See [the README](./README.md) for usage and configuration.

## Contents

- [`VideoAssets`](#videoassets)
  - [Create Asset](#create-asset)
  - [Create Asset Direct Upload](#create-asset-direct-upload)
  - [Asset Details](#asset-details)
  - [Delete Asset](#delete-asset)
  - [Update Asset](#update-asset)
  - [Update thumbnail from video](#update-thumbnail-from-video)
  - [Update thumbnail via upload](#update-thumbnail-via-upload)
  - [Create/Update Video Asset Chapters](#createupdate-video-asset-chapters)
  - [List Assets (Deprecated)](#list-assets-deprecated)
  - [List Assets](#list-assets)
  - [Bulk Delete](#bulk-delete)
  - [Bulk Tag](#bulk-tag)
  - [Asset Analytics](#asset-analytics)
- [`SubtitleUpload`](#subtitleupload)
  - [Upload Subtitles](#upload-subtitles)
  - [Complete Subtitle Upload](#complete-subtitle-upload)
- [`AudioUpload`](#audioupload)
  - [Add Audio](#add-audio)
  - [Complete Audio Upload](#complete-audio-upload)
- [`VideoUsageAnalytics`](#videousageanalytics)
  - [Video Usage Analytics](#video-usage-analytics)
  - [Top Streamed Assets](#top-streamed-assets)
- [`MultipartUpload`](#multipartupload)
  - [Get Part Upload URL](#get-part-upload-url)
  - [Complete Multipart Upload](#complete-multipart-upload)
  - [Abort Upload](#abort-upload)
  - [List Uploads](#list-uploads)
- [`VideoProfiles`](#videoprofiles)
  - [Create Profile](#create-profile)
  - [List Profiles](#list-profiles)
  - [Update Profile](#update-profile)
  - [Get Profile](#get-profile)
  - [Delete Profile](#delete-profile)
- [`VideoPlaylists`](#videoplaylists)
  - [Create Playlist](#create-playlist)
  - [Get all playlists](#get-all-playlists)
  - [Add asset to playlist](#add-asset-to-playlist)
  - [Remove asset from playlist](#remove-asset-from-playlist)
  - [Update Playlist](#update-playlist)
  - [Delete Playlist](#delete-playlist)
  - [Get playlist assets](#get-playlist-assets)
  - [Arrange Videos In Playlist](#arrange-videos-in-playlist)
- [`WebhookEndpoints`](#webhookendpoints)
  - [Create Webhook](#create-webhook)
  - [List Webhooks](#list-webhooks)
  - [Update Webhook](#update-webhook)
  - [Delete Webhook](#delete-webhook)
  - [Get History](#get-history)
- [`ImageSources`](#imagesources)
  - [Create Source](#create-source)
  - [List Sources](#list-sources)
  - [Get Image Source](#get-image-source)
  - [Update Source](#update-source)
  - [Delete Source](#delete-source)
  - [Purge Cache](#purge-cache)
  - [Purge Image Cache](#purge-image-cache)
- [`ImageUsageAnalytics`](#imageusageanalytics)
  - [Image Usage Analytics](#image-usage-analytics)
- [`LiveStreamAssets`](#livestreamassets)
  - [Create Live Asset](#create-live-asset)
  - [Update Live Asset](#update-live-asset)
  - [Get Live Asset Status](#get-live-asset-status)
  - [Delete Live Asset](#delete-live-asset)
  - [Complete Live Stream](#complete-live-stream)
  - [Filter Live Assets](#filter-live-assets)
  - [`start`](#start)
  - [Upload Live Thumbnails](#upload-live-thumbnails)
  - [Get Live Asset Status History](#get-live-asset-status-history)
- [`RecycleBin`](#recyclebin)
  - [Recover Deleted Asset](#recover-deleted-asset)
  - [List Recycle Bin](#list-recycle-bin)
- [`VideoWorkspaces`](#videoworkspaces)
  - [List Workspaces](#list-workspaces)
  - [Create Workspace](#create-workspace)
  - [Update Workspace](#update-workspace)
  - [Get Workspace](#get-workspace)
  - [Delete Workspace](#delete-workspace)
- [`Folders`](#folders)
  - [Create Folder](#create-folder)
  - [List Folders](#list-folders)
  - [Get Folder](#get-folder)
  - [Update Folder](#update-folder)
  - [Delete Folder](#delete-folder)
  - [Remove Assets From Folder](#remove-assets-from-folder)
- [`ChannelViewers`](#channelviewers)
  - [Invite Channel Viewers](#invite-channel-viewers)
  - [Remove Channel Viewers](#remove-channel-viewers)
  - [Invite Channel Viewers via CSV](#invite-channel-viewers-via-csv)
  - [List Subscribers](#list-subscribers)
- [`VideoAnalytics`](#videoanalytics)
  - [Viewer Analytics](#viewer-analytics)
  - [Breakdown Data](#breakdown-data)
  - [Aggregated Data](#aggregated-data)
- [`OrganizationData`](#organizationdata)
  - [Get Organization Details](#get-organization-details)
- [`UserData`](#userdata)
  - [Get User](#get-user)
- [`AuditLogs`](#auditlogs)
  - [Fetch Audit Logs](#fetch-audit-logs)
- [`Billing`](#billing)
  - [List Invoices](#list-invoices)
  - [Get Billing Details](#get-billing-details)
  - [Update Billing Details](#update-billing-details)
  - [Upcoming Invoice](#upcoming-invoice)
- [`LiveStreamWorkspaces`](#livestreamworkspaces)
  - [List Workspaces](#list-workspaces-1)
  - [Create Workspace](#create-workspace-1)
  - [Update Workspace](#update-workspace-1)
  - [Delete Workspace](#delete-workspace-1)
- [`LiveStreamAnalytics`](#livestreamanalytics)
  - [Usage Analytics](#usage-analytics)
- [`GlobalSearch`](#globalsearch)
  - [Global Search](#global-search)

## Setup

```ts
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
```

## `VideoAssets`

Upload, manage, and retrieve video assets, including thumbnails, subtitles, audio tracks, and chapters.

### Create Asset

An asset refers to media content/video that is processed, stored, and delivered through Gumlet. This endpoint creates an asset allowing users to ingest media content into the Gumlet system for processing and delivery.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetCreateParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetCreateResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.create({
  format: 'ABR',
  workspace_id: '<your workspace id>',
  title: 'Example Title',
  input: 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8',
});
```

### Create Asset Direct Upload

This endpoint creates a video asset allowing upload of a video from the local file system and ingest media content into the Gumlet system for processing and delivery. Body parameters are the same as the Create Asset body parameters except for the `input` parameter, which this endpoint does not take. A successful response will be returned with `upload_url` field. You can make `PUT` request to that URL to upload video. To upload video using `upload_url` refer to [this](https://docs.gumlet.com/docs/direct-upload#2-use-the-url-to-upload-a-file).

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetUploadParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetUploadResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.upload({
  format: 'ABR',
  collection_id: '646df1c9173a4a2fcac180b4',
  description: 'some description',
  tag: ['ball'],
  profile_id: '646df1c9173a4a2fcac180b7',
  playlist_id: '6597acd5ed6f26a9c5ca9633',
  metadata: { headermeta: 'metavalue' },
  call_to_actions: [
    {
      start_time: 1,
      end_time: 90,
      text: 'some test',
      url: 'https://some-url.com',
      position_from_top: 11,
      position_from_right: 23,
      font_color: '#000001',
      background_color: '#ffffff',
    },
  ],
  folder: '697375fbfa2d1037283140e4',
  workspace_id: '646df1c9173a4a2fcac180b4',
});
```

### Asset Details

This endpoint retrieves the details of an asset that has previously been created.

| Direction | Type |
| --- | --- |
| Response | [`VideoAssetRetrieveDetailsResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.retrieveDetails('assetId');
```

### Delete Asset

This endpoint removes an asset given its unique asset id. The asset will be removed from storage as well, associated URLs will be inaccessible.

```ts
await client.videoAssets.delete('assetId');
```

### Update Asset

This endpoint allows users to update video asset that has previously been created.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetUpdateParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetUpdateResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.update({ asset_id: '<YOUR_ASSET_ID>', title: 'Updated Title' });
```

### Update thumbnail from video

Select frame from video to use as thumbnail.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetThumbnailSelectParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetThumbnailSelectResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.thumbnailSelect('assetId', { frame_at_second: 2 });
```

### Update thumbnail via upload

Use any image file to use as thumbnail. Once you use the API, you will get `upload_url` in the response, and that can be used to upload the image file.

Here is the sample curl request.

```bash
curl --location --request PUT '<upload_url>' \
--data '<YOUR_FILE_PATH>'
```

| Direction | Type |
| --- | --- |
| Response | [`VideoAssetThumbnailUploadResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.thumbnailUpload('assetId');
```

### Create/Update Video Asset Chapters

This endpoint will create/update video asset chapters.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetCreateUpdateChapterParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetCreateUpdateChapterResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.createUpdateChapter('assetId', {
  chapters: [
    { label: 'Chapter 1', startTime: 0 },
    { label: 'Chapter 2', startTime: 10 },
  ],
});
```

### List Assets (Deprecated)

[Deprecated] Combined folders + assets list for a workspace. Use `GET /video/assets/list/{workspace_id}` for assets and `GET /video/workspaces/{workspace_id}/folders` for folders instead.

List folders and assets for a workspace in a single response. Use `parent_id` to browse a specific folder, or filters like `title`, `status`, and `playlist_id` to search assets.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetListWorkspaceFoldersAndDeprecatedParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetListWorkspaceFoldersAndDeprecatedResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.listWorkspaceFoldersAndDeprecated('workspaceId', {
  type: 'all',
  offset: 0,
  size: 20,
  signed_token: 'false',
});
```

### List Assets

List assets in a video workspace (local Mongo list; not Atlas Search).

Use `page_number` and `page_size` for page-based pagination. Use `next_page_token` for cursor-based pagination where supported.

`next_page_token` is supported only with the **default** sort or `sortBy=created_at` (and without a `title` search). It is **not** supported with other sort fields (for example `title`, `duration`, `status`, `playlist_order`, `custom`) or when `title` is set; in those cases use `page_number` / `page_size` only.

For folders, use `GET /video/workspaces/{workspace_id}/folders` and combine results in your client. The combined endpoint `GET /video/workspaces/{workspace_id}/list` is deprecated.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetListParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetListResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.list('workspaceId', {
  sortBy: 'created_at',
  orderBy: 'desc',
  signed_token: 'false',
  page_number: 1,
  page_size: 20,
});
```

### Bulk Delete

Delete multiple VOD assets at once.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetDeleteManyParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetDeleteManyResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.deleteMany({
  source_id: '60bd2ba353ff754d28179ee6',
  asset_list: ['64249a8858fd3a208b987702', '64784bae843b155b829bbf84'],
  workspace_id: '60bd2ba353ff754d28179ee6',
});
```

### Bulk Tag

Add / remove tags from multiple assets at once.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetTagManyParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetTagManyResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.tagMany({
  source_id: '60bd2ba353ff754d28179ee6',
  add_tags: ['tag-1'],
  remove_tags: ['playlist-1'],
  asset_list: ['6221db301c8b821b0519fba0', '61e8f2726ec832ab2ac4fa6e'],
  workspace_id: '60bd2ba353ff754d28179ee6',
});
```

### Asset Analytics

Get video analytics for a single asset.

| Direction | Type |
| --- | --- |
| Request | [`VideoAssetAnalyticsParams`](./src/resources/video-assets.ts) |
| Response | [`VideoAssetAnalyticsResponse`](./src/resources/video-assets.ts) |

```ts
const videoAsset = await client.videoAssets.analytics('assetId', {
  group_by: 'daily',
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  metrics: ['impressions'],
});
```

## `SubtitleUpload`

Add subtitles to an existing asset.

### Upload Subtitles

Upload `.srt` or `.vtt` file to the video asset. The response of this API call gives `upload_url` for each language specified. You need to send a `PUT` request of the subtitle files to those URLs. Once that's done, you need to call the subtitle upload complete API. Only after that, Gumlet will add subtitles to asset.

| Direction | Type |
| --- | --- |
| Request | [`SubtitleUploadUploadParams`](./src/resources/subtitle-upload.ts) |
| Response | [`SubtitleUploadUploadResponse`](./src/resources/subtitle-upload.ts) |

```ts
const subtitleUpload = await client.subtitleUpload.upload('assetId');
```

### Complete Subtitle Upload

This API must be called after adding subtitles; the add subtitle call gives you URLs to upload, and you complete a `PUT` request to those URLs. 
Once that is done, calling this initiates the process to actually add the subtitle to the video.

| Direction | Type |
| --- | --- |
| Request | [`SubtitleUploadCompleteParams`](./src/resources/subtitle-upload.ts) |
| Response | [`SubtitleUploadCompleteResponse`](./src/resources/subtitle-upload.ts) |

```ts
const subtitleUpload = await client.subtitleUpload.complete('assetId');
```

## `AudioUpload`

Add additional audio tracks to an existing asset.

### Add Audio

Add any audio file to the video asset. 
The response of this API call gives `upload_url` for each language specified. You need to send a `PUT` request of the audio files to those URLs. Once that's done, you need to call the audio upload complete API. Only after that will Gumlet add audio to the asset.

| Direction | Type |
| --- | --- |
| Request | [`AudioUploadUploadParams`](./src/resources/audio-upload.ts) |
| Response | [`AudioUploadUploadResponse`](./src/resources/audio-upload.ts) |

```ts
const audioUpload = await client.audioUpload.upload('assetId');
```

### Complete Audio Upload

Finish adding audio tracks to an existing video asset. Call this only after the audio files have been PUT to the upload URLs from the add-audio call. This attaches those tracks to the asset.

| Direction | Type |
| --- | --- |
| Request | [`AudioUploadCompleteParams`](./src/resources/audio-upload.ts) |
| Response | [`AudioUploadCompleteResponse`](./src/resources/audio-upload.ts) |

```ts
const audioUpload = await client.audioUpload.complete('assetId');
```

## `VideoUsageAnalytics`

Query video analytics and streaming duration usage data.

### Video Usage Analytics

This endpoint gives usage analytics data of your videos. Ex - top assets, bandwidth consumption.

Pagination applies only to `top_assets` and `widget_data` metrics.

| Direction | Type |
| --- | --- |
| Request | [`VideoUsageAnalyticRetrieveParams`](./src/resources/video-usage-analytics.ts) |
| Response | [`VideoUsageAnalyticRetrieveResponse`](./src/resources/video-usage-analytics.ts) |

```ts
const videoUsageAnalytic = await client.videoUsageAnalytics.retrieve({
  metrics: ['bandwidth_consumption', 'asset_duration', 'storage_unit', 'top_assets', 'drm_requests'],
  date_range: { start_at: '2026-08-01', end_at: '2026-08-20' },
  group_by: 'daily',
});
```

### Top Streamed Assets

This endpoint lists top streamed assets in a video collection

| Direction | Type |
| --- | --- |
| Request | [`VideoUsageAnalyticTopAssetsParams`](./src/resources/video-usage-analytics.ts) |
| Response | [`VideoUsageAnalyticTopAssetsResponse`](./src/resources/video-usage-analytics.ts) |

```ts
const videoUsageAnalytic = await client.videoUsageAnalytics.topAssets({
  start_at: '2026-06-21',
  end_at: '2026-06-30',
  page: '1',
  page_size: '1000',
});
```

## `MultipartUpload`

Upload large video files in parts and complete the multipart upload.

### Get Part Upload URL

Use this endpoint to retrieve a pre-signed upload URL for the given part number.

| Direction | Type |
| --- | --- |
| Request | [`MultipartUploadRetrievePartURLParams`](./src/resources/multipart-upload.ts) |
| Response | [`MultipartUploadRetrievePartURLResponse`](./src/resources/multipart-upload.ts) |

```ts
const multipartUpload = await client.multipartUpload.retrievePartURL('partNumber', {
  asset_id: 'assetId',
});
```

### Complete Multipart Upload

Once you upload all parts to S3 bucket via pre-signed URL, use this endpoint to complete the multipart upload.

| Direction | Type |
| --- | --- |
| Request | [`MultipartUploadCompleteParams`](./src/resources/multipart-upload.ts) |
| Response | [`MultipartUploadCompleteResponse`](./src/resources/multipart-upload.ts) |

```ts
const multipartUpload = await client.multipartUpload.complete('assetId');
```

### Abort Upload

This call aborts multi-part upload and deletes the already uploaded parts from the storage.

| Direction | Type |
| --- | --- |
| Request | [`MultipartUploadAbortParams`](./src/resources/multipart-upload.ts) |
| Response | [`MultipartUploadAbortResponse`](./src/resources/multipart-upload.ts) |

```ts
const multipartUpload = await client.multipartUpload.abort('assetId');
```

### List Uploads

Lists all parts uploaded so far.

| Direction | Type |
| --- | --- |
| Request | [`MultipartUploadListParams`](./src/resources/multipart-upload.ts) |
| Response | [`MultipartUploadListResponse`](./src/resources/multipart-upload.ts) |

```ts
const multipartUpload = await client.multipartUpload.list('assetId');
```

## `VideoProfiles`

Create and manage encoding/output profiles for video assets.

### Create Profile

Gumlet provides the functionality of creating multiple video assets using the same set of parameters. A Video profile is a set of parameters that can be referenced/used while creating a video as a single parameter.

| Direction | Type |
| --- | --- |
| Request | [`VideoProfileCreateParams`](./src/resources/video-profiles.ts) |
| Response | [`VideoProfileCreateResponse`](./src/resources/video-profiles.ts) |

```ts
const videoProfile = await client.videoProfiles.create({
  name: 'Gumlet-Profile-1',
  format: 'ABR',
  transcribe: false,
});
```

### List Profiles

This endpoint retrieves the details of all profiles that have previously been created.

Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`VideoProfileListParams`](./src/resources/video-profiles.ts) |
| Response | [`VideoProfileListResponse`](./src/resources/video-profiles.ts) |

```ts
const videoProfile = await client.videoProfiles.list({
  page_number: 1,
  page_size: 20,
});
```

### Update Profile

Update an existing profile. Settings provided in body parameters will only be updated in the existing profile.

| Direction | Type |
| --- | --- |
| Request | [`VideoProfileUpdateParams`](./src/resources/video-profiles.ts) |
| Response | [`VideoProfileUpdateResponse`](./src/resources/video-profiles.ts) |

```ts
const videoProfile = await client.videoProfiles.update('profileId', {
  profile_id: '',
  format: 'ABR',
  transcribe: false,
  vc: ['libx264'],
});
```

### Get Profile

This endpoint retrieves the details of a video profile that has previously been created.

| Direction | Type |
| --- | --- |
| Response | [`VideoProfileRetrieveResponse`](./src/resources/video-profiles.ts) |

```ts
const videoProfile = await client.videoProfiles.retrieve('profileId');
```

### Delete Profile

This endpoint removes a profile given its unique `profile_id`. The profile will be removed but video assets created using the profile will remain as it is.

| Direction | Type |
| --- | --- |
| Response | [`VideoProfileDeleteResponse`](./src/resources/video-profiles.ts) |

```ts
const videoProfile = await client.videoProfiles.delete('profileId');
```

## `VideoPlaylists`

Create and manage playlists, and control which assets belong to them.

### Create Playlist

Create new playlist inside video wprkspace

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistCreateParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistCreateResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.create({
  title: 'Playlist-Title',
  description: 'This is description for playlist.',
  collection_id: '{{video-source-id}}',
  workspace_id: '{{video-source-id}}',
});
```

### Get all playlists

Get all playlists for given workspace

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistListAllParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistListAllResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.listAll();
```

### Add asset to playlist

This operation adds a single asset or a list of assets to a playlist.

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistCreateAssetParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistCreateAssetResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.createAsset('playlistId', {
  asset_list: [
    { asset_id: '6508790283e4d60611846790' },
    { position: 1, asset_id: '650878f883e4d6061184677d' },
    { asset_id: '650878de83e4d6061184676a' },
    { position: 2, asset_id: '650878d883e4d60611846757' },
    { position: 3, asset_id: '65578dd87eebc22dcdd549a2' },
  ],
});
```

### Remove asset from playlist

Removed an asset or list of assets from a given playlist.

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistDeleteAssetParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistDeleteAssetResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.deleteAsset('playlistId', {
  delete_list: ['6508790783e4d606118467a3'],
});
```

### Update Playlist

This endpoint allows you to update playlist name, channel visibility, or playlist order on a channel page.

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistUpdateParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistUpdateResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.update('playlistId');
```

### Delete Playlist

Deletes a playlist by plalist ID.

```ts
await client.videoPlaylists.delete('playlistId');
```

### Get playlist assets

Get a list of all assets inside playlist. You can choose in which order are assets returned.

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistListAssetsParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistListAssetsResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.listAssets('playlistId', {
  sort_order: 1,
  page_number: 1,
  page_size: '10',
});
```

### Arrange Videos In Playlist

Reorder videos inside a playlist either by moving a single asset to a position or by sorting the playlist by title or created date.

| Direction | Type |
| --- | --- |
| Request | [`VideoPlaylistReorderAssetParams`](./src/resources/video-playlists.ts) |
| Response | [`VideoPlaylistReorderAssetResponse`](./src/resources/video-playlists.ts) |

```ts
const videoPlaylist = await client.videoPlaylists.reorderAsset('playlistId', {
  asset_id: '6e82bf783e88be000ab45ed2',
  page_number: 1,
  page_size: 10,
  asset_position: 0,
});
```

## `WebhookEndpoints`

Create webhook listeners and receive video status, live video status, and product events. Gumlet POSTs JSON to your URL with the `x-gumlet-token` header.

### Create Webhook

Creates a new webhook listener. Gumlet POSTs JSON to `url` for each matching event and sends `secret_token` in the `x-gumlet-token` header. Payload schemas are documented in the webhooks section.

| Direction | Type |
| --- | --- |
| Request | [`WebhookEndpointCreateParams`](./src/resources/webhook-endpoints.ts) |
| Response | [`WebhookEndpointCreateResponse`](./src/resources/webhook-endpoints.ts) |

```ts
const webhookEndpoint = await client.webhookEndpoints.create({
  url: '',
  secret_token: '',
  triggers: ['status'],
  sources: [''],
});
```

### List Webhooks

List all webhooks.

| Direction | Type |
| --- | --- |
| Response | [`WebhookEndpointListResponse`](./src/resources/webhook-endpoints.ts) |

```ts
const webhookEndpoint = await client.webhookEndpoints.list();
```

### Update Webhook

Update a webhook listener.

| Direction | Type |
| --- | --- |
| Request | [`WebhookEndpointUpdateParams`](./src/resources/webhook-endpoints.ts) |
| Response | [`WebhookEndpointUpdateResponse`](./src/resources/webhook-endpoints.ts) |

```ts
const webhookEndpoint = await client.webhookEndpoints.update('webhookId');
```

### Delete Webhook

Delete webhook listener endpoint.

| Direction | Type |
| --- | --- |
| Response | [`WebhookEndpointDeleteResponse`](./src/resources/webhook-endpoints.ts) |

```ts
const webhookEndpoint = await client.webhookEndpoints.delete('webhookId');
```

### Get History

Get logs history for a given webhook.

Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`WebhookEndpointHistoryParams`](./src/resources/webhook-endpoints.ts) |
| Response | [`WebhookEndpointHistoryResponse`](./src/resources/webhook-endpoints.ts) |

```ts
const webhookEndpoint = await client.webhookEndpoints.history('webhookId', {
  page_number: 1,
  page_size: 20,
});
```

## `ImageSources`

Manage image sources, view image analytics, and purge the image cache.

### Create Source

This endpoint allows users to create image source.

| Direction | Type |
| --- | --- |
| Request | [`ImageSourceCreateParams`](./src/resources/image-sources.ts) |
| Response | [`ImageSourceCreateResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.create({
  type: 'webfolder',
  webfolder: { base_url: 'https://www.google.com' },
  namespace: 'google-demo',
});
```

### List Sources

This endpoint list image sources which are assigned to the user or token.

Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`ImageSourceListParams`](./src/resources/image-sources.ts) |
| Response | [`ImageSourceListResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.list({
  page_number: 1,
  page_size: 20,
});
```

### Get Image Source

Get all details about image source.

| Direction | Type |
| --- | --- |
| Response | [`ImageSourceRetrieveResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.retrieve('imageSourceId');
```

### Update Source

Update settings on an image source that already exists. This does not create a source or purge cached images.

| Direction | Type |
| --- | --- |
| Request | [`ImageSourceUpdateParams`](./src/resources/image-sources.ts) |
| Response | [`ImageSourceUpdateResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.update('imageSourceId');
```

### Delete Source

This endpoint removes a image source. All image delivery using this subdomain will be stopped.

| Direction | Type |
| --- | --- |
| Response | [`ImageSourceDeleteResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.delete('imageSourceId');
```

### Purge Cache

You can purge cache for any image by using our cache purge API.

| Direction | Type |
| --- | --- |
| Request | [`ImageSourcePurgeCacheParams`](./src/resources/image-sources.ts) |
| Response | [`ImageSourcePurgeCacheResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.purgeCache('subdomain');
```

### Purge Image Cache

You can purge the cache for any image path by using this cache purge API.

| Direction | Type |
| --- | --- |
| Request | [`ImageSourcePurgeParams`](./src/resources/image-sources.ts) |
| Response | [`ImageSourcePurgeResponse`](./src/resources/image-sources.ts) |

```ts
const imageSource = await client.imageSources.purge('sourceId', { paths: ['image.jpeg', 'image2.png'] });
```

## `ImageUsageAnalytics`

Query aggregated and chart-ready image usage analytics data.

### Image Usage Analytics

This endpoint helps you get image analytics data like bandwidth consumption, request count, CDN hit ratio, etc.

| Direction | Type |
| --- | --- |
| Request | [`ImageUsageAnalyticRetrieveParams`](./src/resources/image-usage-analytics.ts) |
| Response | [`ImageUsageAnalyticRetrieveResponse`](./src/resources/image-usage-analytics.ts) |

```ts
const imageUsageAnalytic = await client.imageUsageAnalytics.retrieve({
  metrics: ['bandwidth_consumption'],
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  group_by: 'daily',
});
```

## `LiveStreamAssets`

Create, control, and monitor live stream assets.

### Create Live Asset

A live asset refers to media content/video that is live-streamed through Gumlet. This endpoint creates a live streaming asset allowing users to live stream a video that will be pushed to Gumlet.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamAssetCreateParams`](./src/resources/live-stream-assets.ts) |
| Response | [`LiveStreamAssetCreateResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.create({
  live_source_id: '',
  resolution: '',
});
```

### Update Live Asset

A live asset refers to media content/video that is live-streamed through Gumlet. This endpoint allows users to update a live streaming asset.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamAssetUpdateParams`](./src/resources/live-stream-assets.ts) |
| Response | [`LiveStreamAssetUpdateResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.update({
  live_asset_id: '',
});
```

### Get Live Asset Status

This endpoint retrieves the details of a live video asset that has previously been created.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamAssetRetrieveStatusResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.retrieveStatus('liveAssetId');
```

### Delete Live Asset

This endpoint removes a live asset given its unique live asset id. The live asset will be removed from storage as well, associated URLs will be inaccessible.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamAssetDeleteResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.delete('liveAssetId');
```

### Complete Live Stream

This endpoint allows marking live assets complete. Once the live asset is marked complete, it can no longer be used to ingest the live stream on Gumlet.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamAssetCompleteResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.complete('liveAssetId');
```

### Filter Live Assets

This endpoint lists live assets on the basis of `status` for the given `live_source_id`.

Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamAssetFilterParams`](./src/resources/live-stream-assets.ts) |
| Response | [`LiveStreamAssetFilterResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.filter('liveSourceId', {
  page_number: 1,
  page_size: 20,
});
```

### `start`

Start a live stream.

```ts
await client.liveStreamAssets.start('liveAssetId');
```

### Upload Live Thumbnails

Generate presigned upload URLs for live stream thumbnails. Supported thumbnail states are `preparing`, `disconnected`, and `end`.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamAssetUploadParams`](./src/resources/live-stream-assets.ts) |
| Response | [`LiveStreamAssetUploadResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.upload({
  live_asset_id: '68c406b147f9ad0c0d584ce2',
  statuses: ['preparing', 'disconnected'],
});
```

### Get Live Asset Status History

This endpoint retrieves the history of a live video asset that has previously been created.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamAssetStatusHistoryResponse`](./src/resources/live-stream-assets.ts) |

```ts
const liveStreamAsset = await client.liveStreamAssets.statusHistory('liveAssetId');
```

## `RecycleBin`

Endpoints to list deleted assets and restore them.

### Recover Deleted Asset

Recovers a deleted asset from the recycle bin.

| Direction | Type |
| --- | --- |
| Request | [`RecycleBinRecoverParams`](./src/resources/recycle-bin.ts) |

```ts
await client.recycleBin.recover({
  asset_id: '',
});
```

### List Recycle Bin

List all assets in a recycle bin for a given workspace. The deleted assets are available for 30 days. After that, assets are permanently deleted.

Pagination uses `page_number` / `page_size` only (no `next_page_token`).

| Direction | Type |
| --- | --- |
| Request | [`RecycleBinListParams`](./src/resources/recycle-bin.ts) |
| Response | [`RecycleBinListResponse`](./src/resources/recycle-bin.ts) |

```ts
const recycleBin = await client.recycleBin.list({
  workspace_id: 'workspaceId',
  page_number: 1,
  page_size: 20,
});
```

## `VideoWorkspaces`

Create and manage video workspaces.

### List Workspaces

This endpoint list video workspace which are assigned to the user or token.

Pagination uses `page_number` / `page_size` (max page size 200). Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`VideoWorkspaceListParams`](./src/resources/video-workspaces.ts) |
| Response | [`VideoWorkspaceListResponse`](./src/resources/video-workspaces.ts) |

```ts
const videoWorkspace = await client.videoWorkspaces.list({
  page_number: 1,
  page_size: 20,
});
```

### Create Workspace

Video workspaces are top-level entities in Gumlet. You can use them to organize videos for different teams/departments or use cases.

| Direction | Type |
| --- | --- |
| Request | [`VideoWorkspaceCreateParams`](./src/resources/video-workspaces.ts) |
| Response | [`VideoWorkspaceCreateResponse`](./src/resources/video-workspaces.ts) |

```ts
const videoWorkspace = await client.videoWorkspaces.create({ name: 'My Workspace', type: 'direct-upload' });
```

### Update Workspace

This endpoint allows users to update video workspace that has previously been created.

| Direction | Type |
| --- | --- |
| Request | [`VideoWorkspaceUpdateParams`](./src/resources/video-workspaces.ts) |
| Response | [`VideoWorkspaceUpdateResponse`](./src/resources/video-workspaces.ts) |

```ts
const videoWorkspace = await client.videoWorkspaces.update('workspaceId');
```

### Get Workspace

This endpoint get all the data of video workspace that has previously been created.

| Direction | Type |
| --- | --- |
| Response | [`VideoWorkspaceRetrieveResponse`](./src/resources/video-workspaces.ts) |

```ts
const videoWorkspace = await client.videoWorkspaces.retrieve('workspaceId');
```

### Delete Workspace

This endpoint removes a video workspace given its unique asset id. All the asset in workspace will be removed from storage as well, associated URLs will be inaccessible.

| Direction | Type |
| --- | --- |
| Response | [`VideoWorkspaceDeleteResponse`](./src/resources/video-workspaces.ts) |

```ts
const videoWorkspace = await client.videoWorkspaces.delete('workspaceId');
```

## `Folders`

Organize video assets into folders within a workspace.

### Create Folder

Create a folder inside a video workspace. Optionally provide `parent_id` to create a nested folder.

| Direction | Type |
| --- | --- |
| Request | [`FolderCreateParams`](./src/resources/folders.ts) |
| Response | [`FolderCreateResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.create('workspaceId', { name: 'Course Assets', parent_id: null });
```

### List Folders

List folders for a video workspace. Use `parent_id` to list only folders inside a specific parent folder.

| Direction | Type |
| --- | --- |
| Request | [`FolderListParams`](./src/resources/folders.ts) |
| Response | [`FolderListResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.list('workspaceId');
```

### Get Folder

Get a single folder by id.

| Direction | Type |
| --- | --- |
| Request | [`FolderRetrieveParams`](./src/resources/folders.ts) |
| Response | [`FolderRetrieveResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.retrieve('folderId', {
  workspace_id: 'workspaceId',
});
```

### Update Folder

Rename a folder, move it to another parent folder, or move assets into the folder by sending `asset_ids`.

| Direction | Type |
| --- | --- |
| Request | [`FolderUpdateParams`](./src/resources/folders.ts) |
| Response | [`FolderUpdateResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.update('folderId', {
  workspace_id: 'workspaceId',
});
```

### Delete Folder

Delete a folder. Descendant folders and assets inside them are deleted by the backend workflow.

| Direction | Type |
| --- | --- |
| Request | [`FolderDeleteParams`](./src/resources/folders.ts) |
| Response | [`FolderDeleteResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.delete('folderId', {
  workspace_id: 'workspaceId',
});
```

### Remove Assets From Folder

Remove one or more assets from their current folder assignment inside the workspace.

| Direction | Type |
| --- | --- |
| Request | [`FolderRemoveAssetsParams`](./src/resources/folders.ts) |
| Response | [`FolderRemoveAssetsResponse`](./src/resources/folders.ts) |

```ts
const folder = await client.folders.removeAssets('workspaceId', {
  asset_ids: ['67e4f2b4403562dbea654301', '67e4f2bb403562dbea654302'],
});
```

## `ChannelViewers`

Invite and remove viewers on a private video channel.

### Invite Channel Viewers

Invite one or more viewers to a members-only channel.

| Direction | Type |
| --- | --- |
| Request | [`ChannelViewerInviteParams`](./src/resources/channel-viewers.ts) |
| Response | [`ChannelViewerInviteResponse`](./src/resources/channel-viewers.ts) |

```ts
const channelViewer = await client.channelViewers.invite('videoWorkspaceId', {
  users: [
    { email: 'test@gumlet.com', name: 'Test User-0' },
    { email: 'test+1@gumlet.com', name: 'Test User-1' },
    { email: 'test+2@gumlet.com', name: 'Test User-2' },
  ],
});
```

### Remove Channel Viewers

Remove one or more viewers from a channel by email address.

| Direction | Type |
| --- | --- |
| Request | [`ChannelViewerRemoveParams`](./src/resources/channel-viewers.ts) |
| Response | [`ChannelViewerRemoveResponse`](./src/resources/channel-viewers.ts) |

```ts
const channelViewer = await client.channelViewers.remove('videoWorkspaceId', {
  emails: ['test@gumlet.com', 'test+2@gumlet.com'],
});
```

### Invite Channel Viewers via CSV

Invite viewers to a channel by uploading a CSV file.

| Direction | Type |
| --- | --- |
| Request | [`ChannelViewerInviteCsvParams`](./src/resources/channel-viewers.ts) |
| Response | [`ChannelViewerInviteCsvResponse`](./src/resources/channel-viewers.ts) |

```ts
const channelViewer = await client.channelViewers.inviteCsv('videoWorkspaceId', {
  viewers_csv: 'viewers.csv',
});
```

### List Subscribers

List all channel subscribers.

Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination.

| Direction | Type |
| --- | --- |
| Request | [`ChannelViewerListSubscribersParams`](./src/resources/channel-viewers.ts) |
| Response | [`ChannelViewerListSubscribersResponse`](./src/resources/channel-viewers.ts) |

```ts
const channelViewer = await client.channelViewers.listSubscribers('workspaceId', {
  page_number: 1,
  page_size: 20,
});
```

## `VideoAnalytics`

Query aggregated and chart-ready video analytics data.

### Viewer Analytics

This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.

| Direction | Type |
| --- | --- |
| Request | [`VideoAnalyticViewerDataParams`](./src/resources/video-analytics.ts) |
| Response | [`VideoAnalyticViewerDataResponse`](./src/resources/video-analytics.ts) |

```ts
const videoAnalytic = await client.videoAnalytics.viewerData({
  metrics: ['views'],
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  group_by: 'daily',
});
```

### Breakdown Data

Read viewer metrics for one workspace, grouped by a breakdown field, for a date range of at most 60 days. This does not change assets or delivery.

| Direction | Type |
| --- | --- |
| Request | [`VideoAnalyticBreakdownDataParams`](./src/resources/video-analytics.ts) |
| Response | [`VideoAnalyticBreakdownDataResponse`](./src/resources/video-analytics.ts) |

```ts
const videoAnalytic = await client.videoAnalytics.breakdownData({
  date_range: { start_at: '2026-07-20', end_at: '2026-08-20' },
  filters: [],
  breakdowns: [
    { name: 'custom_video_id', metric: 'views', page: 1, page_size: 10 },
    { name: 'custom_video_title', metric: 'completion_percent_by_views', page: 1, page_size: 10 },
  ],
  workspace_id: '6694c405e63913eecf3cf5fb',
});
```

### Aggregated Data

This endpoint retrieves aggregated data of the given metrics.

| Direction | Type |
| --- | --- |
| Request | [`VideoAnalyticAggregatedDataParams`](./src/resources/video-analytics.ts) |
| Response | [`VideoAnalyticAggregatedDataResponse`](./src/resources/video-analytics.ts) |

```ts
const videoAnalytic = await client.videoAnalytics.aggregatedData({
  aggregate: [
    {
      metric: 'views',
      function: 'sum',
    },
  ],
  workspace_id: '',
  timeframe: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
});
```

## `OrganizationData`

Endpoints to get organization details.

### Get Organization Details

You can get organization data using this API.

| Direction | Type |
| --- | --- |
| Response | [`OrganizationDataFetchOrgResponse`](./src/resources/organization-data.ts) |

```ts
const organizationData = await client.organizationData.fetchOrg();
```

## `UserData`

Endpoints to get user details.

### Get User

This endpoint gives information about the user account.

| Direction | Type |
| --- | --- |
| Response | [`UserDataFetchResponse`](./src/resources/user-data.ts) |

```ts
const userData = await client.userData.fetch();
```

## `AuditLogs`

Get detailed user activity logs for the entire organisation.

### Fetch Audit Logs

Get audit logs for the user activity in your organisation. Please note that this endpoint can only be accessed by `owner` and `admin` role users.

| Direction | Type |
| --- | --- |
| Request | [`AuditLogFetchParams`](./src/resources/audit-logs.ts) |
| Response | [`AuditLogFetchResponse`](./src/resources/audit-logs.ts) |

```ts
const auditLog = await client.auditLogs.fetch({
  date_range: { start_at: '2026-08-25', end_at: '2026-08-29' },
});
```

## `Billing`

Get / change all details about billing and invoices.

### List Invoices

List all invoices that are generated so far.

| Direction | Type |
| --- | --- |
| Request | [`BillingListInvoicesParams`](./src/resources/billing.ts) |
| Response | [`BillingListInvoicesResponse`](./src/resources/billing.ts) |

```ts
const billing = await client.billing.listInvoices({
  page_size: 20,
});
```

### Get Billing Details

Get billing details for this organization.

| Direction | Type |
| --- | --- |
| Response | [`BillingFetchDetailsResponse`](./src/resources/billing.ts) |

```ts
const billing = await client.billing.fetchDetails();
```

### Update Billing Details

Update billing details

| Direction | Type |
| --- | --- |
| Request | [`BillingUpdateDetailsParams`](./src/resources/billing.ts) |
| Response | [`BillingUpdateDetailsResponse`](./src/resources/billing.ts) |

```ts
const billing = await client.billing.updateDetails({
  address_line: '',
  city: '',
  company_name: '',
  country_code: '',
  gst_number: '',
  postal: '',
  state_code: '',
});
```

### Upcoming Invoice

Get details about upcoming invoice.

| Direction | Type |
| --- | --- |
| Response | [`BillingFetchUpcomingInvoiceResponse`](./src/resources/billing.ts) |

```ts
const billing = await client.billing.fetchUpcomingInvoice();
```

## `LiveStreamWorkspaces`

Create and manage live stream workspaces.

### List Workspaces

List all live stream workspaces.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamWorkspaceListResponse`](./src/resources/live-stream-workspaces.ts) |

```ts
const liveStreamWorkspace = await client.liveStreamWorkspaces.list();
```

### Create Workspace

Create live stream workspace.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamWorkspaceCreateParams`](./src/resources/live-stream-workspaces.ts) |
| Response | [`LiveStreamWorkspaceCreateResponse`](./src/resources/live-stream-workspaces.ts) |

```ts
const liveStreamWorkspace = await client.liveStreamWorkspaces.create({
  name: '',
});
```

### Update Workspace

Update live stream workspace.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamWorkspaceUpdateParams`](./src/resources/live-stream-workspaces.ts) |
| Response | [`LiveStreamWorkspaceUpdateResponse`](./src/resources/live-stream-workspaces.ts) |

```ts
const liveStreamWorkspace = await client.liveStreamWorkspaces.update('liveWorkspaceId');
```

### Delete Workspace

Delete the live stream workspace.

| Direction | Type |
| --- | --- |
| Response | [`LiveStreamWorkspaceDeleteResponse`](./src/resources/live-stream-workspaces.ts) |

```ts
const liveStreamWorkspace = await client.liveStreamWorkspaces.delete('liveWorkspaceId');
```

## `LiveStreamAnalytics`

Get usage analytics for live streams.

### Usage Analytics

Get usage analytics for your live streams.

| Direction | Type |
| --- | --- |
| Request | [`LiveStreamAnalyticUsageParams`](./src/resources/live-stream-analytics.ts) |
| Response | [`LiveStreamAnalyticUsageResponse`](./src/resources/live-stream-analytics.ts) |

```ts
const liveStreamAnalytic = await client.liveStreamAnalytics.usage({
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  group_by: 'daily',
  metrics: ['bandwidth_consumption'],
});
```

## `GlobalSearch`

Search all video assets / playlists / folders etc across workspaces.

### Global Search

Search all video assets / playlists / folders etc across workspaces.

| Direction | Type |
| --- | --- |
| Request | [`GlobalSearchSearchParams`](./src/resources/global-search.ts) |
| Response | [`GlobalSearchSearchResponse`](./src/resources/global-search.ts) |

```ts
const globalSearch = await client.globalSearch.search({
  search_query: 'searchQuery',
  size: 20,
  assets_offset: 0,
  folders_offset: 0,
  playlists_offset: 0,
  channels_offset: 0,
});
```
