Knowledge Store

Create or Update Knowledge Item

Create a knowledge item at a path, or replace the content of the item already there

PUT
https://www.stardeck.ai/api/v1/knowledge/items/{path}

Creates a new knowledge item or updates an existing one at the given path. Requires knowledge:write permission on the key's role.

When updating an existing item, a version snapshot is created automatically for audit and rollback purposes.

path
path
string
required

The item path, e.g. docs/api/overview.md. Must be lowercase, use hyphens/underscores, and end with a file extension.

content
body
string
required

The content to store.

Path constraints:

  • Max 255 characters
  • Lowercase alphanumeric, hyphens, underscores, slashes, and dots
  • Must end with a file extension (e.g. .md, .json)
  • Max 5 directory levels

Response

{
  "success": true,
  "data": {
    "item": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "organizationId": "org_2abc123",
      "path": "docs/api/overview.md",
      "content": "# API Overview\n\nUpdated content.",
      "itemType": "text",
      "fileKey": null,
      "fileName": null,
      "contentType": null,
      "fileSize": null,
      "requiredReadPermission": "inherit",
      "requiredWritePermission": "inherit",
      "createdAt": "2026-01-15T10:30:00.000Z",
      "updatedAt": "2026-05-24T14:00:00.000Z"
    }
  }
}
success
boolean
required

Always true for successful responses.

data
object
required
Show data
item
KnowledgeItem
required

The created or updated knowledge item.

Show KnowledgeItem
id
string
required

UUID of the item.

path
string
required

File-like path.

content
string
required

Item content.

itemType
string
required

Either text or file.

createdAt
string
required

ISO 8601 timestamp.

updatedAt
string
required

ISO 8601 timestamp.

Next steps

Delete Knowledge Item

Soft-delete an item at a path

On this page