---
title: "Upload File"
method: POST
path: "/agent-knowledge/files:upload"
tags: ["agent-knowledge"]
---

# Upload File

`POST /agent-knowledge/files:upload`

## Request

- Base URL: `https://api.traversal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.traversal.com/agent-knowledge/files:upload`
- Auth: none declared

## Request body `multipart/form-data`

- BodyUploadFileAgentKnowledgeFilesUploadPost
  - `file_path` string, required
  - `file` string, binary, required
  - `summary` string, nullable
  - `entry_kind` 'generated_summary' | 'generated_detail' | 'user_file' | 'memory' | 'skill'
  - `is_user_visible` boolean

## Response `201`

Successful Response

- CreateAgentKnowledgeFileResponse
  - `id` string, required
  - `filePath` string, required
  - `parentPath` string, required
  - `name` string, required
  - `contentType` string, required
  - `sizeBytes` integer, required
  - `contentSha256` string, required
  - `contentEtag` string, required
  - `s3VersionId` string, required
  - `summary` string, nullable
  - `status` string, required
  - `creator` string, required
  - `entryKind` string, required
  - `categoryLabel` string, required
  - `sourceLabel` string, required
  - `commentCount` integer
  - `isUserGenerated` boolean, required
  - `isUserVisible` boolean, required
  - `createdByUserId` string, nullable
  - `createdBy` AgentKnowledgeActorResponse
    - `userId` string, required
    - `displayName` string, nullable
    - `email` string, nullable
    - `avatarUrl` string, nullable
  - `sourceSessions` AgentKnowledgeSourceSessionResponse[]
    - `sessionId` string, required
    - `sessionTitle` string, nullable
    - `createdAt` string, date-time, nullable
  - `disabledAt` string, date-time, nullable
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `node` AgentKnowledgeFileWindowNodeResponse, required
    - `createdByUserId` string, nullable
    - `createdBy` AgentKnowledgeActorResponse
      - `userId` string, required
      - `displayName` string, nullable
      - `email` string, nullable
      - `avatarUrl` string, nullable
    - `entryKind` 'generated_summary' | 'generated_detail' | 'user_file' | 'memory' | 'skill', required
    - `extension` string, nullable, required
    - `filePath` string, required
    - `id` string, required
    - `isUserVisible` boolean, required
    - `kind` 'file', required
    - `name` string, required
    - `sourceSessions` AgentKnowledgeSourceSessionResponse[]
      - `sessionId` string, required
      - `sessionTitle` string, nullable
      - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, required

## Other responses

- `422`: Validation Error

## Changes

> 66 revisions in range; 9 not diffed.

- **2026-09-10** `47dcc19b4add`: 2 info
  - added the optional property `node/anyOf[subschema #1: AgentKnowledgeFileWindowNodeResponse]/sourceSessions` to the response with the `201` status
  - added the optional property `sourceSessions` to the response with the `201` status
- **2026-08-20** `e0a48df02b41`: 1 info
  - added the required property `node/anyOf[subschema #1: AgentKnowledgeFileWindowNodeResponse]/isUserVisible` to the response with the `201` status

[Operation history](https://skmtc.dev/traversal/apis/traversal-api/changes/agent-knowledge/files:upload/post.md)

---

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