# setPipelineItemUserRole

The USER role a teammate on the pipeline item plays. roleId null clears it. An Only-one role moves off its previous holder.

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

## Variables

- `pipelineItemId`: `ID!` (required)
- `userId`: `ID!` (required)
- `roleId`: `ID`

## Response (data, an example)

```json
{
  "pipelineItemMutation": {
    "setPipelineItemUserRole": {
      "id": "<ID>",
      "userRoles": [
        {
          "userId": "<ID>",
          "role": {
            "id": "<ID>",
            "name": "…"
          }
        }
      ]
    }
  }
}
```

## 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": "setPipelineItemUserRole",
    "variables": {
      "pipelineItemId": "<pipelineItemId>",
      "userId": "<userId>"
    }
  }'
```
