Skip to main content
POST
Upload knowledge file

Restrictions

Usage

  • The file body is sent as base64 text in the JSON field content_b64 — this is not a multipart upload.
  • Writing an existing rel_path overwrites it; content_type is inferred from the extension when omitted (.mdtext/markdown).
  • Content must decode to valid UTF-8 text; binary payloads are rejected with InvalidParameter.
  • Editing the account-scope pack requires account owner/admin; editing a team pack requires team membership.
  • Every call is recorded in the account audit log.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

File to create or overwrite. The body is base64 text in content_b64, not a multipart upload.

rel_path
string
required

Destination path relative to the pack root; existing files are overwritten.

pack_id
string

Knowledge pack ID; defaults to the caller's account-scope pack.

content_b64
string

Base64-encoded file content; must decode to valid UTF-8 text.

content_type
string

MIME type; inferred from the file extension when omitted.

Response

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

The written file plus any non-blocking warnings.