POST
/
v1
/
teams
/
{teamId}
/
uploads
/
{uploadId}
/
confirm
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.assets.confirmUpload({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  uploadId: process.env.OCTOSPARK_UPLOAD_ID ?? "uploadId",
})
{
  "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>"
}

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.

uploadId
string
required

Upload session id returned by the request-upload endpoint; confirm the upload with it after the bytes are PUT to the presigned URL.

Response

Success

id
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[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}$
teamId
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[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}$
originalFilename
string
required
fileSize
number
required
mimeType
string
required
assetType
enum<string>
required
Available options:
image,
video,
audio,
gif,
document
assetCategory
enum<string>
required
Available options:
user_upload,
render,
template,
green_screen_template,
sound_effect,
music,
brand_asset,
ai_image,
ai_video,
other
assetTypeData
object
required
storagePath
string
required
thumbnailPath
string | null
required
aiTitle
string | null
required
aiDescription
string | null
required
aiTags
string[]
required
contentHash
string | null
required
processingStatus
enum<string>
required
Available options:
pending,
processing,
completed,
failed
processingError
string | null
required
isDeleted
boolean
required
deletedAt
string | null
required
hardDeletedAt
string | null
required
sharedWithOrg
boolean
required
folderId
string<uuid> | null
required

a Universally Unique Identifier

Pattern: ^[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}$
folderName
string | null
required
displayName
string
required
aspectRatio
string | null
required
isProcessing
boolean
required
createdAt
string
required
updatedAt
string
required