eavz

Members

Manage organization members and invitations.

Members

Manage who has access to your organization and individual workspaces. Invite new members by email, manage roles, and control workspace-level access.

Organization Members

GET/api/v1/members

List all members of your organization.

Response

json
{
  "members": [
    {
      "id": "m1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "userId": "user123",
      "role": "owner",
      "userName": "Jane Smith",
      "userEmail": "[email protected]",
      "userImage": null,
      "createdAt": "2025-01-15T10:30:00.000Z"
    }
  ],
  "total": 1
}

Example

bash
curl https://api.weavz.io/api/v1/members \
  -H "Authorization: Bearer wvz_your_api_key"

Invitations

POST/api/v1/members/invite

Invite a new member to your organization by email. The invited user will receive an email with a link to accept the invitation. Invitations expire after 7 days.

Request Body

FieldTypeRequiredDescription
emailstringYesEmail address to invite
rolestringNoadmin or member (default: member)

Response

json
{
  "invitation": {
    "id": "inv-abc123",
    "email": "[email protected]",
    "organizationId": "550e8400-e29b-41d4-a716-446655440000",
    "role": "member",
    "status": "pending",
    "expiresAt": "2025-01-23T14:00:00.000Z",
    "createdAt": "2025-01-16T14:00:00.000Z"
  }
}

Example

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

Errors

StatusCodeDescription
400VALIDATION_ERRORInvalid email address
403QUOTA_EXCEEDEDMember limit reached for your plan
409DUPLICATEUser is already a member or has a pending invitation
GET/api/v1/members/invitations

List all pending invitations for your organization.

Response

json
{
  "invitations": [
    {
      "id": "inv-abc123",
      "email": "[email protected]",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "role": "member",
      "status": "pending",
      "expiresAt": "2025-01-23T14:00:00.000Z",
      "createdAt": "2025-01-16T14:00:00.000Z"
    }
  ]
}

Example

bash
curl https://api.weavz.io/api/v1/members/invitations \
  -H "Authorization: Bearer wvz_your_api_key"
DELETE/api/v1/members/invitations/:invitationId

Revoke a pending invitation.

Path Parameters

FieldTypeDescription
invitationIdstringInvitation ID

Response

json
{
  "deleted": true,
  "id": "inv-abc123"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/members/invitations/inv-abc123 \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDInvitation not found
POST/api/v1/members/invitations/:invitationId/accept

Accept an invitation to join an organization. The authenticated user must match the invited email address.

Path Parameters

FieldTypeDescription
invitationIdstringInvitation ID

Response

json
{
  "member": {
    "id": "m1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "organizationId": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user456",
    "role": "member",
    "createdAt": "2025-01-16T14:00:00.000Z"
  }
}

Example

bash
curl -X POST https://api.weavz.io/api/v1/members/invitations/inv-abc123/accept \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
403FORBIDDENAuthenticated user's email does not match invitation
404NOT_FOUNDInvitation not found or already accepted
400EXPIREDInvitation has expired
409DUPLICATEAlready a member of this organization

Manage Members

PATCH/api/v1/members/:id

Update a member's role.

Path Parameters

FieldTypeDescription
idstringMember ID

Request Body

FieldTypeRequiredDescription
rolestringYesowner, admin, or member

Response

json
{
  "member": {
    "id": "m1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "organizationId": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user456",
    "role": "admin",
    "createdAt": "2025-01-16T14:00:00.000Z"
  }
}

Example

bash
curl -X PATCH https://api.weavz.io/api/v1/members/m1a2b3c4-d5e6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin"}'

Errors

StatusCodeDescription
400VALIDATION_ERRORInvalid role (must be owner, admin, or member)
404NOT_FOUNDMember not found
DELETE/api/v1/members/:id

Remove a member from your organization.

Path Parameters

FieldTypeDescription
idstringMember ID

Response

json
{
  "deleted": true,
  "id": "m1a2b3c4-d5e6-7890-abcd-ef1234567890"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/members/m1a2b3c4-d5e6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDMember not found

Workspace Members

POST/api/v1/workspace-members

Add an organization member to a workspace.

Request Body

FieldTypeRequiredDescription
workspaceIdstring (uuid)YesWorkspace ID
memberIdstringYesOrganization member ID
rolestringNoadmin or member (default: member)

Response (201)

json
{
  "projectMember": {
    "id": "pm1a2b3c-d5e6-7890-abcd-ef1234567890",
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "memberId": "m1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "role": "member",
    "createdAt": "2025-01-16T14:00:00.000Z"
  }
}

Example

bash
curl -X POST https://api.weavz.io/api/v1/workspace-members \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "memberId": "m1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "role": "member"
  }'

Errors

StatusCodeDescription
400VALIDATION_ERRORMissing required fields
409DUPLICATEMember is already in this workspace
DELETE/api/v1/workspace-members/:id

Remove a member from a workspace.

Path Parameters

FieldTypeDescription
idstring (uuid)Workspace member ID

Response

json
{
  "deleted": true,
  "id": "pm1a2b3c-d5e6-7890-abcd-ef1234567890"
}

Example

bash
curl -X DELETE https://api.weavz.io/api/v1/workspace-members/pm1a2b3c-d5e6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer wvz_your_api_key"

Errors

StatusCodeDescription
404NOT_FOUNDWorkspace member not found