Upload Document
Uploads a file and creates a document from it in a single request. If employee_id is set the document belongs to the employee, otherwise to the organization. The document title is taken from the file name without the extension and can be changed via PUT /api/v1/documents/{document_id}. Folder type=organization: requires settings_document_folders=edit OR access granted by the folder edit rules. Folder type=employee: requires employee_folder_permissions=edit.
HttpBearerAuthAuthorizationBearer <JWT>multipart/form-data- body
folder_id*Folder Idfile*Fileemployee_id?integer|nullSuccessful Response
application/json- response
id*Idtitle*Titleemployee_id*integer|nulluploaded_by_employee_id*Uploaded By Employee Idfolder*file*datetime_created_at*Datetime Created Atdatetime_updated_at*Datetime Updated Atcurl -X POST 'https://api.skailer.com/api/v1/documents/upload' \ -F 'folder_id=0' \ -F 'file=string'{ "id": 0, "title": "string", "employee_id": 0, "uploaded_by_employee_id": 0, "folder": { "id": 0, "title": "string", "type": "employee" }, "file": { "name": "string", "file_type": "string", "size": 0, "mime_type": "string", "uuid": "string", "url": "string" }, "datetime_created_at": "string", "datetime_updated_at": "string"}Search Documents POST
Exactly one of `folder_id` (a single folder) or `folder_type` (all accessible folders of the type) must be set. Folder `type=organization`: requires `settings_document_folders=edit` OR access granted by the folder view/edit rules. Folder `type=employee`: requires `employee_folder_permissions=view`, and `folder_type=employee` requires `settings_document_folders=edit`.
Get Document By Id GET
Folder `type=organization`: requires `settings_document_folders=edit` OR access granted by the folder view/edit rules. Folder `type=employee`: requires `employee_folder_permissions=view`.
