Overview of process
Using the Files API you will:
- Create an new image file or file attachment
- The API will return JSON with the ID of the file
- 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 imagesAttachmentAsset 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