POST
/
workspace-users
curl --request POST \
  --url https://api.dock.so:4000/{version}/workspace-users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "john.doe@example.com",
  "role": "owner",
  "workspaceId": "luI89ZCeEJuF",
  "message": "You have been invited to join the workspace"
}'
{
  "data": {
    "workspaceUser": {
      "id": "RiHO4e0Ju3DS",
      "updatedAt": "2021-01-01T00:00:00.000Z",
      "createdAt": "2021-01-01T00:00:00.000Z",
      "role": "owner",
      "user": {
        "id": "RiHO4e0Ju3DS",
        "updatedAt": "2021-01-01T00:00:00.000Z",
        "createdAt": "2021-01-01T00:00:00.000Z",
        "object": "user",
        "url": "https://api.dock.us/v1/users/RiHO4e0Ju3DS",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": "https://dock.us/avatar.png",
        "email": "john.doe@example.com",
        "name": "John Doe"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

properties
enum<string>[]

Select the workspace user properties that should be returned

Available options:
role,
createdAt,
updatedAt,
user.createdAt,
user.updatedAt,
user.firstName,
user.lastName,
user.avatar,
user.email,
user.name

Body

application/json
Workspace user to create
email
string
required

Email of the workspace user

Example:

"john.doe@example.com"

role
enum<string>
required

Role of the user to access the workspace

Available options:
owner,
editor,
collaborator,
viewer,
commenter
Example:

"owner"

workspaceId
string
required

ID of the workspace

Example:

"luI89ZCeEJuF"

message
string

Invite message for the workspace user. Note: This message will be sent to the user via email only if the workspace is a published workspace.

Example:

"You have been invited to join the workspace"

Response

200
application/json
Create a workspace user
data
object