# setDealDetailTabs

Replace one pipeline's deal-sheet tabs for everyone (getDealDetailTabs first, and pass its version as expectedVersion: a stale one is refused). Owner pipelines only.

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

## Variables

- `pipelineId`: `ID!` (required)
- `expectedVersion`: `Int!` (required)
- `tabs`: `[PipelineItemLayoutTabInput!]!` (required)
  - `name`: `String!` (required)
  - `fieldReferences`: `[String!]!` (required)

## Response (data, an example)

```json
{
  "dealMutation": {
    "updatePipelineDetailLayout": {
      "version": 0,
      "tabs": [
        {
          "id": "<ID>",
          "name": "…",
          "fieldReferences": [
            "…"
          ]
        }
      ]
    }
  }
}
```

## 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": "setDealDetailTabs",
    "variables": {
      "pipelineId": "<pipelineId>",
      "expectedVersion": 10,
      "tabs": [
        {
          "name": "<String>",
          "fieldReferences": [
            "<String>"
          ]
        }
      ]
    }
  }'
```
