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

# Developer Team Management APIs

> Manage workspace member invitations, roles, and sales customer assignments

The **Team Management APIs** allow you to programmatically invite members to your workspace, assign granular permissions, manage sales representatives, and distribute customer lead lists.

All endpoints require the `x-api-key: {{APIKey}}` header.

**Production Base URL**: `https://api.dashboard.valuez.ai`

***

## 1. Team Architecture

Valuez AI has two types of team members:

```
┌──────────────────────────────────────────────────────────────┐
│                    WORKSPACE TEAM STRUCTURE                  │
├──────────────────────────────┬───────────────────────────────┤
│    WORKSPACE ADMINISTRATORS  │      SALES REPRESENTATIVES    │
│       & AGENT BUILDERS       │        (MOBILE APP USERS)     │
├──────────────────────────────┼───────────────────────────────┤
│ • Full web dashboard access  │ • Mobile app dialer           │
│ • Manage agents & campaigns  │ • Handles assigned leads      │
│ • Invite members & roles     │ • Bound by hardware IMEI      │
└──────────────────────────────┴───────────────────────────────┘
```

***

## 2. Workspace Invites (`/api/v1/external/team-management/*`)

### 2.1 List Invited Members

* **Endpoint**: `POST /api/v1/external/team-management/get-InvitedTeamList`

```json theme={null}
{
  "searchName": "",
  "status": "ALL",
  "roleTypeID": null,
  "pageNo": 1,
  "pageSize": 10,
  "sortColumn": "CreatedOn",
  "sortOrder": "DESC"
}
```

### 2.2 Invite or Update a Team Member

* **Endpoint**: `POST /api/v1/external/team-management/add-update-Invitation`

```json theme={null}
{
  "action": "ADD",
  "emails": ["salesrep@company.com"],
  "userID": 12,
  "roleTypeID": 3,
  "userType": "Mobile App",
  "agentAccessScope": "ALL",
  "agentIds": [1, 5],
  "permissions": {
    "mobileCalling": ["CanView", "CanUpdate"],
    "mobileSales": ["CanView", "CanAdd", "CanUpdate"]
  }
}
```

| Field | Type | Description |
| - | - | - |
| `action` | String | `"ADD"` to invite new, `"UPDATE"` to modify existing. |
| `emails` | Array of Strings | Email addresses to invite. |
| `roleTypeID` | Integer | `1` = Owner, `2` = Admin, `3` = Member, `4` = Viewer. |
| `userType` | String | `"Web"` (dashboard access) or `"Mobile App"` (dialer access). |
| `agentAccessScope` | String | `"ALL"` for all agents or `"RESTRICTED"` to limit by `agentIds`. |
| `agentIds` | Array of Integers | IDs of specific agents the member may access (used with `RESTRICTED`). |

### 2.3 Other Invite Endpoints

| Endpoint | Method | Description |
| - | - | - |
| `/api/v1/external/team-management/get-InvitedTeamDetail?TeamInviteKeyID={id}` | GET | Fetch full details for a single invite. |
| `/api/v1/external/team-management/my-access` | GET | Return the permission scopes of the calling key's user. |
| `/api/v1/external/team-management/my-organizations` | GET | List organizations the calling user belongs to. |
| `/api/v1/external/team-management/invite/accept` | POST | Accept a pending invitation. |
| `/api/v1/external/team-management/invite/{teamInviteKeyID}` | DELETE | Revoke a pending or accepted invite. |
| `/api/v1/external/team-management/member/{memberAdminID}` | DELETE | Remove an existing workspace member. |

### 2.4 Reset IMEI for Mobile Sales Users

Mobile app users are bound to their device IMEI for security. If a sales rep changes their phone, reset the IMEI lock:

* **Endpoint**: `POST /api/v1/external/team-management/reset-imei`
* **Content-Type**: `multipart/form-data`

| Form Field | Value |
| - | - |
| `memberAdminID` | UUID of the member |
| `email` | Member's email address |
| `IMEI` | Leave empty string `""` to clear the device lock |

***

## 3. Sales Team & Lead Mapping (`/api/v1/external/SalesTeam/*` & `SalesUser/*`)

Distribute customer contacts among your sales representatives:

### 3.1 List Sales Representatives

* **Endpoint**: `POST /api/v1/external/SalesTeam/get-teamList`

```json theme={null}
{
  "searchName": "",
  "userStatus": null,
  "fromDate": null,
  "toDate": null,
  "pageNo": 1,
  "pageSize": 15,
  "sortColumn": "CreatedOn",
  "sortOrder": "DESC"
}
```

### 3.2 Upload a Contact List for a Sales Rep

Bulk assign contacts to a sales representative via CSV:

* **Endpoint**: `POST /api/v1/external/SalesUser/upload`
* **Content-Type**: `multipart/form-data`

| Form Field | Description |
| - | - |
| `SalesUserID` | Integer ID of the sales rep (e.g., `"40"`) |
| `file` | CSV file containing contact records |

### 3.3 Add a Single Contact

* **Endpoint**: `POST /api/v1/external/SalesUser/add-update-Contacts`

```json theme={null}
{
  "ContactKeyID": null,
  "CustomerName": "Priya Mehta",
  "ContactNumber": "9876543210",
  "Email": "priya@example.com",
  "City": "Pune",
  "State": "Maharashtra",
  "Country": "India",
  "SalesUserID": 40
}
```

### 3.4 Map Existing Contact IDs to a Sales Rep

* **Endpoint**: `POST /api/v1/external/SalesUser/map-contacts`

```json theme={null}
{
  "SalesUserKeyID": "0488f9c5-206a-4a7c-b410-7b0aa6f0f214",
  "ContactID": [101, 102, 103]
}
```

### 3.5 View Mapped Customers

* **Endpoint**: `POST /api/v1/external/SalesUser/mapped-Customer-list`

```json theme={null}
{
  "SalesUserKeyID": "0488f9c5-206a-4a7c-b410-7b0aa6f0f214",
  "searchName": "",
  "fromDate": null,
  "toDate": null,
  "pageNo": 1,
  "pageSize": 15
}
```

<CardGroup cols={2}>
  <Card title="Campaign APIs" icon="phone" href="/dev-campaigns">
    Schedule automated outbound calls for your mapped contacts.
  </Card>

  <Card title="Master Lookups" icon="list" href="/dev-lookups">
    Query sales user IDs and role enumerations.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.