Insert a file to the "My documents" section
POST /api/2.0/files/@my/insert
Request
Inserts a file specified in the request to the "My documents" section by single file uploading.
Authorization
An API key is a token that you provide when making API calls. Include the token in a cookie parameter called asc_auth_key
.
Example: asc_auth_key=864FE52C-1C1C-469F-9308-51DAFEFE7436
.
Headers
- Accept
enum of string
Can be one of:
application/json
,text/json
,text/plain
.- Content-Type
enum of string
Can be one of:
multipart/form-data
.
Body
- File
string
binary File
- Title
string
File name
- CreateNewIfExist
boolean
Specifies whether to create a new file if it already exists or not
- KeepConvertStatus
boolean
Specifies whether to keep the file converting status or not
- Stream.CanRead
boolean
- Stream.CanWrite
boolean
- Stream.CanSeek
boolean
- Stream.CanTimeout
boolean
- Stream.Length
integer
int64 - Stream.Position
integer
int64 - Stream.ReadTimeout
integer
int32 - Stream.WriteTimeout
integer
int32
Examples
POST /api/2.0/files/@my/insert HTTP/1.1
Accept: application/json
Content-Length: 1083
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
-----011000010111000001101001
Content-Disposition: form-data; name="Title"
curl --request POST \
--url https://example.com/api/2.0/files/@my/insert \
--header 'Accept: application/json' \
--header 'Content-Type: multipart/form-data' \
--form Title=right_sized \
--form CreateNewIfExist=true \
--form KeepConvertStatus=true \
--form Stream.CanRead=true \
--form Stream.CanWrite=true \
--form Stream.CanSeek=true \
--form Stream.CanTimeout=true \
--form Stream.Length=1234 \
--form Stream.Position=1234 \
--form Stream.ReadTimeout=1234 \
--form Stream.WriteTimeout=1234
Responses
200
Inserted file
- title
string
Title
- access
one of
- .
enum of string
[None - None, ReadWrite - Read and write, Read - Read, Restrict - Restrict, Varies - Varies, Review - Review, Comment - Comment, FillForms - Fill forms, CustomFilter - Custom filter, RoomManager - Room manager, Editing - Editing, ContentCreator - Content creator]
Can be one of:
None
,ReadWrite
,Read
,Restrict
,Varies
,Review
,Comment
,FillForms
,CustomFilter
,RoomManager
,Editing
,ContentCreator
.- .
enum of integer
[0 - None, 1 - Read and write, 2 - Read, 3 - Restrict, 4 - Varies, 5 - Review, 6 - Comment, 7 - Fill forms, 8 - Custom filter, 9 - Room manager, 10 - Editing, 11 - Content creator]
Can be one of:
0
,1
,2
,3
,4
,5
,6
,7
,8
,9
,10
,11
.
- shared
boolean
Specifies if the file is shared or not
- created
object
- utcTime
string
date-time UtcTime
- timeZoneOffset
string
date-span TimeZoneOffset
- createdBy
object
- id
string
uuid ID
- displayName
string
Display name
- title
string
Title
- avatar
string
Avatar
- avatarOriginal
string
Original size avatar
- avatarMax
string
Maximum size avatar
- avatarMedium
string
Medium size avatar
- avatarSmall
string
Small avatar
- profileUrl
string
Profile URL
- hasAvatar
boolean
Specifies if the user has an avatar or not
- isAnonim
boolean
Specifies if the user is an anonim or not
- updated
object
- utcTime
string
date-time UtcTime
- timeZoneOffset
string
date-span TimeZoneOffset
- autoDelete
object
- utcTime
string
date-time UtcTime
- timeZoneOffset
string
date-span TimeZoneOffset
- rootFolderType
one of
- .
enum of string
[DEFAULT - Default, COMMON - Coomon, BUNCH - Bunch, TRASH - Trash, USER - User, SHARE - Share, Projects - Projects, Favorites - Favourites, Recent - Recent, Templates - Templates, Privacy - Privacy, VirtualRooms - Virtual rooms, FillingFormsRoom - Filling forms room, EditingRoom - Editing room, CustomRoom - Custom room, Archive - Archive, ThirdpartyBackup - Thirdparty backup, PublicRoom - Public room, ReadyFormFolder - Ready form folder, InProcessFormFolder - In process form folder, FormFillingFolderDone - Form filling folder done, FormFillingFolderInProgress - Form filling folder in progress, VirtualDataRoom - Virtual Data Room]
Can be one of:
DEFAULT
,COMMON
,BUNCH
,TRASH
,USER
,SHARE
,Projects
,Favorites
,Recent
,Templates
,Privacy
,VirtualRooms
,FillingFormsRoom
,EditingRoom
,CustomRoom
,Archive
,ThirdpartyBackup
,PublicRoom
,ReadyFormFolder
,InProcessFormFolder
,FormFillingFolderDone
,FormFillingFolderInProgress
,VirtualDataRoom
.- .
enum of integer
[0 - Default, 1 - Coomon, 2 - Bunch, 3 - Trash, 5 - User, 6 - Share, 8 - Projects, 10 - Favourites, 11 - Recent, 12 - Templates, 13 - Privacy, 14 - Virtual rooms, 15 - Filling forms room, 16 - Editing room, 19 - Custom room, 20 - Archive, 21 - Thirdparty backup, 22 - Public room, 25 - Ready form folder, 26 - In process form folder, 27 - Form filling folder done, 28 - Form filling folder in progress, 29 - Virtual Data Room]
Can be one of:
0
,1
,2
,3
,5
,6
,8
,10
,11
,12
,13
,14
,15
,16
,19
,20
,21
,22
,25
,26
,27
,28
,29
.
- parentRoomType
one of
- .
enum of string
[DEFAULT - Default, COMMON - Coomon, BUNCH - Bunch, TRASH - Trash, USER - User, SHARE - Share, Projects - Projects, Favorites - Favourites, Recent - Recent, Templates - Templates, Privacy - Privacy, VirtualRooms - Virtual rooms, FillingFormsRoom - Filling forms room, EditingRoom - Editing room, CustomRoom - Custom room, Archive - Archive, ThirdpartyBackup - Thirdparty backup, PublicRoom - Public room, ReadyFormFolder - Ready form folder, InProcessFormFolder - In process form folder, FormFillingFolderDone - Form filling folder done, FormFillingFolderInProgress - Form filling folder in progress, VirtualDataRoom - Virtual Data Room]
Can be one of:
DEFAULT
,COMMON
,BUNCH
,TRASH
,USER
,SHARE
,Projects
,Favorites
,Recent
,Templates
,Privacy
,VirtualRooms
,FillingFormsRoom
,EditingRoom
,CustomRoom
,Archive
,ThirdpartyBackup
,PublicRoom
,ReadyFormFolder
,InProcessFormFolder
,FormFillingFolderDone
,FormFillingFolderInProgress
,VirtualDataRoom
.- .
enum of integer
[0 - Default, 1 - Coomon, 2 - Bunch, 3 - Trash, 5 - User, 6 - Share, 8 - Projects, 10 - Favourites, 11 - Recent, 12 - Templates, 13 - Privacy, 14 - Virtual rooms, 15 - Filling forms room, 16 - Editing room, 19 - Custom room, 20 - Archive, 21 - Thirdparty backup, 22 - Public room, 25 - Ready form folder, 26 - In process form folder, 27 - Form filling folder done, 28 - Form filling folder in progress, 29 - Virtual Data Room]
Can be one of:
0
,1
,2
,3
,5
,6
,8
,10
,11
,12
,13
,14
,15
,16
,19
,20
,21
,22
,25
,26
,27
,28
,29
.
- updatedBy
object
- id
string
uuid ID
- displayName
string
Display name
- title
string
Title
- avatar
string
Avatar
- avatarOriginal
string
Original size avatar
- avatarMax
string
Maximum size avatar
- avatarMedium
string
Medium size avatar
- avatarSmall
string
Small avatar
- profileUrl
string
Profile URL
- hasAvatar
boolean
Specifies if the user has an avatar or not
- isAnonim
boolean
Specifies if the user is an anonim or not
- providerItem
boolean
Provider is specified or not
- providerKey
string
Provider key
- providerId
integer
int32 Provider ID
- order
string
Order
- id
integer
int32 Id
- rootFolderId
integer
int32 Root folder id
- originId
integer
int32 Origin id
- originRoomId
integer
int32 Origin room id
- originTitle
string
Origin title
- originRoomTitle
string
Origin room title
- canShare
boolean
Can share
- security
object
Security
- Read
boolean
- Comment
boolean
- FillForms
boolean
- Review
boolean
- Create
boolean
- Edit
boolean
- Delete
boolean
- CustomFilter
boolean
- EditRoom
boolean
- Rename
boolean
- ReadHistory
boolean
- Lock
boolean
- EditHistory
boolean
- CopyTo
boolean
- Copy
boolean
- MoveTo
boolean
- Move
boolean
- Pin
boolean
- Mute
boolean
- EditAccess
boolean
- Duplicate
boolean
- SubmitToFormGallery
boolean
- Download
boolean
- Convert
boolean
- CopySharedLink
boolean
- ReadLinks
boolean
- Reconnect
boolean
- CreateRoomFrom
boolean
- CopyLink
boolean
- Embed
boolean
- ChangeOwner
boolean
- IndexExport
boolean
- requestToken
string
- folderId
integer
int32 Folder ID
- version
integer
int32 Version
- versionGroup
integer
int32 Version group
- contentLength
string
Content length
- pureContentLength
integer
int64 Pure content length
- fileStatus
one of
- .
enum of string
[None - None, IsEditing - Is editing, IsNew - Is new, IsConverting - Is converting, IsOriginal - Is original, IsEditingAlone - Is editing alone, IsFavorite - Is favorite, IsTemplate - Is template, IsFillFormDraft - Is fill form draft]
Can be one of:
None
,IsEditing
,IsNew
,IsConverting
,IsOriginal
,IsEditingAlone
,IsFavorite
,IsTemplate
,IsFillFormDraft
.- .
enum of integer
[0 - None, 1 - Is editing, 2 - Is new, 4 - Is converting, 8 - Is original, 16 - Is editing alone, 32 - Is favorite, 64 - Is template, 128 - Is fill form draft]
Can be one of:
0
,1
,2
,4
,8
,16
,32
,64
,128
.
- mute
boolean
Muted or not
- viewUrl
string
uri URL to view a file
- webUrl
string
uri Web URL
- fileType
one of
- .
enum of string
[Unknown - Unknown, Archive - Archive, Video - Video, Audio - Audio, Image - Image, Spreadsheet - Spreadsheet, Presentation - Presentation, Document - Document, Pdf - Pdf]
Can be one of:
Unknown
,Archive
,Video
,Audio
,Image
,Spreadsheet
,Presentation
,Document
,Pdf
.- .
enum of integer
[0 - Unknown, 1 - Archive, 2 - Video, 3 - Audio, 4 - Image, 5 - Spreadsheet, 6 - Presentation, 7 - Document, 10 - Pdf]
Can be one of:
0
,1
,2
,3
,4
,5
,6
,7
,10
.
- fileExst
string
File extension
- comment
string
Comment
- encrypted
boolean
Encrypted or not
- thumbnailUrl
string
uri Thumbnail URL
- thumbnailStatus
one of
- .
enum of string
[Waiting - Waiting, Created - Created, Error - Error, NotRequired - Not required, Creating - Creating]
Can be one of:
Waiting
,Created
,Error
,NotRequired
,Creating
.- .
enum of integer
[0 - Waiting, 1 - Created, 2 - Error, 3 - Not required, 4 - Creating]
Can be one of:
0
,1
,2
,3
,4
.
- locked
boolean
Locked or not
- lockedBy
string
User ID who locked a file
- hasDraft
boolean
Is there a draft or not
- isForm
boolean
Is there a form or not
- startFilling
boolean
Specifies if the filling has started or not
- inProcessFolderId
integer
int32 InProcess folder ID
- inProcessFolderTitle
string
InProcess folder title
- draftLocation
object
- folderId
integer
int32 InProcess folder ID
- folderTitle
string
InProcess folder title
- fileId
integer
int32 Draft ID
- fileTitle
string
Draft title
- viewAccessibility
object
File accessibility
- ImageView
boolean
- MediaView
boolean
- WebView
boolean
- WebEdit
boolean
- WebReview
boolean
- WebCustomFilterEditing
boolean
- WebRestrictedEditing
boolean
- WebComment
boolean
- CoAuhtoring
boolean
- CanConvert
boolean
- MustConvert
boolean
- availableExternalRights
object
Available external rights
- lastOpened
object
- utcTime
string
date-time UtcTime
- timeZoneOffset
string
date-span TimeZoneOffset
- expired
object
- utcTime
string
date-time UtcTime
- timeZoneOffset
string
date-span TimeZoneOffset
- fileEntryType
enum of integer
int32 Can be one of:
1
,2
.
401
Unauthorized
403
You don't have enough permission to create
404
Folder not found