Updates a ticket in place. Only the fields you send are written. This is also how you close a ticket and record whether it was won or lost.To move a ticket between pipeline stages, use POST /v1/crm/tickets/:id/stage instead — stage transitions run pipeline rules that a plain field write does not.
just_closed is true only on the request that flipped the ticket from open to closed, and action is closed on that same request and updated otherwise. Use just_closed to fire “deal won” side effects exactly once — a repeated PATCH with the same body returns false.
Prefer add_tag_ids / remove_tag_ids over tag_ids. The plural-only form replaces the list wholesale, so two systems tagging the same ticket will clobber each other.
custom_fields replaces too. Read the ticket first if you only mean to set one key.
Reopening a ticket is {"is_closed": false}. The previous resolution is not cleared automatically — send it explicitly if it no longer applies.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"KeebAI","colors":{"primary":"#0A0A0A","light":"#47BBF5","dark":"#47BBF5"},"logo":{"light":"https://mintcdn.com/keebai/4fPpSJudv6COSabU/logo/light.svg?fit=max\u0026auto=format\u0026n=4fPpSJudv6COSabU\u0026q=85\u0026s=e9d57c894f15d41b379236cde0e91b72","dark":"https://mintcdn.com/keebai/4fPpSJudv6COSabU/logo/dark.svg?fit=max\u0026auto=format\u0026n=4fPpSJudv6COSabU\u0026q=85\u0026s=6c8eb0f812de19aa554c329a2d98729c"},"favicon":"https://mintcdn.com/keebai/4fPpSJudv6COSabU/favicon.svg?fit=max\u0026auto=format\u0026n=4fPpSJudv6COSabU\u0026q=85\u0026s=c946f52626818858ed67d6ab203e67f2","api":{"openapi":"https://api.keebai.com/v1/docs-json","playground":{"display":"interactive"},"examples":{"prefill":true}},"appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://status.keebai.com","label":"Status"},{"href":"mailto:support@keebai.com","label":"Support"}],"primary":{"type":"button","label":"Open Keebai","href":"https://app.keebai.com"}},"footer":{"socials":{"x":"https://x.com/keebai","linkedin":"https://linkedin.com/company/keebai","github":"https://github.com/keebai"}},"fonts":{"family":"Inter"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":false},"contextual":{"options":["copy"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"keebai","hasAudioNarration":false,"actualSubdomain":"keebai","customDomains":["docs.keebai.com"],"gitSource":{"type":"github","owner":"keebai-ai","repo":"docs","deployBranch":"main","isPrivate":false,"contentDirectory":"","mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6af52f991cc64d85fee5cef8","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Agents","count":49},{"language":"default","tag":"Messaging","count":29},{"language":"default","tag":"CRM","count":24},{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"Ecommerce","count":17},{"language":"default","tag":"Loyalty","count":14},{"language":"default","tag":"Scheduling","count":14},{"language":"default","tag":"Get started","count":12},{"language":"default","tag":"Agent tests","count":7},{"language":"default","tag":"WhatsApp Flows","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar div:has(>div>.nav-tabs){position:static}@media (min-width: 1024px){#navbar .nav-tabs{position:absolute;top:0;left:50%;transform:translateX(-50%);height:3.5rem}}"}],"page":{"pagePath":"dev/endpoints/crm-ticket-update","slug":"/dev/endpoints/crm-ticket-update","pageMetadata":{"title":"PATCH /v1/crm/tickets/:id","sidebarTitle":"PATCH crm/tickets/{id}","description":"Partially update a ticket — close it, reassign it, retag it, or record its value.","openapi":"PATCH /v1/crm/tickets/{id}","href":"/dev/endpoints/crm-ticket-update"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Partially update a ticket — close it, reassign it, retag it, or record its value.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Updates a ticket in place. Only the fields you send are written. This is also how you `,_jsx(_components.strong,{children:`close`}),` a ticket and record whether it was won or lost.`]}),`\n`,_jsxs(_components.p,{children:[`To move a ticket between pipeline stages, use `,_jsx(_components.a,{href:`/dev/endpoints/crm-ticket-stage`,children:_jsx(_components.code,{children:`POST /v1/crm/tickets/:id/stage`})}),` instead — stage transitions run pipeline rules that a plain field write does not.`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`PATCH https://api.keebai.com/v1/crm/tickets/{id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`required-scope`,children:`Required scope`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`crm:tickets:write`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bearer kbai_pk_\u003ctoken>`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ObjectId`}),` of the ticket.`]})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(_components.p,{children:`All fields optional. Send only what changes.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`is_closed`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsx(_components.td,{children:`Closes or reopens the ticket.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolution`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`won`}),` or `,_jsx(_components.code,{children:`lost`}),`. Meaningful when closing.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`priority`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[`One of `,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`urgent`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`category`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Free-text category.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`assigned_to`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ObjectId`}),` of the new owner.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`custom_fields`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsx(_components.td,{children:`Replaces the whole custom fields object.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`Monetary value of the opportunity.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_currency`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`ISO 4217 currency.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_status`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`estimated`}),` or `,_jsx(_components.code,{children:`confirmed`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tag_ids`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Replaces`}),` the whole tag list.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`add_tag_ids`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:`Adds tags, leaving existing ones alone.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`remove_tag_ids`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:`Removes tags, leaving the rest alone.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`conversation_summary`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{ motivo, estado, proximos_pasos, is_final }`}),`, all optional.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.keebai.com/v1/crm/tickets/65f4b5c6d7e8f9a0b1c2d3e4`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_closed\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"won\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 180000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount_status\": \"confirmed\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"add_tag_ids\": [\"69f1a2b3c4d5e6f7a8b9c0d1\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`16`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://api.keebai.com/v1/crm/tickets/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ticketId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PATCH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`KEEBAI_API_TOKEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` is_closed:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resolution:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"won\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount_status:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"confirmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.patch(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.keebai.com/v1/crm/tickets/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ticket_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'KEEBAI_API_TOKEN'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_closed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"won\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"confirmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resp.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.json()`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`200-ok`,children:`200 OK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ticket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"65f4b5c6d7e8f9a0b1c2d3e4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_closed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"won\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`180000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount_currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLP\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"confirmed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"closed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-05-02T16:10:22.114Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-05-02T16:10:22.114Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"just_closed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"closed\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`just_closed`}),` is `,_jsx(_components.code,{children:`true`}),` only on the request that flipped the ticket from open to closed, and `,_jsx(_components.code,{children:`action`}),` is `,_jsx(_components.code,{children:`closed`}),` on that same request and `,_jsx(_components.code,{children:`updated`}),` otherwise. Use `,_jsx(_components.code,{children:`just_closed`}),` to fire “deal won” side effects exactly once — a repeated `,_jsx(_components.code,{children:`PATCH`}),` with the same body returns `,_jsx(_components.code,{children:`false`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`400-bad-request`,children:`400 Bad Request`}),`\n`,_jsxs(_components.p,{children:[`An enum value outside the allowed set, a malformed `,_jsx(_components.code,{children:`ObjectId`}),`, or a property the endpoint does not accept.`]}),`\n`,_jsx(Heading,{level:`3`,id:`401-unauthorized`,children:`401 Unauthorized`}),`\n`,_jsx(_components.p,{children:`Missing, invalid, revoked, or expired token.`}),`\n`,_jsx(Heading,{level:`3`,id:`403-forbidden`,children:`403 Forbidden`}),`\n`,_jsxs(_components.p,{children:[`The token does not have the `,_jsx(_components.code,{children:`crm:tickets:write`}),` scope.`]}),`\n`,_jsx(Heading,{level:`3`,id:`404-not-found`,children:`404 Not Found`}),`\n`,_jsx(_components.p,{children:`No ticket with that id, or the ticket belongs to a different company.`}),`\n`,_jsx(Heading,{level:`2`,id:`operational-notes`,children:`Operational notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Prefer `,_jsx(_components.code,{children:`add_tag_ids`}),` / `,_jsx(_components.code,{children:`remove_tag_ids`}),` over `,_jsx(_components.code,{children:`tag_ids`}),`.`]}),` The plural-only form replaces the list wholesale, so two systems tagging the same ticket will clobber each other.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`custom_fields`}),` replaces too.`]}),` Read the ticket first if you only mean to set one key.`]}),`\n`,_jsxs(_components.li,{children:[`Reopening a ticket is `,_jsx(_components.code,{children:`{\"is_closed\": false}`}),`. The previous `,_jsx(_components.code,{children:`resolution`}),` is not cleared automatically — send it explicitly if it no longer applies.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"PATCH /v1/crm/tickets/:id","sidebarTitle":"PATCH crm/tickets/{id}","description":"Partially update a ticket — close it, reassign it, retag it, or record its value.","openapi":"PATCH /v1/crm/tickets/{id}","href":"/dev/endpoints/crm-ticket-update"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Required scope","slug":"required-scope","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"200 OK","slug":"200-ok","depth":3,"children":[]},{"title":"400 Bad Request","slug":"400-bad-request","depth":3,"children":[]},{"title":"401 Unauthorized","slug":"401-unauthorized","depth":3,"children":[]},{"title":"403 Forbidden","slug":"403-forbidden","depth":3,"children":[]},{"title":"404 Not Found","slug":"404-not-found","depth":3,"children":[]}]},{"title":"Operational notes","slug":"operational-notes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"PublicTicketsController_update","parameters":["9c45a5e4-d524-46b2-a8c5-daa235703241"],"requestBody":"64ea39a3-19c5-4779-9973-e95d3fa3ffa7","responses":{"200":"9df11a0b-7bae-452f-9adf-4790922f4d16"},"security":["3901d397-6484-4ebe-8390-0aeec930cac7"],"summary":"Actualizar un ticket","tags":["crm-tickets"],"method":"patch","type":"path","servers":["d9585507-49d1-4ff3-9466-9dd0bab3a7d3"],"path":"/v1/crm/tickets/{id}","baseUrlOptions":["https://api.keebai.com"],"title":"Actualizar un ticket","description":"Partially update a ticket — close it, reassign it, retag it, or record its value.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.is_closed":true,"body.category":"\u003cstring>","body.assigned_to":"\u003cstring>","body.custom_fields":{},"body.amount":123,"body.amount_currency":"\u003cstring>","body.tag_ids.items.0":"\u003cstring>","body.add_tag_ids.items.0":"\u003cstring>","body.remove_tag_ids.items.0":"\u003cstring>","body.conversation_summary.motivo":"\u003cstring>","body.conversation_summary.estado":"\u003cstring>","body.conversation_summary.proximos_pasos":"\u003cstring>","body.conversation_summary.is_final":true}]},"dependencies":{"parameters":{"9c45a5e4-d524-46b2-a8c5-daa235703241":{"name":"id","required":true,"in":"path","schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","enum":["won","lost"],"uniqueKey":"resolution","typeLabel":"enum\u003cstring>"},"is_closed":{"type":"boolean","description":"Cierra o reabre el ticket","uniqueKey":"is_closed","typeLabel":"boolean"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"uniqueKey":"priority","typeLabel":"enum\u003cstring>"},"category":{"type":"string","uniqueKey":"category","typeLabel":"string"},"assigned_to":{"type":"string","uniqueKey":"assigned_to","typeLabel":"string"},"custom_fields":{"type":"object","uniqueKey":"custom_fields","typeLabel":"object"},"amount":{"type":"number","uniqueKey":"amount","typeLabel":"number"},"amount_currency":{"type":"string","uniqueKey":"amount_currency","typeLabel":"string"},"amount_status":{"type":"string","enum":["estimated","confirmed"],"uniqueKey":"amount_status","typeLabel":"enum\u003cstring>"},"tag_ids":{"description":"Reemplaza la lista completa de tags","type":"array","items":{"type":"string","uniqueKey":"tag_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"tag_ids","typeLabel":"string[]"},"add_tag_ids":{"description":"Agrega tags sin tocar las existentes","type":"array","items":{"type":"string","uniqueKey":"add_tag_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"add_tag_ids","typeLabel":"string[]"},"remove_tag_ids":{"description":"Quita tags sin tocar las demás","type":"array","items":{"type":"string","uniqueKey":"remove_tag_ids.items.[INDEX]","typeLabel":"string"},"uniqueKey":"remove_tag_ids","typeLabel":"string[]"},"conversation_summary":{"type":"object","properties":{"motivo":{"type":"string","uniqueKey":"conversation_summary.motivo","typeLabel":"string"},"estado":{"type":"string","uniqueKey":"conversation_summary.estado","typeLabel":"string"},"proximos_pasos":{"type":"string","uniqueKey":"conversation_summary.proximos_pasos","typeLabel":"string"},"is_final":{"type":"boolean","uniqueKey":"conversation_summary.is_final","typeLabel":"boolean"}},"uniqueKey":"conversation_summary","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"is_closed":true,"category":"\u003cstring>","assigned_to":"\u003cstring>","custom_fields":{},"amount":123,"amount_currency":"\u003cstring>","tag_ids":["\u003cstring>"],"add_tag_ids":["\u003cstring>"],"remove_tag_ids":["\u003cstring>"],"conversation_summary":{"motivo":"\u003cstring>","estado":"\u003cstring>","proximos_pasos":"\u003cstring>","is_final":true}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"9df11a0b-7bae-452f-9adf-4790922f4d16":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"object","properties":{"_id":{"type":"string","description":"ObjectId del ticket","isRequired":true,"uniqueKey":"ticket._id","typeLabel":"string"},"chat_user":{"type":"string","description":"ObjectId del chat user (contacto)","isRequired":true,"uniqueKey":"ticket.chat_user","typeLabel":"string"},"is_closed":{"type":"boolean","isRequired":true,"uniqueKey":"ticket.is_closed","typeLabel":"boolean"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"isRequired":true,"uniqueKey":"ticket.priority","typeLabel":"enum\u003cstring>"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ObjectId del tag","isRequired":true,"uniqueKey":"ticket.tags.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"ticket.tags.items.[INDEX].name","typeLabel":"string"},"color":{"type":"string","description":"Color hex, ej. #1890ff","uniqueKey":"ticket.tags.items.[INDEX].color","typeLabel":"string"}},"required":["id","name"],"uniqueKey":"ticket.tags.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"ticket.tags","typeLabel":"object[]"},"custom_fields":{"type":"object","isRequired":true,"uniqueKey":"ticket.custom_fields","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"ticket.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"ticket.updated_at","typeLabel":"string\u003cdate-time>"},"chat_user_name":{"type":"string","uniqueKey":"ticket.chat_user_name","typeLabel":"string"},"chat_user_avatar":{"type":"string","uniqueKey":"ticket.chat_user_avatar","typeLabel":"string"},"chat_user_channel":{"type":"string","description":"Canal de origen (whatsapp, instagram…)","uniqueKey":"ticket.chat_user_channel","typeLabel":"string"},"chat_user_channel_id":{"type":"string","uniqueKey":"ticket.chat_user_channel_id","typeLabel":"string"},"stage":{"type":"object","description":"Etapa actual del pipeline. Ausente si el ticket no tiene una.","required":["stage_id"],"properties":{"stage_id":{"type":"string","description":"Etapa de destino dentro del pipeline","isRequired":true,"uniqueKey":"ticket.stage.stage_id","typeLabel":"string"},"prioridad":{"type":"string","description":"Prioridad reportada al mover la etapa","uniqueKey":"ticket.stage.prioridad","typeLabel":"string"},"contexto":{"type":"string","description":"Contexto del movimiento","uniqueKey":"ticket.stage.contexto","typeLabel":"string"},"problema":{"type":"string","description":"Problema detectado","uniqueKey":"ticket.stage.problema","typeLabel":"string"},"recomendaciones":{"type":"string","description":"Recomendaciones para el operador","uniqueKey":"ticket.stage.recomendaciones","typeLabel":"string"}},"uniqueKey":"ticket.stage","typeLabel":"object"},"resolution":{"type":"string","enum":["won","lost"],"uniqueKey":"ticket.resolution","typeLabel":"enum\u003cstring>"},"category":{"type":"string","uniqueKey":"ticket.category","typeLabel":"string"},"assigned_to":{"type":"object","properties":{"id":{"type":"string","description":"ObjectId del usuario","isRequired":true,"uniqueKey":"ticket.assigned_to.id","typeLabel":"string"},"full_name":{"type":"string","uniqueKey":"ticket.assigned_to.full_name","typeLabel":"string"},"email":{"type":"string","uniqueKey":"ticket.assigned_to.email","typeLabel":"string"}},"required":["id"],"uniqueKey":"ticket.assigned_to","typeLabel":"object"},"amount":{"type":"number","uniqueKey":"ticket.amount","typeLabel":"number"},"amount_currency":{"type":"string","description":"Moneda ISO 4217","uniqueKey":"ticket.amount_currency","typeLabel":"string"},"amount_status":{"type":"string","enum":["estimated","confirmed"],"uniqueKey":"ticket.amount_status","typeLabel":"enum\u003cstring>"},"conversation_summary":{"type":"object","properties":{"motivo":{"type":"string","uniqueKey":"ticket.conversation_summary.motivo","typeLabel":"string"},"estado":{"type":"string","uniqueKey":"ticket.conversation_summary.estado","typeLabel":"string"},"proximos_pasos":{"type":"string","uniqueKey":"ticket.conversation_summary.proximos_pasos","typeLabel":"string"},"is_final":{"type":"boolean","uniqueKey":"ticket.conversation_summary.is_final","typeLabel":"boolean"}},"uniqueKey":"ticket.conversation_summary","typeLabel":"object"},"closed_at":{"type":"string","format":"date-time","uniqueKey":"ticket.closed_at","typeLabel":"string\u003cdate-time>"}},"required":["_id","chat_user","is_closed","priority","tags","custom_fields","created_at","updated_at"],"isRequired":true,"uniqueKey":"ticket","typeLabel":"object"},"just_closed":{"type":"boolean","description":"true sólo en la request que pasó el ticket de abierto a cerrado. Útil para disparar efectos una única vez.","isRequired":true,"uniqueKey":"just_closed","typeLabel":"boolean"},"action":{"type":"string","description":"closed | updated","isRequired":true,"uniqueKey":"action","typeLabel":"string"}},"required":["ticket","just_closed","action"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"ticket":{"_id":"\u003cstring>","chat_user":"\u003cstring>","is_closed":true,"priority":"low","tags":[{"id":"\u003cstring>","name":"\u003cstring>","color":"\u003cstring>"}],"custom_fields":{},"created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","chat_user_name":"\u003cstring>","chat_user_avatar":"\u003cstring>","chat_user_channel":"\u003cstring>","chat_user_channel_id":"\u003cstring>","stage":{"stage_id":"\u003cstring>","prioridad":"\u003cstring>","contexto":"\u003cstring>","problema":"\u003cstring>","recomendaciones":"\u003cstring>"},"resolution":"won","category":"\u003cstring>","assigned_to":{"id":"\u003cstring>","full_name":"\u003cstring>","email":"\u003cstring>"},"amount":123,"amount_currency":"\u003cstring>","amount_status":"estimated","conversation_summary":{"motivo":"\u003cstring>","estado":"\u003cstring>","proximos_pasos":"\u003cstring>","is_final":true},"closed_at":"2023-11-07T05:31:56Z"},"just_closed":true,"action":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3901d397-6484-4ebe-8390-0aeec930cac7":{"PAT":{"scheme":"bearer","bearerFormat":"kbai_pk_\u003chex>","type":"http","description":"Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal con permiso `developer.manage_tokens`.","scopes":[],"schemeName":"PAT"}}},"servers":{"d9585507-49d1-4ff3-9466-9dd0bab3a7d3":{"url":"https://api.keebai.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"scheme":"bearer","bearerFormat":"kbai_pk_\u003chex>","type":"http","description":"Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal con permiso `developer.manage_tokens`.","scopes":[],"schemeName":"PAT"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal con permiso `developer.manage_tokens`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"PAT","name":"Authorization"}],"title":"PAT"}]},"originalFileLocation":"https://api.keebai.com/v1/docs-json"},"subdomain":"keebai","siteName":"KeebAI","title":"PATCH /v1/crm/tickets/:id - KeebAI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-06T23:54:09.328Z","originalFileLocation":"dev/endpoints/crm-ticket-update.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Partially update a ticket — close it, reassign it, retag it, or record its value.\">\u003cmeta data-mint-head name=\"application-name\" content=\"KeebAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"PATCH /v1/crm/tickets/:id - KeebAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Partially update a ticket — close it, reassign it, retag it, or record its value.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"KeebAI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.keebai.com/dev/endpoints/crm-ticket-update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://keebai.mintlify.site/_mintlify/api/og/v2?division=Tickets\u0026amp;title=PATCH+%2Fv1%2Fcrm%2Ftickets%2F%3Aid\u0026amp;description=Partially+update+a+ticket+%E2%80%94+close+it%2C+reassign+it%2C+retag+it%2C+or+record+its+value.\u0026amp;theme=5f8ef6626ccce718ef8625d0\u0026amp;signature=02252b69c4c46ba34a1ebc8c3fbf62afa250a97b83380732c1ae1f67bfdda4ae\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"PATCH /v1/crm/tickets/:id - KeebAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Partially update a ticket — close it, reassign it, retag it, or record its value.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://keebai.mintlify.site/_mintlify/api/og/v2?division=Tickets\u0026amp;title=PATCH+%2Fv1%2Fcrm%2Ftickets%2F%3Aid\u0026amp;description=Partially+update+a+ticket+%E2%80%94+close+it%2C+reassign+it%2C+retag+it%2C+or+record+its+value.\u0026amp;theme=5f8ef6626ccce718ef8625d0\u0026amp;signature=02252b69c4c46ba34a1ebc8c3fbf62afa250a97b83380732c1ae1f67bfdda4ae\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/keebai/kihrOc7IVMcbU56A/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"KeebAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A0A0A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.keebai.com/dev/endpoints/crm-ticket-update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/dev/endpoints/crm-ticket-update.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.keebai.com/#organization\",\"name\":\"KeebAI\",\"url\":\"https://docs.keebai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/keebai/4fPpSJudv6COSabU/logo/light.svg?fit=max\u0026auto=format\u0026n=4fPpSJudv6COSabU\u0026q=85\u0026s=e9d57c894f15d41b379236cde0e91b72\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.keebai.com#website\",\"name\":\"KeebAI\",\"url\":\"https://docs.keebai.com\",\"publisher\":{\"@id\":\"https://docs.keebai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update#webpage\",\"url\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update\",\"name\":\"PATCH /v1/crm/tickets/:id\",\"description\":\"Partially update a ticket — close it, reassign it, retag it, or record its value.\",\"dateModified\":\"2026-08-06T23:54:09.328Z\",\"isPartOf\":{\"@id\":\"https://docs.keebai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tickets\",\"item\":\"https://docs.keebai.com/dev/endpoints/crm-tickets-list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PATCH /v1/crm/tickets/:id\",\"item\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update#apireference\",\"headline\":\"PATCH /v1/crm/tickets/:id\",\"name\":\"PATCH /v1/crm/tickets/:id\",\"description\":\"Partially update a ticket — close it, reassign it, retag it, or record its value.\",\"url\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update\",\"mainEntityOfPage\":{\"@id\":\"https://docs.keebai.com/dev/endpoints/crm-ticket-update#webpage\"},\"dateModified\":\"2026-08-06T23:54:09.328Z\",\"publisher\":{\"@id\":\"https://docs.keebai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.keebai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"KeebAI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"KeebAI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/dev/endpoints/crm-ticket-update.md","siteName":"KeebAI","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":""}]},{"tab":"Messaging","icon":"paper-plane","pages":[{"title":"Messaging","href":"/dev/messaging/overview"}]},{"tab":"Knowledge","icon":"book-bookmark","pages":[{"title":"Knowledge","href":"/dev/knowledge/overview"}]},{"tab":"CRM","icon":"address-book","groups":[{"group":"Get started","pages":[{"title":"CRM overview","sidebarTitle":"Overview","href":"/dev/crm/overview"}]},{"group":"Events","pages":[{"title":"CRM events","sidebarTitle":"Events","href":"/dev/crm/events"},{"title":"POST /v1/webhook/events","sidebarTitle":"POST webhook/events","openapi":"POST /v1/webhook/events","href":"/dev/endpoints/crm-events-emit"}]},{"group":"Customers","pages":[{"title":"GET /v1/crm/customers","sidebarTitle":"GET crm/customers","openapi":"GET /v1/crm/customers","href":"/dev/endpoints/crm-customers-list"},{"title":"GET /v1/crm/customers/:id","sidebarTitle":"GET crm/customers/{id}","openapi":"GET /v1/crm/customers/{id}","href":"/dev/endpoints/crm-customer-get"},{"title":"POST /v1/crm/customers","sidebarTitle":"POST crm/customers","openapi":"POST /v1/crm/customers","href":"/dev/endpoints/crm-customer-create"},{"title":"PATCH /v1/crm/customers/:id","sidebarTitle":"PATCH crm/customers/{id}","openapi":"PATCH /v1/crm/customers/{id}","href":"/dev/endpoints/crm-customer-update"},{"title":"DELETE /v1/crm/customers/:id","sidebarTitle":"DELETE crm/customers/{id}","openapi":"DELETE /v1/crm/customers/{id}","href":"/dev/endpoints/crm-customer-delete"}]},{"group":"Tickets","pages":[{"title":"GET /v1/crm/tickets","sidebarTitle":"GET crm/tickets","openapi":"GET /v1/crm/tickets","href":"/dev/endpoints/crm-tickets-list"},{"title":"GET /v1/crm/tickets/:id","sidebarTitle":"GET crm/tickets/{id}","openapi":"GET /v1/crm/tickets/{id}","href":"/dev/endpoints/crm-ticket-get"},{"title":"POST /v1/crm/tickets","sidebarTitle":"POST crm/tickets","description":"Open a ticket for a contact. Company and project come from the token; Keebai generates the id.","openapi":"POST /v1/crm/tickets","href":"/dev/endpoints/crm-ticket-create"},{"title":"PATCH /v1/crm/tickets/:id","sidebarTitle":"PATCH crm/tickets/{id}","openapi":"PATCH /v1/crm/tickets/{id}","href":"/dev/endpoints/crm-ticket-update"},{"title":"POST /v1/crm/tickets/:id/stage","sidebarTitle":"POST crm/tickets/{id}/stage","description":"Move a ticket to another stage of its pipeline and read back what the transition triggered.","openapi":"POST /v1/crm/tickets/{id}/stage","href":"/dev/endpoints/crm-ticket-stage"},{"title":"DELETE /v1/crm/tickets/:id","sidebarTitle":"DELETE crm/tickets/{id}","openapi":"DELETE /v1/crm/tickets/{id}","href":"/dev/endpoints/crm-ticket-delete"}]},{"group":"Tasks","pages":[{"title":"GET /v1/crm/tasks","sidebarTitle":"GET crm/tasks","openapi":"GET /v1/crm/tasks","href":"/dev/endpoints/crm-tasks-list"},{"title":"GET /v1/crm/tasks/:id","sidebarTitle":"GET crm/tasks/{id}","openapi":"GET /v1/crm/tasks/{id}","href":"/dev/endpoints/crm-task-get"},{"title":"POST /v1/crm/tasks","sidebarTitle":"POST crm/tasks","openapi":"POST /v1/crm/tasks","href":"/dev/endpoints/crm-task-create"},{"title":"PATCH /v1/crm/tasks/:id","sidebarTitle":"PATCH crm/tasks/{id}","openapi":"PATCH /v1/crm/tasks/{id}","href":"/dev/endpoints/crm-task-update"},{"title":"DELETE /v1/crm/tasks/:id","sidebarTitle":"DELETE crm/tasks/{id}","openapi":"DELETE /v1/crm/tasks/{id}","href":"/dev/endpoints/crm-task-delete"}]},{"group":"Notes","pages":[{"title":"GET /v1/crm/notes","sidebarTitle":"GET crm/notes","openapi":"GET /v1/crm/notes","href":"/dev/endpoints/crm-notes-list"},{"title":"GET /v1/crm/notes/:id","sidebarTitle":"GET crm/notes/{id}","openapi":"GET /v1/crm/notes/{id}","href":"/dev/endpoints/crm-note-get"},{"title":"POST /v1/crm/notes","sidebarTitle":"POST crm/notes","openapi":"POST /v1/crm/notes","href":"/dev/endpoints/crm-note-create"},{"title":"PATCH /v1/crm/notes/:id","sidebarTitle":"PATCH crm/notes/{id}","openapi":"PATCH /v1/crm/notes/{id}","href":"/dev/endpoints/crm-note-update"},{"title":"DELETE /v1/crm/notes/:id","sidebarTitle":"DELETE crm/notes/{id}","openapi":"DELETE /v1/crm/notes/{id}","href":"/dev/endpoints/crm-note-delete"}]}]},{"tab":"Scheduling","icon":"calendar-check","pages":[{"title":"Scheduling","href":"/dev/scheduling/overview"}]},{"tab":"Ecommerce","icon":"cart-shopping","pages":[{"title":"Ecommerce","href":"/dev/ecommerce/overview"}]},{"tab":"Loyalty","icon":"wallet","pages":[{"title":"Loyalty","href":"/dev/loyalty/overview"}]},{"tab":"Agents","icon":"robot","pages":[{"title":"Agents","href":"/dev/agents/overview"}]},{"tab":"Webhooks","icon":"bell","pages":[{"title":"Webhooks","href":"/dev/webhooks/overview"}]}]},"basePath":"","title":"PATCH /v1/crm/tickets/:id - KeebAI","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-C4GwDT3_.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}