# addPropertiesToList

Add properties to one or more lists (list ids from searchPropertyTags). ASYNC bulk-task op: returns bulkTaskId before the change applies; poll getBulkTask. TWO selection forms, never combined (ids with a filter is rejected). EXPLICIT: `propertyIds` (esIds) with `totalCount` = how many. FILTER-BACKED: `filterId` (saved; must be visible to the key owner (a teammate's private filter is refused) OR `filterTree` (inline, saveFilter's DSL, parsed STRICTLY) an unknown fieldId rejects the call) with `selectAll: true` for EVERY match or `selectCount: N` for the first N in the runner's DEFAULT traversal order: NOT the `sort` you previewed with on filterProperties, which the bulk task does not take; for a sorted top-N, pass that sorted page's ids as `propertyIds` (one window, not both; neither is REFUSED). An inline filterTree has no saved areas: save one with inSavedAreas and pass its filterId. `excludeIds` applies to a filter-backed selection only (on the explicit form, leave the id out). `totalCount` is an EXECUTION CAP the task stops at. It is DERIVED server-side for explicit ids (their count) and for `selectCount: N` (N (exclusions are not subtracted, the runner drops them as it goes)) whatever you send is ignored there, and a negative value is rejected (and TRUSTED only for `selectAll: true`: pass the filter's `total` from filterProperties UNSUBTRACTED (never minus `excludeIds`) the runner handles exclusions). An understated select-all count silently turns it into a partial write, so round UP. Pass the same `includeIncompleteRecords` you used on filterProperties. A filter-backed selection can touch thousands of properties in one call: state the match count to the user and get a go-ahead BEFORE submitting one.

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

## Variables

- `propertyIds`: `[String!]`
- `filterId`: `ID`
- `filterTree`: `JSON`
- `selectAll`: `Boolean` (default `false`)
- `selectCount`: `Int`
- `excludeIds`: `[String!]`
- `includeIncompleteRecords`: `Boolean`
- `listIds`: `[String!]!` (required)
- `totalCount`: `Int!` (required)

## Response (data, an example)

```json
{
  "propertyMutation": {
    "addPropertiesToList": {
      "mode": "SYNC",
      "bulkTaskId": "…"
    }
  }
}
```

## 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": "addPropertiesToList",
    "variables": {
      "listIds": [
        "<String>"
      ],
      "totalCount": 10
    }
  }'
```
