POST
/
v1
/
teams
/
{teamId}
/
team-memory
/
relations
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.teamMemory.relateTeamMemoryEntries({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fromEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "toEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "note": "<string>",
  "runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "<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
fromEntryId
string<uuid>
required

The entry the relation starts from.

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}$
toEntryId
string<uuid>
required

The entry the relation points at.

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}$
relation
enum<string>
required

supersedes (newer version of the same key), replaces (other knowledge takes its place), refines (adds detail; both stay current), contradicts (conflict; both stay current and are flagged) or retracts (no longer true).

Available options:
supersedes,
replaces,
refines,
contradicts,
retracts
note
string

Why, in 1-500 characters. Recorded in the change log.

Required string length: 1 - 500

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}$
fromEntryId
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}$
toEntryId
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}$
relation
enum<string>
required

supersedes (newer version of the same key), replaces (other knowledge takes its place), refines (adds detail; both stay current), contradicts (conflict; both stay current and are flagged) or retracts (no longer true).

Available options:
supersedes,
replaces,
refines,
contradicts,
retracts
note
string | null
required

Why the relation was recorded; null when not stated.

origin
enum<string>
required
Available options:
human,
agent,
dream_loop
runId
string<uuid> | null
required

The agent run that recorded the relation; null for direct writes.

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}$
actorUserId
string<uuid> | null
required

The user who recorded the relation, or whose run did.

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}$
createdAt
string
required