Ask
Type to search
Endpoints

Workspace Memberships

In Vrite, each user can be a member of multiple workspaces. Such relationships are called workspace memberships. You can use the API to manage memberships and use them to retrieve relational data, like all workspaces the user belongs to.

List Memberships for the Workspace

Lists the details of memberships in the workspace, including limited information on associated users’ profiles. Supports pagination.

GET
/workspace-memberships/list-members
Query Parameters
perPagenumber
20

Number of members to return per page

pagenumber
1

Page number to fetch

lastIdstring

Last member ID to starting fetching members from

Response object[]
idstring

ID of the workspace member

userIdstring

ID of the associated user

roleIdstring

ID of the member's role in the workspace

emailstring

Email of the invited member

namestring

Temporary name of the invited member

pendingInviteboolean

Whether the member has a pending invite

fullNamestring

User's full name

usernamestring

Short username

avatarstring

URL of the user's profile image

Request
Response
[
  {
    "id": "b895ab04036fd70b3d8c4598",
    "userId": "0777762a619a456a4c0e796c",
    "roleId": "9011d2bb12acb7cda4bb7218",
    "email": "[email protected]",
    "name": "string",
    "pendingInvite": true,
    "profile": {
      "fullName": "string",
      "username": "string",
      "avatar": "string"
    }
  }
]

List Workspaces for the User

Lists the details of workspaces the user associated with the token belongs to, including limited information on the workspaces and roles assigned to the user. Supports pagination.

GET
/workspace-memberships/list-workspaces
Query Parameters
perPagenumber
20

Number of workspaces to return per page

pagenumber
1

Page number to fetch

lastIdstring

Last workspace ID to starting fetching workspaces from

Response object[]
idstring

Workspace member ID

idstring

ID of the workspace

namestring

Name of the workspace

descriptionstring

Description of the workspace

logostring

URL of the workspace logo

customerIdstring

ID of the Stripe customer associated with the workspace

subscriptionStatusstring

Status of the workspace's subscription

subscriptionPlanstring

Identifier of the workspace's subscription plan

subscriptionDatastring

JSON-stringified Stripe subscription data associated with the workspace

subscriptionExpiresAtstring

Expiration date of the current workspace's billing cycle

namestring

Name of the role

idstring

ID of the role

Request
Response
[
  {
    "id": "78040f3aed26dcf292f8927c",
    "workspace": {
      "id": "0687f2a972f2ce9194879649",
      "name": "string",
      "description": "string",
      "logo": "string",
      "customerId": "string",
      "subscriptionStatus": "string",
      "subscriptionPlan": "string",
      "subscriptionData": "string",
      "subscriptionExpiresAt": "string"
    },
    "role": {
      "name": "string",
      "id": "03777db4eaab4f91df6c615a"
    }
  }
]

Invite User to Workspace

Invites a new user to the workspace, using the provided data to compose and send an email invite.

POST
/workspace-memberships
Body Parameters
emailstring
Required

Email to send invite to

namestring
Required

Temporary name of the invited member

roleIdstring
Required

ID of the role to assign to the invited member

Response 200
Request

Update the Role of the Membership

Updates the role assigned to the membership (user) specified by ID.

PUT
/workspace-memberships
Body Parameters
idstring
Required

ID of the workspace member

roleIdstring
Required

ID of the member's role in the workspace

Response 200
Request

Delete Member from the Workspace

Deletes the membership (user) from the workspace.

DELETE
/workspace-memberships
Query Parameters
idstring
Required

ID of the workspace member

Response 200
Request