List Referrals (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/referrals
Actual backend path: /v1/workspace/:workspaceId/referrals
Description
Get a paginated list of referrals for a workspace with optional search functionality.
Authentication
Required: Workspace authentication with appropriate permissions.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number (default: 1, min: 1) |
limit | number | No | Items per page (default: 20, min: 1, max: 100) |
search | string | No | Search term to filter by name, email, phone, or WhatsApp number |
Response 200 OK
{
"referrals": [
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "John Doe",
"email": "john.doe@example.com",
"countryCode": "+1",
"phone": "1234567890",
"whatsappNumber": "+11234567890",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Workspace not found
- 500 Internal Server Error: Server error