Skip to main content
PATCH
Actualizar un ticket
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.

Endpoint

Required scope

crm:tickets:write

Headers

Path parameters

Body

All fields optional. Send only what changes.

Example request

Response

200 OK

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.

400 Bad Request

An enum value outside the allowed set, a malformed ObjectId, or a property the endpoint does not accept.

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the crm:tickets:write scope.

404 Not Found

No ticket with that id, or the ticket belongs to a different company.

Operational notes

  • 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.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

Body

application/json
resolution
enum<string>
Available options:
won,
lost
is_closed
boolean

Cierra o reabre el ticket

priority
enum<string>
Available options:
low,
medium,
high,
urgent
category
string
assigned_to
string
custom_fields
object
amount
number
amount_currency
string
amount_status
enum<string>
Available options:
estimated,
confirmed
tag_ids
string[]

Reemplaza la lista completa de tags

add_tag_ids
string[]

Agrega tags sin tocar las existentes

remove_tag_ids
string[]

Quita tags sin tocar las demás

conversation_summary
object

Response

200 - application/json
ticket
object
required
just_closed
boolean
required

true sólo en la request que pasó el ticket de abierto a cerrado. Útil para disparar efectos una única vez.

action
string
required

closed | updated