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

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

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

sourceId
string
required

Content source id (UUID), as returned by the create source and list sources endpoints.

Body

application/json
title
string | null

New display title; null or an empty string clears it. Omit to leave it unchanged.

Example:

"Smart Cub blog: Kent test practice papers"

url
string

New URL for a URL-backed source (article, youtube, tiktok, or a by-URL audio/pdf). A changed URL resets the source to pending and re-runs extraction, which debits credits like createSource. Rejected while the source is still ingesting.

Example:

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

text
string

New body for a text source. Stored verbatim and becomes its extracted text; free.

customInstructions
string | null

New extraction guidance; null or an empty string clears it. Applies to the next extraction.

saved
boolean

Keep the source permanently (true) or leave it as a retention candidate (false).

Response

Success

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

How many posts have been created from this source (derived from post-from-source provenance, never a stored counter). List with sortBy=usedCount&sortOrder=asc to claim the least-used source first and keep content ideas fresh.

Example:

0

lastUsedAt
string | null
required

When a post was last created from this source (ISO timestamp); null when the source has never been used.

createdAt
string
required
updatedAt
string
required