Skip to main content

Share a document

POST 

/api/documents/:id/shares

Gives one person read or write access to the document and returns the share. invitee takes a username (matched case-insensitively against active users) or an email address and is used before email and userId. An email that belongs to an active Collab user creates a user share; any other email creates a guest share with a secret link to /s/{token}. An email or username that matches only an inactive user returns 400 with User is inactive and does not create a guest share. A new share sends an invitation email, and for guests that email is the only place the link appears; a failed email does not fail the call. Sharing again with the same person only updates the permission, sends no email, and still returns 201. Requires owner access; other callers get 403. Unknown users (Unknown user), inactive users, invalid emails, sharing with yourself by username, user id, or email, and sharing with the document's creator, who always owns it, return 400.

Request​

Responses​

Share, whether it was created or an existing share was updated.