Misar IO Docs

Workspaces

Multi-workspace support for agencies and teams — share campaigns, leads, and CRM across members

Workspaces

Workspaces let agencies and teams operate multiple shared environments under one account. Each workspace has its own campaigns, leads, CRM, deals, and contacts — members can be invited with role-based access.

Auth: Session cookie (dashboard UI). Workspace endpoints are not available via API key.


Roles

| Role | Capabilities | |------|-------------| | owner | Full access — create/delete workspace, manage billing, invite members | | admin | Manage members, campaigns, contacts, CRM — cannot delete workspace or manage billing | | member | Create and run campaigns, add contacts, view CRM — cannot invite members or change settings |


Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /workspaces | List workspaces you own or belong to | | POST | /workspaces | Create a new workspace | | GET | /workspaces/:id | Get workspace details | | PATCH | /workspaces/:id | Update workspace name or slug | | DELETE | /workspaces/:id | Delete a workspace (owner only) | | GET | /workspaces/:id/members | List workspace members | | POST | /workspaces/:id/members | Invite a member by email | | PATCH | /workspaces/:id/members/:user_id | Update a member's role | | DELETE | /workspaces/:id/members/:user_id | Remove a member |


GET /workspaces

Returns all workspaces you own plus workspaces you are a member of.

curl https://mail.misar.io/workspaces \
  -H "Cookie: sb-access-token=YOUR_SESSION"

Response

{
  "success": true,
  "workspaces": [
    {
      "id":         "ws-uuid-...",
      "name":       "Acme Agency",
      "slug":       "acme-agency",
      "owner_id":   "user-uuid-...",
      "plan":       "starter",
      "role":       "owner",
      "created_at": "2026-03-01T00:00:00Z"
    },
    {
      "id":         "ws-uuid-2...",
      "name":       "Client Project",
      "slug":       "client-project",
      "owner_id":   "other-user-uuid-...",
      "plan":       "starter",
      "role":       "member",
      "created_at": "2026-04-01T00:00:00Z"
    }
  ]
}

role reflects your role within that workspace.


POST /workspaces

Create a new workspace.

curl -X POST https://mail.misar.io/workspaces \
  -H "Cookie: sb-access-token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Client Alpha", "slug": "client-alpha" }'

Request Fields

| Field | Type | Required | Notes | |-------|------|----------|-------| | name | string | ✓ | Display name (max 100 chars) | | slug | string | — | URL-safe identifier — auto-generated if omitted |

Response

{
  "success": true,
  "workspace": {
    "id":         "ws-new-uuid-...",
    "name":       "Client Alpha",
    "slug":       "client-alpha",
    "owner_id":   "your-user-uuid-...",
    "plan":       "starter",
    "created_at": "2026-04-13T10:00:00Z"
  }
}

PATCH /workspaces/:id

Update workspace name or slug. Owner or admin only.

curl -X PATCH https://mail.misar.io/workspaces/ws-uuid-... \
  -H "Cookie: sb-access-token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Client Alpha — Rebranded" }'

DELETE /workspaces/:id

Permanently delete a workspace and all its data. Owner only. This action is irreversible.

curl -X DELETE https://mail.misar.io/workspaces/ws-uuid-... \
  -H "Cookie: sb-access-token=YOUR_SESSION"

GET /workspaces/:id/members

List all members of a workspace.

curl https://mail.misar.io/workspaces/ws-uuid-.../members \
  -H "Cookie: sb-access-token=YOUR_SESSION"

Response

{
  "success": true,
  "members": [
    {
      "user_id":    "user-uuid-...",
      "email":      "[email protected]",
      "name":       "Priya Sharma",
      "role":       "owner",
      "joined_at":  "2026-03-01T00:00:00Z"
    },
    {
      "user_id":    "user-uuid-2...",
      "email":      "[email protected]",
      "name":       "Ravi Kumar",
      "role":       "admin",
      "joined_at":  "2026-03-15T00:00:00Z"
    }
  ]
}

POST /workspaces/:id/members

Invite a user to the workspace by email. If the user does not have a MisarMail account, they will receive an invitation email.

curl -X POST https://mail.misar.io/workspaces/ws-uuid-.../members \
  -H "Cookie: sb-access-token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{ "email": "[email protected]", "role": "member" }'

Request Fields

| Field | Type | Required | Notes | |-------|------|----------|-------| | email | string | ✓ | Invitee's email address | | role | string | — | owner, admin, or member (default: member) |


PATCH /workspaces/:id/members/:user_id

Change a member's role. Owner only.

curl -X PATCH https://mail.misar.io/workspaces/ws-uuid-.../members/user-uuid-... \
  -H "Cookie: sb-access-token=YOUR_SESSION" \
  -H "Content-Type: application/json" \
  -d '{ "role": "admin" }'

You cannot demote yourself if you are the only owner. Transfer ownership first.


DELETE /workspaces/:id/members/:user_id

Remove a member from the workspace.

curl -X DELETE https://mail.misar.io/workspaces/ws-uuid-.../members/user-uuid-... \
  -H "Cookie: sb-access-token=YOUR_SESSION"