ScreenSteps

Creating images or file attachments via the Public API

Updated on

Overview of process

Using the Files API you will:

  1. Create an new image file or file attachment
  2. The API will return JSON with the ID of the file
  3. You will need to add the file id to the Content JSON for updating an article

URL

POST /api/v2/sites/:site_id/files
Click to copy

Body

{
  type: 'ImageAsset'
}
Click to copy

The file you are attaching should be submitted in the file query parameter.

Key Value
type ImageAsset for images
AttachmentAsset for file attachments
file file attachment (base 64 encoded)

Supported formats

Images

  • image/jpeg
  • image/gif
  • image/png

Max size: 8MB

File Attachments

Support all file types.

Max size: 20MB

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Still Need Help? Contact Us