[POST] .../v1/ticket/edit
Edits a CRM ticket. Use this method to update ticket direction, linked audio recording file, subject, description, description mentions and custom fields while status, responsibility, participants, rating, sentiment and supervisor review stay in dedicated workflow methods. The method loads the ticket through ACL-aware lookup, validates direction and mention context, applies provided scalar and custom-field changes, optionally auto-adds mentioned users when allowed, synchronizes the linked chat and client participant, writes chat system messages and action log records, sends TicketEdited and mention/participant webhooks and returns row_affected with the ticket id. The request body is required; id must be positive, direction cannot be Default, audio_recording_file_id must point to an existing audio file when positive and can be 0 to remove the linked recording, description_mentions can be sent only together with description and subject is limited by the schema. The caller must have CRM ticket edit permission; missing body, invalid id/direction/audio file, missing ticket/audio file, non-audio recording file, unsupported audio-recording schema, disabled additional fields, required custom-field failures, mention validation failures, participant-permission failures, database errors, transaction failures and action-log errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| audio_recording_file_id | Int64 | Optional | Linked audio recording file ID. Optional; pass 0 to remove the current linked recording or a positive ID of an existing audio file. |
| description | String | Optional | Ticket description. |
| description_mentions | Array of CommonMentionInput | Optional | New structured mention list for description. |
| direction | String | Optional | Direction: Inbound or Outbound. Allowed values: Default, Inbound, Outbound. |
| fields | Array of FieldValueEdit | Optional | Additional field value changes. |
| id | Int64 | Required | Ticket ID. |
| mention_options | CommonMentionOptions | Optional | Mention processing options. |
| subject | String | Optional | Ticket subject. Maximum length is 300 characters. |
Request Example
{
"id": 610,
"direction": "Inbound",
"audio_recording_file_id": 918,
"subject": "Delivery question - priority",
"description": "Client asks about delivery date and pickup options",
"fields": []
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": [
610
]
}
}