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

# List Published Customer Profiles

> Retrieve a paginated, searchable list of published customer profiles shown in the member directory.

# List Published Customer Profiles

Returns customer profiles that have opted in to the member directory (`ProfileIsPublic: true`). Supports free-text search, tag filtering, and sort ordering. The portal uses this to render the member directory listing and to power the customer tag input autocomplete.

## Authentication

Requires a valid customer bearer token.

## Query Parameters

<ParamField query="query" type="string">
  Free-text search string matched against the customer's name, company, position, bio, and tags. Pass an empty string to return all published
  profiles.
</ParamField>

<ParamField query="tag" type="string">
  Filter results to customers whose `ProfileTagsList` contains this exact tag value. Pass an empty string to skip tag filtering.
</ParamField>

<ParamField query="order" type="number">
  Sort order for results. **Default**: `1` (alphabetical by name). Check the directory meta endpoint for available order options.
</ParamField>

<ParamField query="_shape" type="string">
  Comma-separated list of field paths to include in the response. When provided, only the
  specified fields are returned — useful for reducing payload size. Supports nested paths
  using dot notation. Example: `_shape=Records.FullName,Records.CompanyName,Records.AvatarUrl,TotalItems`.
</ParamField>

## Response

Returns an `ApiListResult<Coworker>` — a paginated wrapper containing an array of published customer profiles.

### Pagination

<ResponseField name="Records" type="Coworker[]">
  Array of published customer profiles for the current page.
</ResponseField>

<ResponseField name="CurrentPage" type="number">
  Current page number (1-based).
</ResponseField>

<ResponseField name="TotalItems" type="number">
  Total number of matching published profiles.
</ResponseField>

<ResponseField name="TotalPages" type="number">
  Total number of pages.
</ResponseField>

<ResponseField name="HasNextPage" type="boolean">
  Whether there are more pages after the current one.
</ResponseField>

<ResponseField name="HasPreviousPage" type="boolean">
  Whether there are pages before the current one.
</ResponseField>

### Coworker Fields (within `Records[]`)

<ResponseField name="Records[].Id" type="number">
  Unique numeric identifier for the customer profile. Use as `coworkerId` in `GET /api/public/coworkers/published/{coworkerId}`.
</ResponseField>

<ResponseField name="Records[].UniqueId" type="string">
  Globally unique identifier for the profile.
</ResponseField>

<ResponseField name="Records[].FullName" type="string">
  Customer's display name.
</ResponseField>

<ResponseField name="Records[].GuessedFirstName" type="string">
  First name extracted from `FullName` for use in personalised UI text.
</ResponseField>

<ResponseField name="Records[].AvatarUrl" type="string">
  URL to the customer's avatar image.
</ResponseField>

<ResponseField name="Records[].Position" type="string | null">
  Job title.
</ResponseField>

<ResponseField name="Records[].CompanyName" type="string">
  Company name.
</ResponseField>

<ResponseField name="Records[].BusinessArea" type="string | null">
  Industry or area of work.
</ResponseField>

<ResponseField name="Records[].ProfileSummary" type="string | null">
  Professional bio. May contain Markdown.
</ResponseField>

<ResponseField name="Records[].ProfileWebsite" type="string | null">
  Personal or company website URL.
</ResponseField>

<ResponseField name="Records[].ProfileTagsList" type="array">
  Array of tag strings from the customer's profile.
</ResponseField>

<ResponseField name="Records[].InvoicingSpaceName" type="string">
  Display name of the location this customer is invoiced at.
</ResponseField>

### Social Media (within `Records[]`)

| Field       | Type             | Description                    |
| ----------- | ---------------- | ------------------------------ |
| `Twitter`   | `string \| null` | Twitter profile URL or handle  |
| `Linkedin`  | `string \| null` | LinkedIn profile URL           |
| `Github`    | `string \| null` | GitHub profile URL or username |
| `Instagram` | `string \| null` | Instagram handle or URL        |
| `Facebook`  | `string \| null` | Facebook profile URL           |
| `Skype`     | `string \| null` | Skype username                 |
| `Telegram`  | `string \| null` | Telegram username              |

## Example Response

```json theme={null}
{
  "Records": [
    {
      "Id": 101,
      "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "FullName": "Jane Doe",
      "GuessedFirstName": "Jane",
      "AvatarUrl": "https://nexudushq.spaces.nexudus.com/media/coworker/101/avatar",
      "Position": "Product Designer",
      "CompanyName": "Acme Design Co.",
      "BusinessArea": "Design",
      "ProfileSummary": "Jane specialises in design systems and user research.",
      "ProfileWebsite": "https://janedoe.design",
      "ProfileTagsList": ["UX", "Design Systems", "Research"],
      "InvoicingSpaceName": "Nexudus HQ",
      "Linkedin": "https://linkedin.com/in/janedoe",
      "Twitter": null
    }
  ],
  "CurrentPage": 1,
  "TotalItems": 42,
  "TotalPages": 5,
  "HasNextPage": true,
  "HasPreviousPage": false
}
```

## TypeScript Integration

```typescript theme={null}
import endpoints from '@/api/endpoints'
import { Coworker } from '@/types/spaces/Coworker'
import { ApiListResult } from '@/types/ApiListResult'
import { useData } from '@/api/fetchData'

const url = endpoints.coworkers.directory.published_list(searchQuery, selectedTag, sortOrder)
// => '/api/public/coworkers/published?query=design&tag=UX&order=1'

const { resource: members } = useData<ApiListResult<Coworker>>(httpClient, url)
```

## Usage in Portal

| Context                         | Source file                                                    |
| ------------------------------- | -------------------------------------------------------------- |
| Member directory listing page   | `src/views/community/directory/components/useDirectoryData.ts` |
| Customer tag autocomplete input | `src/components/CoworkerTagInput.tsx`                          |

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The bearer token is missing, expired, or invalid.
</ResponseField>

## Related Endpoints

| Method | Endpoint                                               | Description                               |
| ------ | ------------------------------------------------------ | ----------------------------------------- |
| `GET`  | `/api/public/coworkers/published/{coworkerId}`         | Get a single published customer profile   |
| `GET`  | `/api/public/coworkers/published/{coworkerId}/related` | Get related profiles for a customer       |
| `GET`  | `/api/public/coworkers/directory/meta`                 | Get directory configuration and tag cloud |
