---
title: "Create pipeline stage"
method: POST
path: "/api/pipeline-stages"
tags: ["pipeline_stages"]
---

# Create pipeline stage

`POST /api/pipeline-stages`

## Request

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

Add one CUSTOM stage to the end of a pipeline: type is forced to custom, key stays null (system stages exist only in the seeded default sets) and order is assigned as max+1, so sending any of the three is refused. A name colliding with a live stage of the same (team, object) is a 409 duplicate_rejected carrying existing_sid: no dedup-return, so already_exists is always false. To place it anywhere but the end, follow with update_pipeline_stage(order).

Contract:
- MCP tool `create_pipeline_stage`, registry package `mcp.playtables/pipeline_stages`, mount `playtables.pipeline`.
- Operation `create`, response envelope `create`.
- Flags: none.

## Request body

- CreatePipelineStageRequest: Request body of `create_pipeline_stage`.
  - `object` 'person' | 'company', required: Which pipeline to append the stage to: person (leads) or company (accounts). Immutable afterwards.
  - `name` string, required: Stage label, 1..255. Must not collide with a live stage of the same (team, object), compared case-insensitively (409 duplicate_rejected, context.existing_sid).
  - `category` 'cold' | 'approaching' | 'engaging' | 'positive' | 'nurture' | 'negative' | 'disqualified', required: Funnel bucket for the new stage. Drives the chip color and, for a person stage, what a company derives from a member sitting here.

## Response `200`

`create` success envelope.

- CreatePipelineStageResponse
  - `success` true, required
  - `operation` 'create', required
  - `item` object, required
    - `sid` string, required: Pipeline stage sid (cr_ps_…) - the value people.pipeline_stage_sid / companies.pipeline_stage_sid store.
    - `team_sid` string, required: Owning team (ts_tm_…, external - gs.service.id).
    - `object` 'person' | 'company', required: Which pipeline this stage belongs to: person (leads) | company (accounts). Immutable after create.
    - `name` string, required: Stage label (1..255), unique per (team, object) among live rows, case-insensitively.
    - `category` 'cold' | 'approaching' | 'engaging' | 'positive' | 'nurture' | 'negative' | 'disqualified', required: Funnel bucket, one of seven: the grouping of the company card and the grid, the chip colour, the funnel analytics and the company derivation (positive > engaging > approaching > nurture > negative > cold; a person on a disqualified stage is not an active member of the account). negative = a real no (Not interested); disqualified = not a target, filtered out (Wrong Decision Maker, Disqualified). Locked on a system stage (key != null).
    - `created_by` object, required: Actor that created the stage (AccessIdentityValue); the seeded system stages carry the system identity.
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `key` string, nullable, required: Stable snake_case anchor on SYSTEM stages ('new_contact', 'company_opportunity', …), the target the auto-transition engine resolves; null = a custom stage. key != null is what makes a stage system: locked category, non-deletable. Read-only.
    - `order` integer, nullable, required: Position within its (team, object) pipeline, contiguous 1..N, and the forward-only rank for a person (a target stage is only auto-entered when its order >= the current one). 0 = pulled out of the ordering (a soft-deleted row).
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC; bumped by rename / recategorize / reorder.
    - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live (soft delete).
  - `already_exists` boolean, required
  - `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)
