Invitations

Invitations are placeholders for rolemap objects. You cannot create a rolemap directly because, sometimes, user approval is required. Invitations are sent to users via email and, once accepted, create a rolemap on the object they were invited to with the requested role.

get
Create an Invitation

https://ws-api.onehub.com/:item/:id/invitations
Create an invitation to the :item (Workspace, folder, or file) specified via :id.
Request
Response
Path Parameters
:item
required
string
The type of item. Can either be a workspaces, folders, or files.
:id
required
integer
The unique identifier of the item you would like to create an invitation to.
Body Parameters
emails
required
string
The email addresses you would like to invite to the item. Multiple email addresses should be comma delimited in a single string.
role_name
optional
string
The effective role granted to the user(s).
201: Created
Returns a share object and a 201 if the call succeeds.
{
"share": {
"emails": "",
"email_errors": [],
"join_errors": [],
"invited_emails": [
{ "first-user@example.com": 5967 },
{ "second-user@example.com": 5977 }
],
"errors": {}
}
}
422: Unprocessable Entity
Returns a 422 with an error in the message body if an invalid email is provided or if a limit is reached.
//

If a role_name is not provided, or is invalid, the default role will be used.