eavz

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

POST/api/v1/end-users

Create a new end user within a workspace.

Request Body

FieldTypeRequiredDescription
workspaceIdstring (uuid)YesWorkspace to create the end user in
externalIdstringYesUnique external identifier within the workspace
displayNamestringNoHuman-readable display name
emailstring (email)NoEnd user email address
metadataobjectNoArbitrary metadata to attach

Response (201)

json
{
  "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

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" }
  }'

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing or invalid fields
409DUPLICATEEnd user with this externalId already exists in the workspace

List End Users

GET/api/v1/end-users

List all end users in a workspace.

Query Parameters

FieldTypeRequiredDescription
workspaceIdstring (uuid)YesFilter by workspace ID

Response

json
{
  "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

bash
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

GET/api/v1/end-users/:id

Get an end user by ID, including their connections.

Path Parameters

FieldTypeDescription
idstring (uuid)End user ID

Response

json
{
  "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

bash
curl https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDEnd user not found

Update End User

PATCH/api/v1/end-users/:id

Update an end user's display name, email, or metadata.

Path Parameters

FieldTypeDescription
idstring (uuid)End user ID

Request Body

FieldTypeRequiredDescription
displayNamestring | nullNoUpdated display name (null to clear)
emailstring | nullNoUpdated email address (null to clear)
metadataobject | nullNoUpdated metadata (null to clear)

Response

json
{
  "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

bash
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

StatusCodeDescription
400VALIDATION_ERRORNo updates provided
404NOT_FOUNDEnd user not found

Delete End User

DELETE/api/v1/end-users/:id

Delete an end user and cascade-delete all their connections.

Path Parameters

FieldTypeDescription
idstring (uuid)End user ID

Response

json
{
  "deleted": true,
  "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/end-users/a1b2c3d4-5678-90ab-cdef-1234567890ab \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDEnd user not found

Generate Connect Token

POST/api/v1/end-users/:id/connect-token

Generate a connect portal URL for an end user. The portal lets them connect their own third-party accounts.

Path Parameters

FieldTypeDescription
idstring (uuid)End user ID

Request Body

FieldTypeRequiredDescription
integrationNamestringNoRestrict to a specific integration
expiresInintegerNoToken expiration in seconds (default: 14400 = 4 hours)

Response

json
{
  "connectUrl": "https://api.weavz.io/connect?token=cst_abc123...",
  "token": "cst_abc123...",
  "expiresAt": "2025-01-15T14:30:00.000Z"
}

Example

bash
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

StatusCodeDescription
404NOT_FOUNDEnd user not found

Send Email Invitation

POST/api/v1/end-users/:id/invite

Send an email invitation to an end user with a link to connect their accounts.

Path Parameters

FieldTypeDescription
idstring (uuid)End user ID

Request Body

FieldTypeRequiredDescription
emailstring (email)YesEmail address to send the invitation to
integrationNamestringNoRestrict to a specific integration
expiresInintegerNoLink expiration in seconds (default: 14400 = 4 hours)

Response

json
{
  "sent": true,
  "email": "[email protected]"
}

Example

bash
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

StatusCodeDescription
400EMAIL_NOT_CONFIGUREDEmail sending is not configured
404NOT_FOUNDEnd user not found