Skip to main content
POST
/
api
/
v1
/
workspace-memberships
Create Workspace Membership
curl --request POST \
  --url https://api.example.com/api/v1/workspace-memberships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "<string>",
  "workspaceId": "<string>",
  "privileges": [
    "ROLE_WORKSPACE_OWNER"
  ]
}
'
{
  "userId": "<string>",
  "workspaceId": "<string>",
  "privileges": [
    "ROLE_WORKSPACE_OWNER"
  ],
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "accessTokens": []
}

Authorizations

Authorization
string
header
required

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

Body

application/json
userId
string
required
workspaceId
string<uuid4>
required
privileges
enum<string>[]
Maximum array length: 1
Available options:
ROLE_WORKSPACE_OWNER,
ROLE_WORKSPACE_ADMIN,
ROLE_WORKSPACE_MEMBER

Response

Successful Response

userId
string
required
workspaceId
string<uuid4>
required
privileges
enum<string>[]
required
Available options:
ROLE_WORKSPACE_OWNER,
ROLE_WORKSPACE_ADMIN,
ROLE_WORKSPACE_MEMBER
id
string<uuid4>
createdAt
string<date-time>
updatedAt
string<date-time>
accessTokens
WorkspaceAccessToken · object[]