Upload attachment
Upload a file (such as an image, PDF, or document) and get back a link you can use inside an article, so you don’t have to embed the full file directly in the article’s content, which makes articles large and slow to load. For images, the response also includes attachable_html: the image already formatted as ready-to-paste code that you can add straight into the article’s html_content. Any file you upload but never use in an article is removed automatically.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Body
The file to upload (for example an image, PDF, or document). Maximum size 50 MB.
Response
Created - File uploaded successfully
"abcd1234efgh5678ijkl"
"logo.png"
"image/png"
20480
"Y2hlY2tzdW0xMjM0NQ=="
"amazon"
Signed identifier of the uploaded file. You do not pass it directly to the article API; it is embedded as data-blob-id inside attachable_html. To use the file in an article, insert attachable_html (or a blob_url <img> tag) into the article's html_content.
Hosted URL of the uploaded file. Use it as the src of an <img> tag in the article HTML. This URL is stable and does not expire; it stays valid as long as the file is used in an article.
"https://spinkart.neetokb.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMi/logo.png"
Editor-ready image markup for images; null for non-image files. Insert it directly into the article's html_content.