Workspaces
Multi-workspace support for agencies and teams — share campaigns and contacts across members
Workspaces let agencies and teams operate multiple shared environments under one account. Each workspace has its own campaigns, contacts, and templates — members can be invited with role-based access.
Authentication
Workspace endpoints use a session cookie (dashboard UI) and are not available via API key. Base URL: https://api.misar.io/mail.
Roles
| Role | Capabilities |
|---|---|
owner | Full access — create/delete workspace, manage billing, invite members |
admin | Manage members, campaigns, and contacts — cannot delete workspace or manage billing |
member | Create and run campaigns, add contacts — 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 |
List workspaces
/mail/workspacesReturns all workspaces you own plus workspaces you are a member of. role reflects your role within that workspace.
Response fields
successbooleantrue when the request succeeded.
workspacesArray<object>Workspaces you own or belong to. Each includes id, name, slug, owner_id, plan, role, and created_at.
curl https://api.misar.io/mail/workspaces \
-H "Cookie: sb-access-token=YOUR_SESSION"{
"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"
}
]
}Create a workspace
/mail/workspacesCreate a new workspace.
Request body
namestringbodyrequiredDisplay name (max 100 chars).
slugstringbodyURL-safe identifier — auto-generated if omitted.
Response fields
successbooleantrue when the workspace was created.
workspaceobjectThe created workspace: id, name, slug, owner_id, plan, created_at.
curl -X POST https://api.misar.io/mail/workspaces \
-H "Cookie: sb-access-token=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{ "name": "Client Alpha", "slug": "client-alpha" }'{
"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"
}
}Get workspace details
/mail/workspaces/:idGet details for a single workspace.
Path parameters
idstringpathrequiredID of the workspace to retrieve.
curl https://api.misar.io/mail/workspaces/ws-uuid-... \
-H "Cookie: sb-access-token=YOUR_SESSION"Update a workspace
/mail/workspaces/:idUpdate workspace name or slug. Owner or admin only.
Path parameters
idstringpathrequiredID of the workspace to update.
Request body
namestringbodyDisplay name (max 100 chars).
slugstringbodyURL-safe identifier.
curl -X PATCH https://api.misar.io/mail/workspaces/ws-uuid-... \
-H "Cookie: sb-access-token=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{ "name": "Client Alpha — Rebranded" }'Delete a workspace
/mail/workspaces/:idPermanently delete a workspace and all its data. Owner only. This action is irreversible.
Path parameters
idstringpathrequiredID of the workspace to delete.
curl -X DELETE https://api.misar.io/mail/workspaces/ws-uuid-... \
-H "Cookie: sb-access-token=YOUR_SESSION"List members
/mail/workspaces/:id/membersList all members of a workspace.
Path parameters
idstringpathrequiredID of the workspace.
Response fields
successbooleantrue when the request succeeded.
membersArray<object>Workspace members. Each includes user_id, email, name, role, and joined_at.
curl https://api.misar.io/mail/workspaces/ws-uuid-.../members \
-H "Cookie: sb-access-token=YOUR_SESSION"{
"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"
}
]
}Invite a member
/mail/workspaces/:id/membersInvite a user to the workspace by email. If the user does not have a MisarMail account, they will receive an invitation email.
Path parameters
idstringpathrequiredID of the workspace.
Request body
emailstringbodyrequiredInvitee's email address.
rolestringbodydefault: memberowner, admin, or member.
curl -X POST https://api.misar.io/mail/workspaces/ws-uuid-.../members \
-H "Cookie: sb-access-token=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "role": "member" }'Update a member's role
/mail/workspaces/:id/members/:user_idChange a member's role. Owner only.
Path parameters
idstringpathrequiredID of the workspace.
user_idstringpathrequiredID of the member to update.
Request body
rolestringbodyrequiredowner, admin, or member.
curl -X PATCH https://api.misar.io/mail/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.
Remove a member
/mail/workspaces/:id/members/:user_idRemove a member from the workspace.
Path parameters
idstringpathrequiredID of the workspace.
user_idstringpathrequiredID of the member to remove.
curl -X DELETE https://api.misar.io/mail/workspaces/ws-uuid-.../members/user-uuid-... \
-H "Cookie: sb-access-token=YOUR_SESSION"