Sharing

Collection can be shared with other users, which are then called collaborators, and this section describes the different commands that are related to sharing.

Collaborators

Every user who shares at least one collection with another user, has a collaborators record in the API response. The record contains a restricted subset of user-specific fields.

Field

Description

_id

User ID of the collaborator

email

Email of the collaborator

Empty when authorized user have read-only access

email_MD5

MD5 hash of collaborator email. Useful for using with Gravatar for example

fullName

Full name of the collaborator

role

Access level:

member have write access and can invite more users

viewer read-only access

post
Share collection

https://api.raindrop.io/rest/v1/collection/{id}/sharing
Share collection with another user(s). As result invitation(s) will be send to specified email(s) with link to join collection.
Request
Response
Request
Path Parameters
id
required
number
Existing collection ID
Body Parameters
role
required
string
Access level. Possible values: member viewer
emails
required
array
The user email(s) with whom to share the project. Maximum 10
Response
200: OK
{
"result": true,
"emails": [
"some@user.com",
"other@user.com"
]
}
400: Bad Request
//'emails' array is empty
{
"result": false,
"errorMessage": "no emails"
}
//'emails' array larger than 10
{
"result": false,
"errorMessage": "you cant send more than 10 invites at once"
}
403: Forbidden
//When user have more than 100 pending invitations:
{
"result": false,
"errorMessage": "you have too many pending invitations, you will be banned if you continue send more"
}
//User doesn't have enought permissions to invite more people
{
"result": false,
"errorMessage": "you dont have permissions to invite more people"
}

get
Get collaborators list of collection

https://api.raindrop.io/rest/v1/collection/{id}/sharing
Request
Response
Request
Path Parameters
id
required
number
Existing collection ID
Response
200: OK
{
"items": [
{
"_id": 373381,
"email": "some@mail.com",
"email_MD5": "e12bda18ca265d3f3e30d247adea2549",
"fullName": "Jakie Future",
"registered": "2019-08-18T17:01:43.664Z",
"role": "viewer"
}
],
"result": true
}

delete
Unshare or leave collection

https://api.raindrop.io/rest/v1/collection/{id}/sharing
There two possible results of calling this method, depends on who authenticated user is: - Owner: collection will be unshared and all collaborators will be removed - Member or viewer: authenticated user will be removed from collaborators list
Request
Response
Request
Path Parameters
id
required
number
Existing collection ID
Response
200: OK
{
"result": true
}

put
Change access level of collaborator

https://api.raindrop.io/rest/v1/collection/{id}/sharing/{userId}
Request
Response
Request
Path Parameters
userId
optional
number
User ID of collaborator
id
required
number
Existing collection ID
Body Parameters
role
required
string
member or viewer
Response
200: OK
{
"result": true
}

delete
Delete a collaborator

https://api.raindrop.io/rest/v1/collection/{id}/sharing/{userId}
Remove an user from shared collection
Request
Response
Request
Path Parameters
userId
optional
number
User ID of collaborator
id
required
number
Existing collection ID
Response
200: OK
{
"result": true
}

post
Accept an invitation

https://api.raindrop.io/rest/v1/collection/{id}/join
Accept an invitation to join a shared collection
Request
Response
Request
Path Parameters
id
required
number
Existing collection ID
Body Parameters
token
required
string
Secret token from email
Response
200: OK
{
"result": true,
"role": "member"
}
403: Forbidden
//Incorrect token
{
"result": false,
"error": "CollaboratorsIncorrectToken",
"errorMessage": "Incorrect or expired token"
}
//Collection no more exists
{
"result": false,
"error": "CollaboratorsNoCollection",
"errorMessage": "Shared collection not found or removed"
}
{
"result": false,
"error": "CollaboratorsAlready",
"errorMessage": "You already owner of this collection"
}