---
title: "Update or archive a team memory"
method: PATCH
path: "/v1/teams/{teamId}/memories/{memoryId}"
tags: ["Teams"]
---

# Update or archive a team memory

`PATCH /v1/teams/{teamId}/memories/{memoryId}`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/teams/{teamId}/memories/{memoryId}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `spaces:write`)

Changes a memory's title, body, category, or pin. Send `archived: true` to retire a wrong or stale memory, and `archived: false` to restore it; a restore meets the same title and 200-memory checks as a new save. A memory's Space cannot change.

## Path parameters

- `teamId` string, required
- `memoryId` string, required

## Request body

- object
  - `title` string: Short title. Unique among the team's active memories in the same scope, ignoring case.
  - `body` string: One fact, decision, or preference in one to three sentences, with the reason.
  - `category` 'brand' | 'voice' | 'audience' | 'design' | 'decision' | 'convention' | 'preference' | 'fact': What kind of knowledge the memory holds.
  - `pinned` boolean
  - `archived` boolean: true archives a wrong or stale memory. false restores it.

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `id` string, required
    - `teamId` string, required: Team the memory belongs to.
    - `spaceId` string, nullable, required: The Space the memory is about, or null for the whole team.
    - `category` 'brand' | 'voice' | 'audience' | 'design' | 'decision' | 'convention' | 'preference' | 'fact', required: What kind of knowledge the memory holds.
    - `title` string, required: Short title. Unique among the team's active memories in the same scope, ignoring case.
    - `body` string, required: One fact, decision, or preference in one to three sentences, with the reason.
    - `pinned` boolean, required: Pinned memories come first in every agent-context read.
    - `archivedAt` string, date-time, nullable, required: When the memory was archived, or null while it is active.
    - `createdBy` object, required: Who wrote the memory.
      - `type` 'person' | 'agent' | 'api_key' | 'system', required: person: a signed-in member. agent: an OAuth agent connection.
      - `userId` string, nullable, required: The person, or the person who connected the agent.
      - `connectionId` string, nullable, required: The agent connection (grant) that wrote it, for agent writes.
      - `name` string, nullable, required: Display name: the person, agent, or API key.
    - `updatedBy` object, required: Who wrote the memory.
      - `type` 'person' | 'agent' | 'api_key' | 'system', required: person: a signed-in member. agent: an OAuth agent connection.
      - `userId` string, nullable, required: The person, or the person who connected the agent.
      - `connectionId` string, nullable, required: The agent connection (grant) that wrote it, for agent writes.
      - `name` string, nullable, required: Display name: the person, agent, or API key.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
