Members
From the Workspaces & Projects API reference. Requests use the base URL https://app.warmerly.com/api/v1 and an API key, see Authentication.
API reference
#Change a member's role
PATCH /workspaces/{id}/members/{userId}Requires owner or admin.
| Field | Type | Required | Description |
|---|---|---|---|
role | "owner" \| "admin" \| "member" | Yes | New role for the member. |
curl https://app.warmerly.com/api/v1/workspaces/8f14e45f-ceea-4c6a-8c8d-6b1a5b5c9c1a/members/3c2b1a09-... \
-X PATCH \
-H "X-Api-Key: wmv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "role": "admin" }'{ "ok": true }Notes:
- Only an
ownermay setrole: "owner", doing so transfers ownership; the caller's own role becomesadmin. - An
admincannot change anowner's role (403 forbidden). - An invalid or missing
rolereturns400 bad_request, and a user who is not a member returns404 not_found.
API reference
#Remove a member
DELETE /workspaces/{id}/members/{userId}Requires owner or admin to remove another member. A member may remove themselves (leave the workspace) regardless of role, except the owner: the owner must transfer ownership or delete the workspace first (400 bad_request). A user who is not a member returns 404 not_found.
An owner can never be removed by another member (403 forbidden).
{ "ok": true }Was this page helpful?