> ## Documentation Index
> Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Team Collaboration

> Invite team members, assign roles, manage permissions. Collaborate on route configuration, monitor API traffic, and manage secrets securely.

# Team Collaboration

Invite team members to collaborate on your KnoxCall tenant with role-based access control.

## Overview

**Team features:**

* 👥 Invite unlimited team members
* 🔐 Role-based permissions (Admin, Member, Read-only)
* 📧 Email invitations with secure links
* 🔄 Easy member management
* 📊 Audit log tracking of member actions

**Perfect for:**

* Dev teams managing API integrations
* Ops teams monitoring traffic
* Security teams auditing access

## Team Roles

### Administrator

**Full access** to everything:

✅ **Can do:**

* Create/edit/delete routes
* Create/edit/delete secrets
* Create/edit/delete clients
* Manage team members (invite/remove)
* Change tenant settings
* View/export all logs
* Configure alerts
* Manage billing

❌ **Cannot do:**

* Delete tenant (requires owner)

**Use cases:**

* Engineering leads
* DevOps engineers
* Technical founders

### Member

**Create and configure** resources:

✅ **Can do:**

* Create/edit/delete routes
* Create/edit/delete secrets
* Create/edit/delete clients
* View logs and analytics
* Test routes
* Configure environments

❌ **Cannot do:**

* Invite/remove team members
* Change tenant settings
* Manage billing
* Delete tenant

**Use cases:**

* Backend developers
* Integration engineers
* QA engineers

### Read-only

**Read-only access**:

✅ **Can do:**

* View routes (cannot edit)
* View logs and analytics
* View alerts (cannot configure)
* View team members

❌ **Cannot do:**

* Create/edit/delete anything
* View secret values
* Test routes
* Configure settings
* Manage billing

**Use cases:**

* Product managers
* Customer success
* Junior developers
* External auditors

## Inviting Team Members

### Step 1: Navigate to Team Page

1. Click **Settings** in sidebar
2. Select **Team**
3. See current team members

### Step 2: Invite Member

1. Click **+ Invite Member**
2. Enter email address:
   ```
   sarah@example.com
   ```
3. Select role:
   ```
   ◉ Admin
   ○ Member
   ○ Read-only
   ```
4. Click **Send Invitation**

### Step 3: Invitation Sent

**Email sent to invited user:**

```text theme={"dark"}
Subject: You've been invited to join DunderMifflin on KnoxCall

Hi,

John (john@example.com) has invited you to join the DunderMifflin
team on KnoxCall as a Member.

[Accept Invitation]

This invitation expires in 7 days.
```

### Step 4: User Accepts

**New user:**

1. Clicks "Accept Invitation"
2. Creates KnoxCall account
3. Sets password
4. Gains access to tenant

**Existing user:**

1. Clicks "Accept Invitation"
2. Logs in with existing account
3. Tenant added to their account
4. Can switch between tenants

## Managing Team Members

### Viewing Team

**Team page shows:**

* Member name and email
* Role (Admin, Member, Read-only)
* Status (Active, Pending invitation)
* Joined date
* Last active

### Changing Member Role

1. Navigate to Settings → Team
2. Find team member
3. Click **Change Role** dropdown
4. Select new role
5. Confirm

**Effect:** Immediate (user's next request reflects new permissions)

### Removing Team Member

1. Navigate to Settings → Team
2. Find team member
3. Click **Remove**
4. Confirm removal

**What happens:**

* User loses access to tenant immediately
* Cannot view routes, secrets, logs
* Can no longer make changes
* Audit logs still show their past actions

**User is notified** via email.

### Resending Invitation

**If invitation expired or email lost:**

1. Navigate to Settings → Team
2. Find pending invitation
3. Click **Resend**
4. New invitation email sent

**Invitation expiration:** 7 days

### Canceling Invitation

**Before user accepts:**

1. Navigate to Settings → Team
2. Find pending invitation
3. Click **Cancel**
4. Invitation link becomes invalid

## Audit Logging

All team member actions are logged:

**View team member activity:**

1. Navigate to Monitoring → Audit Logs
2. Filter by user email
3. See all changes made by that member

**Example log entries:**

```text theme={"dark"}
john@example.com created route "stripe-payments"
sarah@example.com updated secret "api-key" (added new version)
mike@example.com deleted client "test-client"
```

**Use cases:**

* Compliance audits
* Troubleshooting configuration issues
* Security investigations

## Best Practices

### 1. Principle of Least Privilege

**Assign minimum necessary role:**

✅ **Good:**

```text theme={"dark"}
Product Manager: Read-only
Backend Dev: Member (can configure)
Engineering Lead: Admin (full access)
```

❌ **Bad:**

```text theme={"dark"}
Everyone: Administrator
```

### 2. Regular Access Reviews

**Monthly:**

* Review team member list
* Remove inactive members
* Verify roles still appropriate
* Check for ex-employees

### 3. Use Service Accounts for Automation

**Don't share personal accounts for CI/CD:**

❌ **Bad:** Use [john@example.com](mailto:john@example.com) credentials in CI
✅ **Good:** Create API key for CI/CD

**Team members = humans only**

### 4. Document Team Structure

**Maintain team roster:**

```text theme={"dark"}
Administrators:
- john@example.com (Engineering Lead)
- sarah@example.com (DevOps Lead)

Members:
- mike@example.com (Backend Dev)
- lisa@example.com (QA Engineer)

Read-only:
- alex@example.com (Product Manager)
```

### 5. Onboarding/Offboarding Process

**New team member:**

1. Invite to KnoxCall tenant
2. Share documentation links
3. Walkthrough key routes/secrets
4. Add to on-call rotation (if applicable)

**Team member leaving:**

1. Remove from KnoxCall tenant
2. Rotate any shared secrets they had access to
3. Review their audit logs (last actions)
4. Update on-call rotation

## Role Permissions Matrix

| Permission                | Admin      | Member | Read-only |
| ------------------------- | ---------- | ------ | --------- |
| View routes               | ✅          | ✅      | ✅         |
| Create/edit routes        | ✅          | ✅      | ❌         |
| Delete routes             | ✅          | ✅      | ❌         |
| View secrets (names only) | ✅          | ✅      | ✅         |
| View secret values        | ✅          | ✅      | ❌         |
| Create/edit secrets       | ✅          | ✅      | ❌         |
| Create/edit clients       | ✅          | ✅      | ❌         |
| View logs                 | ✅          | ✅      | ✅         |
| Export logs               | ✅          | ✅      | ❌         |
| Configure alerts          | ✅          | ✅      | ❌         |
| View analytics            | ✅          | ✅      | ✅         |
| Test routes               | ✅          | ✅      | ❌         |
| Invite team members       | ✅          | ❌      | ❌         |
| Remove team members       | ✅          | ❌      | ❌         |
| Change roles              | ✅          | ❌      | ❌         |
| Edit tenant settings      | ✅          | ❌      | ❌         |
| Manage billing            | ✅          | ❌      | ❌         |
| Delete tenant             | Owner only | ❌      | ❌         |

## Multiple Tenants

**If user belongs to multiple tenants:**

**Switch tenants:**

1. Click tenant dropdown (top-left)
2. Select different tenant
3. UI updates to that tenant

**Each tenant:**

* Separate team with separate roles
* User may be Admin in one, Viewer in another
* Permissions apply per-tenant

**Example:**

```text theme={"dark"}
john@example.com
├─ DunderMifflin-Prod: Admin
├─ DunderMifflin-Dev: Member
└─ ClientProject: Read-only
```

## Troubleshooting

### Issue: "Invitation not received"

**Causes:**

* Email in spam folder
* Typo in email address
* Email server rejecting

**Fix:**

1. Check spam folder
2. Verify correct email
3. Resend invitation
4. Try different email provider

### Issue: "Can't remove team member"

**Causes:**

* Trying to remove yourself (not allowed)
* Only member (need at least one Admin)

**Fix:**

* Have another Admin remove you
* Invite another Admin first

### Issue: "Permissions not working"

**Cause:** Browser cache

**Fix:**

1. Log out
2. Clear browser cache
3. Log back in
4. Permissions refresh

## Related Features

* **Audit Logs**: Track team member actions
* **Tenant Management**: Overall tenant settings
* **API Keys**: Alternative authentication (not tied to user)

## Next Steps

<CardGroup cols={2}>
  <Card title="Audit Logs" icon="clipboard-list" href="/monitoring/audit-logs">
    Track team activity
  </Card>

  <Card title="Tenant Settings" icon="gear" href="/account/tenant-management">
    Configure tenant
  </Card>

  <Card title="Routes" icon="route" href="/getting-started/first-route">
    Start configuring routes
  </Card>

  <Card title="Secrets" icon="key" href="/getting-started/first-secret">
    Manage credentials
  </Card>
</CardGroup>

***

<CardGroup cols={2}>
  <Card title="📊 Statistics" icon="chart-line">
    * **Level**: beginner
    * **Time**: 5 minutes
  </Card>

  <Card title="🏷️ Tags" icon="tags">
    `team`, `collaboration`, `permissions`, `access-control`
  </Card>
</CardGroup>
