eavz

End Users

Represent your customers and their connections with a unified identity model.

End Users

End users represent the people who use your product. By registering them in Weavz, you can let each end user connect their own third-party accounts, track their connections, and execute actions on their behalf.

Why End Users?

Without end users, multi-tenant connection management requires manually tracking externalId strings across connections, actions, and connect flows. End users provide a first-class identity that ties everything together:

  • Each end user owns their connections — when you delete an end user, their connections are cleaned up automatically
  • Connect portal — generate a URL where an end user can connect their own accounts
  • Connection resolution — pass endUserId when executing actions and Weavz resolves the right connection
  • Audit trail — see all connections belonging to a specific end user in one place
  • MCP servers — create MCP servers scoped to an end user, so AI agents use their connected integrations automatically

End User Types

End users come in two flavors:

TypeCreated ViaIdentity FieldUse Case
ExternalAPI (POST /api/v1/end-users)externalIdYour customers — users of your product
MemberDashboard invitationauthUserIdYour team members using the dashboard

Most integrations will use external end users to represent the customers of your SaaS product.

Creating End Users

End users are scoped to a workspace. Each externalId must be unique within its workspace.

bash
curl -X POST https://api.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": "[email protected]",
    "metadata": {
      "plan": "pro",
      "company": "Acme Inc"
    }
  }'

Auto-Creation

End users can also be created automatically when a connection is established through the hosted connect flow with an endUserId parameter. If the end user doesn't exist yet, Weavz creates one for you.

Connect Portal

The connect portal lets your end users connect their own third-party accounts through a hosted page. Generate a portal URL for an end user:

bash
curl -X POST https://api.weavz.io/api/v1/end-users/{endUserId}/connect-token \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack"
  }'

Portal modes

  • Single integration — pass integrationName to restrict the portal to one integration (e.g., only Slack)
  • Multi-integration — omit integrationName to let the user connect any integration configured in the workspace

Connection Ownership

Every connection created through the connect portal is automatically linked to the end user. You can view all connections for an end user:

bash
curl https://api.weavz.io/api/v1/end-users/{endUserId} \
  -H "Authorization: Bearer wvz_your_api_key"

When you delete an end user, all their connections are deleted as well.

Connection Strategies

End users work with workspace integration connection strategies:

StrategyEnd User Behavior
fixedAll end users share the same connection. No per-user connections.
per_userEach end user must connect their own account. No fallback.
per_user_with_fallbackEnd users can connect their own account, with a shared default fallback.

When you execute an action with endUserId, Weavz looks up the end user's connection for that integration. With per_user_with_fallback, if the end user hasn't connected their own account, the workspace's default connection is used instead.

Executing Actions as an End User

Pass endUserId when executing actions to use the end user's connection:

bash
curl -X POST https://api.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 the user!"
    },
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "endUserId": "user_123"
  }'

Email Invitations

If an end user has an email address, you can send them an invitation with a link to connect their accounts:

bash
curl -X POST https://api.weavz.io/api/v1/end-users/{endUserId}/invite \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "integrationName": "slack"
  }'

The email contains a link to the connect portal where the end user can authenticate with the specified integration.

Next Steps