Skip to content

Upload one Markdown file ​

Interface Description ​

Upload the complete Markdown content for one file marked upload_required.

Endpoint ​

FieldValue
MethodPUT
Path/openapi/v2/knowledge-bases/{knowledgeBaseId}/upload-sessions/{uploadSessionId}/entries/{entryId}/content
Operation IDuploadSessionEntryContent
AuthenticationBearer OpenAPI key

Parameters ​

NameLocationRequiredTypeExampleDescription
knowledgeBaseIdpathYesstringknowledge-base-11111111-1111-4111-8111-111111111111Knowledge-base identifier returned by knowledge-base APIs.
uploadSessionIdpathYesstringupload-11111111-1111-4111-8111-111111111111Upload session identifier returned by createUploadSession.
entryIdpathYesstringupload-entry-11111111-1111-4111-8111-111111111111Upload 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.

FieldRequiredTypeDescription
entryYesobjectUpload 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 StatusError CodeExplanation
401UNAUTHORIZEDThe Bearer API key is missing, malformed, unknown, revoked, or deleted.
404NOT_FOUNDThe requested resource was not found.
409CONFLICTThe request conflicts with the resource's current state.
413PAYLOAD_TOO_LARGEThe request body or requested file exceeds the size limit for this operation.
422VALIDATION_ERRORThe request failed validation.
429RATE_LIMITEDThe request exceeded the configured rate limits.
500INTERNAL_ERRORThe API encountered an internal error.
503DATABASE_REPOSITORY_UNAVAILABLEThe data required by this operation is temporarily unavailable.

Next Steps ​