POST
/
v1
/
teams
/
{teamId}
/
sources
/
upload-url
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.sources.createSourceUploadUrl({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "uploadUrl": "<string>",
  "storagePath": "<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.

Body

application/json
contentType
string
required

MIME type of the file to upload; allowlisted per source kind (audio or pdf).

Example:

"application/pdf"

fileName
string
required

Original filename including extension, used to derive the storage path.

Example:

"episode-42.mp3"

fileSize
number
required

File size in bytes; capped at issuance (100 MB for audio, 500 MB for pdf).

Example:

1048576

Response

Success

uploadUrl
string
required
storagePath
string
required