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

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

const response = await client.sources.createSource({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "id": "<string>",
  "teamId": "<string>",
  "title": "<string>",
  "statusError": "<string>",
  "saved": 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.

Body

application/json
sourceType
enum<string>
required

Kind of source to ingest: text, article, youtube, tiktok, audio, pdf, or skill. Determines which of url, text, or storagePath is required.

Available options:
text,
article,
youtube,
tiktok,
audio,
pdf,
skill
Example:

"article"

url
string

Public URL to extract from; required for article, youtube, and tiktok sources.

Example:

"https://example.com/blog/launch-post"

text
string

Raw text content to ingest directly; required for text sources.

storagePath
string

Storage path returned by createSourceUploadUrl after uploading the file; required for audio and pdf sources.

title
string

Display title for the source; derived from the content when omitted.

Example:

"Q3 launch blog post"

customInstructions
string

Optional guidance for the extraction step, e.g. what to focus on or ignore.

Example:

"Focus on the pricing changes; skip the changelog."

saved
boolean

Whether to keep the source permanently (true) or leave it as a retention candidate (default false).

Response

Success

id
string
required
teamId
string
required
sourceType
enum<string>
required
Available options:
text,
article,
youtube,
tiktok,
audio,
pdf,
skill
title
string | null
required
status
enum<string>
required
Available options:
pending,
extracting,
ready,
failed,
skipped_insufficient_credits
statusError
string | null
required
saved
boolean
required
createdAt
string
required
updatedAt
string
required