DocSpace REST API samples
The following examples will show you how to use ONLYOFFICE DocSpace API implemented as REST over HTTP using GET/POST/PUT/DELETE to integrate ONLYOFFICE DocSpace into your own application and interact with its backend.
Basic samples
Add members to a group
Add one or more members to an existing group via the API.
Authenticate a user by code (2FA)
Authenticate a user with a one-time 2FA code via the API.
Authenticate a user
Authenticate a user and verify the received token via the API.
Change file or folder ownership
Transfer file or folder ownership to another user via the API.
Copy or move a file to a folder
Copy or move a file to another folder via the API.
Create and open a new file
Create a new file in a folder and open it in the browser.
Create an API Key
Generate an API key with specific permissions via the API.
Create a backup schedule
Create a daily backup schedule for the portal via the API.
Create a room and invite a user
Create a new room and invite a user to it via the API.
Create a text file
Create a text file with custom content in a folder via the API.
Creating VDR with watermark
Create a virtual data room with a watermark via the API.
Delete an API Key
Delete an existing API key by its unique ID via the API.
Delete the backup history
Delete the entire backup history for the portal via the API.
Delete backup schedule
Delete the current portal backup schedule via the API.
Delete a backup
Delete a specific backup by its ID via the API.
Duplicate files and folders
Duplicate files and folders in place via the API.
Enable custom filter mode for a file
Enable the custom filter mode for a spreadsheet via the API.
Get backup history
Retrieve the list of existing backups via the API.
Get backup progress
Check the progress of an ongoing backup process via the API.
Get backup schedule
Retrieve the current portal backup schedule via the API.
Get current token permissions
Retrieve permissions for the current API token via the API.
Get folder and room contents
Retrieve the contents of a folder or room via the API.
Get a group with members
Retrieve a group and its members by ID via the API.
Get a list of room templates
Retrieve the list of available room templates via the API.
Get login history
Retrieve recent login events and extract unique user IDs.
Get the restoring progress
Check the progress of a portal restoration via the API.
Invite user with welcome message
Invite a user and send a welcome message after activation.
Invite users
Create new users and send them invitations via the API.
List all API Keys
Retrieve all API keys for the current user via the API.
List groups managed by a user
Retrieve groups managed by a specific user via the API.
Lock and unlock a file
Lock or unlock a file and view its access levels via the API.
Manage active portal connections
Manage active user sessions on the portal via the API.
Manage files in "My Documents"
Upload, create, and delete files in My Documents via the API.
Manage files
Create, upload, update, and delete files via the API.
Manage folders
Create, retrieve, rename, and delete folders via the API.
Manage groups
Create, retrieve, update, and delete groups via the API.
Manage a guest user
Approve and manage guest users via the API.
Manage IP restrictions
Retrieve and update IP restriction settings via the API.
Manage login settings
Configure login security settings via the API.
Manage room links
Set and retrieve room invitation and external links via the API.
Manage rooms
Create, retrieve, rename, archive, and delete rooms via the API.
Manage the Trash section
Retrieve, restore, and empty the Trash section via the API.
Manage user photo
Upload and delete user profile photos via the API.
Manage users
Create, retrieve, terminate, and delete user accounts via the API.
Move members between groups
Move all members from one group to another via the API.
Reassigning user content
Reassign all user content to another user via the API.
Remove members from a group
Remove one or more members from a group via the API.
Restore file to previous version
Restore a file to a specific previous version via the API.
Restore portal from a backup
Restore a portal from a specific backup via the API.
Retrieving billing info
Retrieve billing, quota, and payment details via the API.
Retrieve user login audit events
Retrieve and filter user login audit events via the API.
Search users by extended filter
Search users with extended filter parameters via the API.
Search users
Search for users by text query with optional filters via the API.
Search users by status
Search for users by their status via the API.
Set developer tools access
Configure developer tools access settings via the API.
Start a backup manually
Start an on-demand backup of the portal via the API.
Update an API Key
Update the name, permissions, or status of an API key.
Update group manager
Update the manager of a group via the API.
Update user role
Create a user, retrieve their profile, and update their role.
Integration samples
Add DocSpace users to Trello
Retrieve DocSpace users and add them to a Trello board.
Add Notion users to DocSpace
Retrieve Notion users and add them to DocSpace.
Add Trello users to DocSpace
Retrieve Trello board members and add them to DocSpace.
Asana task user invite
Invite an Asana task assignee to DocSpace.
Asana to DocSpace structure
Create DocSpace rooms and folders from Asana projects.
Dropbox share with group
Create shared Dropbox folders for DocSpace group members.
Dropbox share with users
Share Dropbox folders with DocSpace users.
Export DocSpace file to Dropbox
Export a file from DocSpace to Dropbox via presigned URL.
Import Dropbox file to DocSpace
Import a file from Dropbox into a DocSpace room.
Trello attachments import
Import Trello card attachments into a DocSpace room.
Trello board to room
Create a DocSpace room using a Trello board name.