# listSpaceContactFiles

Records › Contact files: attachments and voicemails contacts sent or received, newest first. Filter by `contactId`, `dealId` (any contact on the deal), `channel`, `direction`, or `query` (the file's or the contact's name). Only files whose contact you may open. Each row's `source` says where it came from (a text thread, an email subject, a call). Page with `after` = `nextCursor`.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listSpaceContactFiles", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no
- Result cap: `limit` is clamped to 50, without an error

## Variables

- `filter`: `SpacesContactFilesFilter`
  - `channel`: `SpacesContactFileChannel` (one of `TEXT`, `EMAIL`, `VOICEMAIL`). Where a contact file came in.
  - `contactId`: `ID`
  - `createdAfter`: `DateTime`. Only files that came in after this moment.
  - `pipelineItemId`: `ID`. Files from any contact on this deal.
  - `dealId`: `ID`
  - `direction`: `SpacesRecordDirection` (one of `RECEIVED`, `SENT`). Which way a record moved, from the organization's side.
  - `query`: `String`. Matches the file name, the contact's name, or the words a texted file came with.
- `limit`: `Int` (default `50`)
- `after`: `String`

## Response (data, an example)

```json
{
  "spacesQuery": {
    "records": {
      "contactFiles": {
        "nodes": [
          {
            "id": "<ID>",
            "name": "…",
            "contentType": "…",
            "createdAt": "2026-01-01T00:00:00.000Z",
            "contact": {
              "id": "<ID>",
              "name": "…"
            },
            "source": {
              "channel": "TEXT",
              "direction": "RECEIVED",
              "textConversationId": "<ID>",
              "phoneNumber": "…",
              "emailSubject": "…",
              "callId": "<ID>"
            }
          }
        ],
        "hasNextPage": true,
        "nextCursor": "…"
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listSpaceContactFiles",
    "variables": {}
  }'
```
