Skip to main content
PUT
/
api
/
v1
/
knowledge
/
items
/
{path}
Create or Update Knowledge Item
curl --request PUT \
  --url https://www.stardeck.ai/api/v1/knowledge/items/{path} \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>"
}
'
{
  "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"
    }
  }
}
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
string
required
The item path, e.g. docs/api/overview.md. Must be lowercase, use hyphens/underscores, and end with a file extension.
content
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
{
  "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