End Users
Manage end user identities and their integration connections.
End Users
End users represent the people who use your product. Each end user is scoped to a workspace and can own connections to third-party integrations.
Create End User
/api/v1/end-usersCreate a new end user within a workspace.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | string (uuid) | Yes | Workspace to create the end user in |
externalId | string | Yes | Unique external identifier within the workspace |
displayName | string | No | Human-readable display name |
email | string (email) | No | End user email address |
metadata | object | No | Arbitrary metadata to attach |
Response (201)
{
"endUser": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "user_123",
"displayName": "Alice Johnson",
"email": "[email protected]",
"metadata": { "plan": "pro" },
"type": "external",
"connectionCount": 0,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
}Example
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" }
}'Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Missing or invalid fields |
409 | DUPLICATE | End user with this externalId already exists in the workspace |
List End Users
/api/v1/end-usersList all end users in a workspace.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | string (uuid) | Yes | Filter by workspace ID |
Response
{
"endUsers": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "user_123",
"displayName": "Alice Johnson",
"email": "[email protected]",
"metadata": { "plan": "pro" },
"type": "external",
"connectionCount": 2,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
],
"total": 1
}Example
curl "https://api.weavz.io/api/v1/end-users?workspaceId=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer wvz_your_api_key"Get End User
/api/v1/end-users/:idGet an end user by ID, including their connections.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | End user ID |
Response
{
"endUser": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "user_123",
"displayName": "Alice Johnson",
"email": "[email protected]",
"metadata": { "plan": "pro" },
"type": "external",
"connectionCount": 2,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
},
"connections": [
{
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalId": "user_123_slack",
"displayName": "Alice's Slack",
"integrationName": "slack",
"type": "PLATFORM_OAUTH2",
"status": "ACTIVE",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}
]
}Example
curl https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab \
-H "Authorization: Bearer wvz_your_api_key"Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | End user not found |
Update End User
/api/v1/end-users/:idUpdate an end user's display name, email, or metadata.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | End user ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | null | No | Updated display name (null to clear) |
email | string | null | No | Updated email address (null to clear) |
metadata | object | null | No | Updated metadata (null to clear) |
Response
{
"endUser": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "user_123",
"displayName": "Alice J.",
"email": "[email protected]",
"metadata": { "plan": "enterprise" },
"type": "external",
"connectionCount": 2,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-16T08:00:00.000Z"
}
}Example
curl -X PATCH https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Alice J.",
"metadata": { "plan": "enterprise" }
}'Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | No updates provided |
404 | NOT_FOUND | End user not found |
Delete End User
/api/v1/end-users/:idDelete an end user and cascade-delete all their connections.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | End user ID |
Response
{
"deleted": true,
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}Example
curl -X DELETE https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab \
-H "Authorization: Bearer wvz_your_api_key"Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | End user not found |
Generate Connect Token
/api/v1/end-users/:id/connect-tokenGenerate a connect portal URL for an end user. The portal lets them connect their own third-party accounts.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | End user ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
integrationName | string | No | Restrict to a specific integration |
expiresIn | integer | No | Token expiration in seconds (default: 14400 = 4 hours) |
Response
{
"connectUrl": "https://api.weavz.io/connect?token=cst_abc123...",
"token": "cst_abc123...",
"expiresAt": "2025-01-15T14:30:00.000Z"
}Example
curl -X POST https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab/connect-token \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{"integrationName": "slack"}'Errors
| Status | Code | Description |
|---|---|---|
404 | NOT_FOUND | End user not found |
Send Email Invitation
/api/v1/end-users/:id/inviteSend an email invitation to an end user with a link to connect their accounts.
Path Parameters
| Field | Type | Description |
|---|---|---|
id | string (uuid) | End user ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string (email) | Yes | Email address to send the invitation to |
integrationName | string | No | Restrict to a specific integration |
expiresIn | integer | No | Link expiration in seconds (default: 14400 = 4 hours) |
Response
{
"sent": true,
"email": "[email protected]"
}Example
curl -X POST https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab/invite \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"integrationName": "slack"
}'Errors
| Status | Code | Description |
|---|---|---|
400 | EMAIL_NOT_CONFIGURED | Email sending is not configured |
404 | NOT_FOUND | End user not found |