WWaSphere Docs
Features

Team & Roles

Invite teammates to a WaSphere workspace, assign Owner / Admin / Agent tiers, and define custom roles as named capability sets enforced server-side.

Team & Roles

A WaSphere workspace can be shared with a team. Invite teammates by link, put them in an authority tier, and — for agents — grant exactly the capabilities they need through a named custom role.

New in v1.3. Permissions are enforced in the backend, not by hiding buttons. An agent without the api_keys capability cannot reach the API-key endpoints even by calling them directly.

Authority tiers

Every member holds one of three tiers:

TierCapabilities
OwnerEverything. The workspace owner.
AdminEverything. Full access, without being the owner.
Agent (MEMBER)Exactly the capabilities of their assigned custom role — nothing more.

Owners and Admins always resolve to the complete capability set, so custom roles are irrelevant for them. An Agent with no role assigned has no capabilities granted through one.

Capabilities

A custom role is a named set of capabilities. There are seven:

CapabilityGrants
inboxView and reply in the Inbox
contactsView and edit the contact book
messagesThe Messages page — manual and API sends
sessionsManage WhatsApp connections (link and unlink numbers)
webhooksManage outbound webhooks
api_keysManage API keys — machine credentials
settingsWorkspace settings, branding, and the danger zone

Capabilities gate what people can do in the dashboard. They are a separate system from API key permission scopes, which gate what machine clients can do over the public HTTP API. A support agent's login and your integration's API key are governed independently.

Example roles

Role nameCapabilities
Supportinbox, contacts
Marketinginbox, contacts, messages
Developerapi_keys, webhooks, sessions

Roles are defined per workspace and reused across members and invites — change a role's capabilities and every member holding it is updated.

Managing the team

Team management lives at Dashboard → Team. The API is under the workspace:

GET    /workspaces/{workspaceId}/my-role
GET    /workspaces/{workspaceId}/members
PATCH  /workspaces/{workspaceId}/members/{userId}
DELETE /workspaces/{workspaceId}/members/{userId}

GET    /workspaces/{workspaceId}/roles
POST   /workspaces/{workspaceId}/roles
PATCH  /workspaces/{workspaceId}/roles/{roleId}
DELETE /workspaces/{workspaceId}/roles/{roleId}

GET    /workspaces/{workspaceId}/invites
POST   /workspaces/{workspaceId}/invites
DELETE /workspaces/{workspaceId}/invites/{inviteId}

Create a role:

curl -X POST https://api.yourdomain.com/workspaces/{workspaceId}/roles \
  -H "Authorization: Bearer wsk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support",
    "capabilities": ["inbox", "contacts"]
  }'

Only the seven capability strings above are accepted; anything else is rejected by validation.

Invites

Invite a teammate by generating a link. The invite carries the tier they join as, and — for Agent-tier invites — the custom role assigned on acceptance.

curl -X POST https://api.yourdomain.com/workspaces/{workspaceId}/invites \
  -H "Authorization: Bearer wsk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "role": "MEMBER", "customRoleId": "..." }'

The response contains the raw token, the ready-to-share inviteUrl, the role, expiresAt, and whether the invite was emailed.

Invites expire after 7 days. The invitee opens the link, sets their own password, and joins the workspace with the tier and role baked into the invite — you never handle their password. Pending invites are listed until accepted or expired, and can be revoked before use.

Only a hash of the invite token is stored. The raw token exists solely inside the link, so an invite URL cannot be recovered after it is generated — if it is lost, revoke it and issue a new one.

If SMTP is configured, the invite link is emailed automatically. With SMTP left unset, invites still work exactly as before — you just copy the link and send it yourself.

Removing access

Deleting a member removes their access to the workspace immediately. Deleting a custom role does not delete the members holding it — their role reference is cleared, leaving them as Agents with no granted capabilities, which is the safe direction to fail.

  • API keys — machine credentials and permission scopes
  • Inbox — the shared workspace most agents live in
  • Contacts — the shared contact book

On this page