Upload one Markdown file
Interface Description
Upload the complete Markdown content for one file marked upload_required.
Endpoint
| Field | Value |
|---|---|
| Method | PUT |
| Path | /openapi/v2/knowledge-bases/{knowledgeBaseId}/upload-sessions/{uploadSessionId}/entries/{entryId}/content |
| Operation ID | uploadSessionEntryContent |
| Authentication | Bearer OpenAPI key |
Parameters
| Name | Location | Required | Type | Example | Description |
|---|---|---|---|---|---|
knowledgeBaseId | path | Yes | string | knowledge-base-11111111-1111-4111-8111-111111111111 | Knowledge-base identifier returned by knowledge-base APIs. |
uploadSessionId | path | Yes | string | upload-11111111-1111-4111-8111-111111111111 | Upload session identifier returned by createUploadSession. |
entryId | path | Yes | string | upload-entry-11111111-1111-4111-8111-111111111111 | Upload entry identifier returned by getUploadSession. |
Request Body
text/markdown
Schema type: string
Complete Markdown content for the selected upload entry.
Request Example
bash
curl -X PUT "https://openapi.example.com/openapi/v2/knowledge-bases/knowledge-base-11111111-1111-4111-8111-111111111111/upload-sessions/upload-11111111-1111-4111-8111-111111111111/entries/upload-entry-11111111-1111-4111-8111-111111111111/content" \
-H "Authorization: Bearer <openapi-key>" \
-H "Content-Type: text/markdown" \
--data-binary "# Guide\n\nCurrent onboarding guidance."Successful Responses
200
Upload entry after receiving its Markdown content.
| Field | Required | Type | Description |
|---|---|---|---|
entry | Yes | object | Upload entry returned by the request. |
Success Response Example
json
{
"entry": {
"id": "upload-entry-11111111-1111-4111-8111-111111111111",
"relativePath": "handbook/onboarding/guide.md",
"directoryPath": "handbook/onboarding",
"name": "guide.md",
"declaredSize": 37,
"receivedSize": 37,
"disposition": "upload_required",
"transferState": "uploaded",
"sourceFileId": "source-file-11111111-1111-4111-8111-111111111111",
"existingResourceRevision": null
}
}Error Codes
The table below lists every error response documented for this operation.
| HTTP Status | Error Code | Explanation |
|---|---|---|
| 401 | UNAUTHORIZED | The Bearer API key is missing, malformed, unknown, revoked, or deleted. |
| 404 | NOT_FOUND | The requested resource was not found. |
| 409 | CONFLICT | The request conflicts with the resource's current state. |
| 413 | PAYLOAD_TOO_LARGE | The request body or requested file exceeds the size limit for this operation. |
| 422 | VALIDATION_ERROR | The request failed validation. |
| 429 | RATE_LIMITED | The request exceeded the configured rate limits. |
| 500 | INTERNAL_ERROR | The API encountered an internal error. |
| 503 | DATABASE_REPOSITORY_UNAVAILABLE | The data required by this operation is temporarily unavailable. |