Managing End Users
Register users, generate connect URLs, and execute actions on behalf of your customers.
This guide walks through the full lifecycle of managing end users in Weavz — from registering a user to executing actions with their connections.
Manage customers in the dashboard
Choose For your product and select your Project. Open Apps to create an Auth configuration, then open Users and add the external user ID your application uses. Choose Manage on that customer, select the auth configuration and create a temporary connection link. Share it only with that customer so they can authorize their own account. Their detail page shows the resulting connections.
Users are customer identities. Project Members are your teammates, managed separately. The directory labels member identities, and teammates connect their own accounts in For your AI. Configurations define app access; each connection holds a user's account credentials.
The API and SDK examples below provision the same resources programmatically. Dashboard Projects retain their existing organization scope; execution calls still use workspaceId and end-user identifiers.
1. Create a Workspace
End users live within workspaces. Start by creating a workspace and configuring its integrations.
# Create a workspace
curl -X POST https://platform.weavz.io/api/v1/workspaces \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "My App", "slug": "my-app"}'
# Add Slack with per-user connections
curl -X POST https://platform.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"integrationName": "slack",
"connectionStrategy": "per_user"
}'2. Register an End User
When a new customer signs up for your product, register them as an end user. Use their ID from your system as the externalId.
curl -X POST https://platform.weavz.io/api/v1/end-users \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "user_123",
"displayName": "Alice Johnson",
"email": "alice@example.com"
}'3. Generate a Connect URL
Create a connect token so the end user can connect their Slack account through the hosted connect portal.
Use the Weavz endUser.id UUID in /end-users/{endUserUuid} resource paths. When you later execute actions, pass your product user ID as endUserId; that value is the end user's externalId.
If the workspace contains multiple configured aliases for the same integration, pass workspaceIntegrationId instead of only integrationName. The connect URL inherits that workspace integration's auth method and OAuth app policy.
curl -X POST https://platform.weavz.io/api/v1/end-users/{endUserUuid}/connect-token \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{"integrationName": "slack"}'Open connectUrl in a popup or redirect the end user to it. The hosted connect page guides them through the OAuth2 consent flow. Once they approve, the connection is automatically linked to the end user.
The connect-token request can target an integration by integrationName or a configured alias by workspaceIntegrationId. Use workspaceIntegrationId when the alias has a selected authMethodKey or custom OAuth app. The request also accepts expiresIn from 1 hour to 30 days; when omitted, the link lasts 7 days. See the End Users API reference for the complete field list.
4. Execute Actions as the End User
Once the end user has connected their Slack, you can execute actions on their behalf by passing endUserId:
curl -X POST https://platform.weavz.io/api/v1/actions/execute \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"integrationName": "slack",
"actionName": "send_channel_message",
"input": {
"channel": "C0123456789",
"text": "Hello from Alice!"
},
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"endUserId": "user_123"
}'Weavz resolves Alice's Slack connection automatically based on the endUserId and the workspace's per_user connection strategy.
5. Send Email Invitations
Instead of generating connect URLs programmatically, you can send email invitations directly:
curl -X POST https://platform.weavz.io/api/v1/end-users/{endUserUuid}/invite \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "alice@example.com",
"integrationName": "slack"
}'The email contains a link to the connect portal where Alice can authorize her Slack account.
6. View End User Connections
Check which integrations an end user has connected:
curl https://platform.weavz.io/api/v1/end-users/{endUserUuid} \
-H "Authorization: Bearer wvz_your_api_key"7. Give Each End User Private MCP Access
The MCP Workspace already includes an endpoint. Several users can share it with separate tokens and private account connections. Create each end user with your application's external user ID, then complete any required hosted account connection.
const access = await client.mcpWorkspaces.createAccessToken(workspace.id, {
endUserId: 'user_123', expiresIn: 3600,
})access = client.mcp_workspaces.create_access_token(
workspace["id"], end_user_id="user_123", expires_in=3600,
)Deliver mcpEndpoint and accessToken privately to that user's agent. Send accessToken as Authorization: Bearer to the MCP endpoint. No separate server creation, server ID, creator identity binding or authentication change is required. See workspace access tokens for bounds and errors.
For an interactive OAuth-capable client, give it the workspace's endpoint URL and let the actual user sign in through Weavz. New MCP Workspaces admit organization members and pre-added end users. Existing endpoint policies are preserved. Owners can adjust member admission or external joining under Advanced endpoint settings; those controls do not share private credentials.
Multi-Tenant Patterns
One workspace per customer
Best for strict isolation. Each customer gets their own workspace with separate integrations, connections, and end users.
graph TD
Org[Organization: My SaaS]
Org --> A[Workspace: Customer A]
Org --> B[Workspace: Customer B]
A --> Alice[alice - alice_123]
A --> Bob[bob - bob_456]
Alice --> AC[Alice's Slack]
Bob --> BC[Bob's Slack]
B --> Charlie[charlie - charlie_789]
Charlie --> CC[Charlie's Gmail]Shared workspace with per-user connections
Best for simpler setups where all customers share the same integration configuration.
graph TD
Org[Organization: My SaaS]
Org --> WS[Workspace: Production]
WS --> S[slack - per_user]
WS --> G[gmail - per_user_with_fallback]
WS --> Alice[alice]
WS --> Bob[bob]
WS --> Charlie[charlie]
Alice --> AS[Slack conn.]
Alice --> AG[Gmail conn.]
Bob --> BS[Slack conn.]
Bob -.- BG[Gmail fallback]
Charlie --> CG[Gmail conn.]
Charlie -.- CS[no Slack yet]
style BG stroke-dasharray: 5 5
style CS stroke-dasharray: 5 5With per_user_with_fallback, end users who haven't connected their own account still get functionality through the workspace's default connection.
Cleanup
When you delete an end user, all their connections are automatically cleaned up:
curl -X DELETE https://platform.weavz.io/api/v1/end-users/{endUserUuid} \
-H "Authorization: Bearer wvz_your_api_key"Next Steps
- End Users API Reference — full endpoint documentation
- End Users Concept — understand the identity model
- Setting Up Connections — learn about connection types
- Workspace Integrations — configure connection strategies