Add a Media File

POST https://restapi.actonsoftware.com/api/1/media

This endpoint allows you to add a media file to the account.

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
Authorization: Header false Required String Insert your generated access token.
("Bearer {access token}")
name Form False Optional String Specify a name for the file.
File Form False Required File Attach the media file.
foldername Form False Optional String Specify the folder name you would like the media file added.

Parameter Notes

Name

The name may not contains any slashes.

File

Valid media types: zip, doc, docx, xls, xlsx, ppt, pptx. pps, ppsx, txt, vcs, ics, dwg, rfa.

Response

{
  "status": "success",
  "message": "The file has been uploaded",
  "id": "f-3447f050-3f26-4237-b1c1-9bd2fe62e29e"
}

 

Code Examples

curl -X POST https://restapi.actonsoftware.com/api/1/media -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F file=@/Users/john.doe/Downloads/pdf.pdf