Skip to main content
POST
Attach a document to one of the hub's notes

Authorizations

Authorization
string
header
required

Your API token (af_…) as the Basic-auth username, with an empty password.

Path Parameters

hubId
string
required

24-character hex id of the knowledge hub (from GET /business/knowledge-hubs).

Body

application/json
noteId
string
required

24-character hex id of the note to attach the document to; a note holds at most one attachment.

fileBase64
string
required

Accepted values: standard base64 with padding — alphabet A-Z a-z 0-9 + / and a length that is a multiple of 4. A URL-safe (-_) string, an unpadded one, or one that still carries a data:...;base64, prefix answers 422 VALIDATION_FAILED. The whole JSON request body is capped at 10 MB, which puts the real ceiling at roughly 7.5 MB of file data (base64 is a third larger than the file it encodes). The bytes are stored and handed back by the download endpoint unchanged: nothing reads, extracts or indexes them, so an attachment on its own adds no knowledge to the hub — only the note's text does.

Maximum string length: 10485760
filename
string
required

File name stored with the attachment and returned by the download endpoint (1-255 characters). Free text: it is stored verbatim, never parsed, and never checked against contentType or against the note's own filename label — an extension that contradicts contentType is accepted and changes nothing. Give it the real extension anyway, since it is the name whoever opens the download sees.

Required string length: 1 - 255
contentType
enum<string>
required

MIME type of the file: PDF, plain text, CSV, Word (.doc or .docx) or RTF.

Available options:
application/pdf,
text/plain,
text/csv,
application/msword,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
application/rtf

Response

Success

attachment
object
required