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

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

const response = await client.teamMemory.importTeamMemory({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "key": "<string>",
      "scope": "<string>",
      "title": "<string>",
      "description": "<string>",
      "content": "<string>",
      "pinned": true,
      "sourceRef": "<string>",
      "confidence": 123,
      "runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "verified": true,
      "current": true,
      "embedded": true,
      "createdAt": "<string>"
    }
  ],
  "created": 123,
  "superseded": 123,
  "skipped": 123
}

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
markdown
string
required

A markdown list, one memory per item ("- " or "* " or "1. "). "Title: body" or "Title body" sets an explicit title; otherwise the start of the item is used. Indented lines continue the item above. At most 200 items.

Required string length: 1 - 800000
kind
enum<string>

The kind every imported memory gets (default company_fact). user_preference imports belong to the caller.

Available options:
company_fact,
user_preference,
observation,
rule

Response

ImportTeamMemoryResponse

data
object[]
required

The entries this import appended.

created
integer
required

Items appended under a new key.

superseded
integer
required

Items appended over an existing key with different content (the old entry is superseded).

skipped
integer
required

Items whose key already holds the same content, so nothing was written.