---
agentTools:
  projectIndex: https://uspacy.readme.io/llms.txt
---

# Edit kanban stage

Updates a kanban stage. Only provided fields are changed.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "CRM service",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://{domain}.uspacy.ua",
      "description": "Ukrainian server"
    },
    {
      "url": "https://{domain}.uspacy.eu",
      "description": "EU server"
    },
    {
      "url": "https://{domain}.uspacy.com.br",
      "description": "Brazilian server"
    },
    {
      "url": "https://{domain}.uspacy.com",
      "description": "International server"
    }
  ],
  "tags": [
    {
      "name": "pipeline",
      "description": "Funnels, kanban stages, and reasons"
    }
  ],
  "paths": {
    "/crm/v1/entities/{entity}/kanban/stage/{stageId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/entity"
        },
        {
          "$ref": "#/components/parameters/stageId"
        }
      ],
      "patch": {
        "tags": [
          "pipeline"
        ],
        "summary": "Edit kanban stage",
        "description": "Updates a kanban stage. Only provided fields are changed.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCrmStage"
              },
              "example": {
                "title": "Work In Progress",
                "color": "#03A9F4"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmStage"
                },
                "example": {
                  "title": "Work In Progress",
                  "color": "#03A9F4",
                  "stage_code": "in_progress",
                  "system_stage": false,
                  "sort": 20,
                  "reasons": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Access token is missing or invalid"
      },
      "ValidationError": {
        "description": "Validation error response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "field_name": [
                      "The field_name field is required."
                    ]
                  }
                },
                "status": {
                  "type": "boolean",
                  "example": true
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "entity": {
        "name": "entity",
        "in": "path",
        "description": "Entity table name",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "leads",
            "deals",
            "contacts",
            "companies"
          ]
        },
        "example": "leads"
      },
      "stageId": {
        "name": "stageId",
        "in": "path",
        "description": "Stage ID",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "CreateCrmStage": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "New Deal"
          },
          "color": {
            "type": "string",
            "example": "#6AD01F"
          },
          "sort": {
            "type": "integer",
            "example": 10
          }
        }
      },
      "CrmStage": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "New Deal"
          },
          "color": {
            "type": "string",
            "example": "#6AD01F"
          },
          "stage_code": {
            "type": "string",
            "example": "new_deal"
          },
          "system_stage": {
            "type": "boolean",
            "example": false
          },
          "sort": {
            "type": "integer",
            "example": 10
          },
          "reasons": {
            "type": "string",
            "example": []
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 145,
      "2": 108,
      "3": 28,
      "4": 165,
      "5": 162,
      "6": 20,
      "7": 148,
      "8": 43,
      "9": 242,
      "10": 235,
      "11": 56
    }
  }
}
```