JavaScript SDK: swarmhit.workspaces.members.remove(workspaceId, memberId, params?)
Removes a member from the workspace, or revokes a pending invite. Pass
?type=invite (with the invite email as memberId) to revoke an invite;
type defaults to user. The workspace's owner, organization members
and the last admin cannot be removed here (400).
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
The member's user id, or the invite email when type is invite.
Query Parameters
Whether memberId is a user (default) or a pending invite.
"user"Value in
- "user"
- "invite"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/workspaces/string/members/string"{ "data": { "ok": true }}List workspaces GET
**JavaScript SDK:** [`swarmhit.workspaces.list()`](/smart-api/sdk/methods#workspaces) For an organization workspace, lists the workspaces inside it with each one's seat allocation, connected senders and member count, plus the organization's seat pool (`pool` / `allocated` / `available`). When the connected workspace is not an organization, returns `isOrganization: false` and an empty `workspaces` list.
Update a workspace PATCH
**JavaScript SDK:** [`swarmhit.workspaces.update(workspaceId, params)`](/smart-api/sdk/methods#workspaces) Updates any subset of a workspace's `name`, `avatar` (empty string clears it) and `seatAllocation`. Lowering the allocation below the seats the workspace already uses (its LinkedIn sender accounts) is rejected with `400`, and so is over-allocating the organization pool, unless the organization's seats are added on demand (pay as you go): then the missing seats are added to the subscription instead.