GET
/
v1
/
teams
/
{teamId}
/
assets
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.assets.listAssets({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  query: {},
})
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "originalFilename": "<string>",
      "fileSize": 123,
      "mimeType": "<string>",
      "assetTypeData": {
        "type": "image",
        "width": 123,
        "height": 123,
        "format": "<string>",
        "colorSpace": "<string>",
        "aspectRatio": "<string>"
      },
      "storagePath": "<string>",
      "thumbnailPath": "<string>",
      "aiTitle": "<string>",
      "aiDescription": "<string>",
      "aiTags": [
        "<string>"
      ],
      "contentHash": "<string>",
      "processingError": "<string>",
      "isDeleted": true,
      "deletedAt": "<string>",
      "hardDeletedAt": "<string>",
      "sharedWithOrg": true,
      "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "folderName": "<string>",
      "displayName": "<string>",
      "aspectRatio": "<string>",
      "isProcessing": true,
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

Query Parameters

cursor
string

Opaque pagination cursor from the previous page response (nextCursor/prevCursor); omit to start at the first page.

limit
string
default:25

Page size as a positive integer string; defaults to 25, capped at 100.

Examples:

"25"

"100"

sortBy
string

Field to sort by; each endpoint accepts its own allowlist and defaults to createdAt.

Example:

"createdAt"

sortOrder
enum<string>
default:desc

Sort direction: asc or desc; defaults to desc.

Available options:
asc,
desc
filter[assetType]
enum<string>

Restrict results to one media type (e.g. image or video).

Available options:
image,
video,
audio,
gif,
document
filter[assetCategory]
enum<string>

Restrict results to one AI-assigned asset category.

Available options:
user_upload,
render,
template,
green_screen_template,
sound_effect,
music,
brand_asset,
ai_image,
ai_video,
other
filter[folderId]
string

Restrict results to one folder by uuid, or the literal "root" for assets outside any folder.

Pattern: ^(root|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example:

"root"

filter[folderKind]
enum<string>

Set to "chat_uploads" to list ONLY the per-team chat-uploads folder; absent excludes it (the default Media Library view).

Available options:
chat_uploads

Response

Success

data
object[]
required
total
number
required
nextCursor
string | null
required
prevCursor
string | null
required