# addPipelineStages

Append one or more stages to a pipeline (by pipelineId). Each stage: name (required), plus optional description, order, isTerminal, terminalType (WON|LOST|NEUTRAL), winProbability (0-100). Owner-only: the pipeline must be OWNED by your organization. Returns the pipeline with its full, ordered stage list.

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

## Variables

- `pipelineId`: `ID!` (required)
- `stages`: `[PipelineStageCreateInput!]!` (required)
  - `name`: `String!` (required)
  - `description`: `String`
  - `order`: `Float`
  - `isTerminal`: `Boolean`
  - `terminalType`: `PipelineStageTerminalType` (one of `WON`, `LOST`, `NEUTRAL`)
  - `winProbability`: `Int`

## Response (data, an example)

```json
{
  "dealMutation": {
    "createDealStages": {
      "id": "<ID>",
      "name": "…",
      "stages": [
        {
          "id": "<ID>",
          "name": "…",
          "order": 0,
          "isTerminal": true,
          "terminalType": "WON",
          "winProbability": 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": "addPipelineStages",
    "variables": {
      "pipelineId": "<pipelineId>",
      "stages": [
        {
          "name": "<String>"
        }
      ]
    }
  }'
```
