Skip to main content
An attachment is a file, such as an image, that you can use inside an article. For fields and response details, see the API reference.

Upload an attachment

This command uploads a file from a public URL or from your computer. Use this when you want an image or document inside an article’s HTML content. It needs the Modify articles permission.
Give exactly one of --url or --file. With --file, the CLI sends the file as base64 and takes the file name and type from the path unless you pass --filename or --content-type.
Sample output (--json)
Paste attachable_html into the --html-content of articles create or articles update. attachable_html is null for files that are not images. A file that is never used in an article is removed automatically.