MisarMisar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisarSEOMisar PlatformMisar SSO
Workspaces

Members

List workspace members, invite by email, and remove members.

A member row links a user (or a pending email) to a workspace with a role and status. Statuses are active, invited (pending signup), and removed (soft-deleted).

List members

GET/io/workspaces/:id/members

Returns the workspace plus its members, ordered by created_at ascending. Soft-removed members (status: "removed") are excluded. Requires member access or higher.

Path parameters

idstringpathrequired

The workspace UUID.

{
  "data": {
    "workspace": {
      "id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
      "name": "Acme Agency",
      "slug": "acme-agency-k3n8xq",
      "owner_id": "usr-owner-uuid",
      "created_at": "2026-07-01T10:00:00Z",
      "updated_at": "2026-07-01T10:00:00Z"
    },
    "members": [
      {
        "id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0001",
        "workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
        "user_id": "usr-owner-uuid",
        "invited_email": null,
        "role": "owner",
        "status": "active",
        "invited_by": null,
        "created_at": "2026-07-01T10:00:00Z"
      },
      {
        "id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0002",
        "workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
        "user_id": null,
        "invited_email": "teammate@example.com",
        "role": "member",
        "status": "invited",
        "invited_by": "usr-owner-uuid",
        "created_at": "2026-07-02T08:00:00Z"
      }
    ]
  }
}

Invite / add a member

POST/io/workspaces/:id/members

Adds a member by email. Requires admin access or higher.

  • If a Supabase user already exists for the email, they are attached (upserted on workspace_id, user_id) with status: "active".
  • Otherwise a pending invite is created with user_id: null, invited_email set, and status: "invited".

Path parameters

idstringpathrequired

The workspace UUID.

Request body

emailstringbodyrequired

Email of the person to invite. Normalized to lowercase; must be a valid address.

rolestringbody

member (default) or admin. The owner role cannot be assigned via invite — any other value falls back to member.

{ "email": "teammate@example.com", "role": "admin" }
{
  "data": {
    "id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0002",
    "workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
    "user_id": null,
    "invited_email": "teammate@example.com",
    "role": "admin",
    "status": "invited",
    "invited_by": "usr-owner-uuid",
    "created_at": "2026-07-02T08:00:00Z"
  }
}

Remove a member

DELETE/io/workspaces/:id/members

Soft-removes a member by setting status: "removed". Requires admin access or higher. The workspace owner cannot be removed.

Path parameters

idstringpathrequired

The workspace UUID.

Query parameters

memberIdstringqueryrequired

The membership row UUID to remove.

{ "success": true }

Error cases

CodeError
400Invalid workspace id
400A valid email is required (POST)
400A valid memberId is required (DELETE)
400The workspace owner cannot be removed (DELETE)
401Unauthorized
403You do not have access to this workspace
403Insufficient role for this action
404Workspace not found
404Member not found (DELETE)