# fileLibraryItemsOnContact

Put Library items on a contact's Files & Photos, as the contact's Attach › From Library does: a snapshot copy of each file (up to 20, 300 MB each), and a PAGE as its PDF printed now as you see it. Ids are Library item ids (searchSpaceItems, listSpaceFolder, a page's id), never a chat artifactId. Returns each copy (`uploadedFileId`, `fileName`); undo with removeContactFiles (the copy's `uploadedFileId`). Never put a Library item on a record as a link.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "fileLibraryItemsOnContact", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `itemIds`: `[ID!]!` (required)
- `contactId`: `ID!` (required)

## Response (data, an example)

```json
{
  "spacesMutation": {
    "fileOnContact": [
      {
        "uploadedFileId": "<ID>",
        "itemId": "<ID>",
        "fileName": "…",
        "contentType": "…",
        "sizeBytes": 0
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "fileLibraryItemsOnContact",
    "variables": {
      "itemIds": [
        "<itemIds>"
      ],
      "contactId": "<contactId>"
    }
  }'
```
