---
title: "Reset company stage derivation"
method: POST
path: "/api/pipeline-stages/reset-derivation"
tags: ["pipeline_stages"]
---

# Reset company stage derivation

`POST /api/pipeline-stages/reset-derivation`

## Request

- Base URL: `https://beta.getsales.io/playtables/v1`
- URL: `https://beta.getsales.io/playtables/v1/api/pipeline-stages/reset-derivation`
- Auth: HTTP bearer and API key in header `Team-SID`

Company-only: hand the listed companies back to the automatic stage derivation. A company is pinned when someone moves it by hand (pipeline_stage_source manual) and stops following its member people; this clears the pin and re-derives each one in the background, so a stage may change as soon as the job runs. Companies not pinned are re-derived anyway and count in reset_count. Person stages are never pinned or derived.

Contract:
- MCP tool `reset_pipeline_stages_derivation`, registry package `mcp.playtables/pipeline_stages`, mount `playtables.pipeline`.
- Operation `action`, response envelope `action`.
- Flags: mass action: this verb's own request accepts a filter or targets[] set, which the owning service drains.

## Request body

- ResetPipelineStagesDerivationRequest: Request body of `reset_pipeline_stages_derivation`.
  - `company_sids` string[], required: The companies to unpin, at least one. A non-company sid is rejected. The backend states no upper bound, but each entry is its own transaction plus its own re-derive job, so keep a call to a few hundred.

## Response `200`

`action` success envelope.

- ResetPipelineStagesDerivationResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` unknown, required
  - `result` object, required
    - `reset_count` integer, required: Companies processed. A company that was not pinned counts too: it is re-derived either way.
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/revisions/aa394506515d?raw)
