# removeDealFile

Detach one file from a deal by fileId (fileIds come from listDealFiles). This removes the link only: the underlying stored file/bytes are not deleted. Removing a file that is not on the deal, or already removed, is a no-op. Returns the deal id. The deal must be in a pipeline owned by or shared with your organization.

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

## Variables

- `dealId`: `ID!` (required)
- `fileId`: `ID!` (required)

## Response (data, an example)

```json
{
  "dealMutation": {
    "removeDealFiles": {
      "id": "<ID>"
    }
  }
}
```

## 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": "removeDealFile",
    "variables": {
      "dealId": "<dealId>",
      "fileId": "<fileId>"
    }
  }'
```
