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

# Get connection clients

> List clients from a provider connection

Query the list of clients available from a provider connection. This allows Filed to discover clients from your platform.

```graphql theme={null}
query GetConnectionClients($workspaceId: ID!, $connectionId: ID!, $options: JSON) {
  me {
    workspaces(filters: { ids: [$workspaceId] }) {
      id
      connections(filters: { ids: [$connectionId] }) {
        id
        clients(options: $options) {
          id
          name
          email
          phone
          type
          lastModified
        }
      }
    }
  }
}
```

<Info>
  **Query Pattern**: Clients are accessed through the `ProviderConnection` type. Query connections from a workspace, then access the `clients` field on the connection.
</Info>

## Arguments

<ParamField path="workspaceId" type="ID!" required>
  The ID of the workspace containing the provider connection.
</ParamField>

<ParamField path="connectionId" type="ID!" required>
  The ID of the provider connection. This identifies which integration connection to query clients from.
</ParamField>

<ParamField path="options" type="JSON">
  Optional query parameters for filtering or pagination. The exact options depend on your platform's implementation and will be coordinated with Filed during integration setup.
</ParamField>

## Returns

<ResponseField name="id" type="String!">
  Client identifier from your platform.
</ResponseField>

<ResponseField name="name" type="String">
  Client name.
</ResponseField>

<ResponseField name="email" type="String">
  Client email address.
</ResponseField>

<ResponseField name="phone" type="String">
  Client phone number.
</ResponseField>

<ResponseField name="type" type="String">
  Client type or category.
</ResponseField>

<ResponseField name="lastModified" type="Date">
  Timestamp when the client was last modified in your platform.
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://gateway.filed.com/graphql \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <accessToken>" \
    -H "source-platform: my-sample-platform" \
    -d '{
      "query": "query GetConnectionClients($workspaceId: ID!, $connectionId: ID!, $options: JSON) { me { workspaces(filters: { ids: [$workspaceId] }) { id connections(filters: { ids: [$connectionId] }) { id clients(options: $options) { id name email phone type lastModified } } } } }",
      "variables": {
        "workspaceId": "workspace_123456",
        "connectionId": "connection_789",
        "options": {
          "limit": 100,
          "offset": 0
        }
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "me": {
        "workspaces": [
          {
            "id": "workspace_123456",
            "connections": [
          {
            "id": "connection_789",
            "clients": [
          {
            "id": "client-12345",
            "name": "John Smith",
            "email": "john.smith@example.com",
            "phone": "+1-555-0123",
            "type": "individual",
            "lastModified": "2024-01-15T08:00:00Z"
          },
          {
            "id": "client-67890",
            "name": "Jane Doe",
            "email": "jane.doe@example.com",
            "phone": "+1-555-0456",
            "type": "individual",
            "lastModified": "2024-01-14T10:30:00Z"
          }
            ]
          }
        ]
          }
        ]
      }
    }
  }
  ```
</ResponseExample>

<Note>
  To query files for a specific client, use [get client files](/legacy/apis/endpoint/get-client-files) with the client ID returned from this query.
</Note>

## Troubleshooting

**Problem**: No clients returned or empty list

**Solutions**:

* Verify the connection status is `active`
* Check that your platform has clients available for this connection
* Review the `options` parameter to ensure filters aren't excluding all clients
* Verify the connection credentials have permission to access client data

**Problem**: Connection not found

**Solutions**:

* Verify the `connectionId` exists and belongs to your workspace
* Ensure you're using the correct connection ID from the connection setup
* Check that the connection status allows querying clients
