POST

Ticket.Edit

Update an existing ticket. Accepts the same field aliases as Ticket.Add (topic, ticket_department, team_member_ticket_department, from_time_ticket, to_time_ticket, phone_two, product_id[], image_upload). Custom fields must use dashboard field ids a-{numeric_id} (merged into existing custom_fields). Sent fields are saved; messages/message and uploaded files append message entries. assign_member_id is stored as dashboard JSON string ids ["211","212"]. Publishes ticket.updated automation and realtime. Dates: Y-m-d H:i:s. Status uses numeric ids from all_status (type=ticket): system defaults 1=Opened, 2=Closed, 3=Assigned; custom statuses (e.g. pending) come from Statuses.List with type=ticket.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Updates the requested Ticket record after validating permissions and input fields.

Push Service

Pushes event ticket.updated to users who should see this change.

Automation

Runs automation event ticket.updated with the record id and submitted parameters after the action succeeds.

Special Instructions

  • status is a numeric id, not the label text. Do not send Opened/Closed as strings.
  • System ticket status ids: 1 = Opened, 2 = Closed (also sets close_date when changed via Ticket.Status), 3 = Assigned.
  • Custom statuses added in the dashboard (Add Status), such as pending, have account-specific ids. List them with POST /app/Statuses.List and type=ticket, then use data[].id as status.
  • Ticket.Status is a separate route that only changes status; Ticket.Edit can also send status with other fields.
  • Custom fields use the settings field id (a-1731562297), not labels like a-YES_NO_EN. Same validation as Ticket.Add (email/number/option/required-if-sent-empty). Only sent a-{id} keys are merged; omitted custom fields stay as stored.
  • If status changes, last_status_time is reset. If assign_member_id changes, last_assign_time is reset (ticket automation timers).

Required Parameters

NameTypeSampleExplanation
ticket_id
post
int900Ticket id to update. Aliases: id, data_id, t_id.

Optional Parameters

NameTypeSampleWhat it gives
topic
post
stringPayment issue updatedNew ticket subject. Alias: subject.
messages
post
stringUpdated ticket message.Message text to append to the ticket conversation. Alias: message.
cust_id
post
int123Change the connected customer. Alias: customer_id.
customername
post
stringJohn DemoCustomer display name.
ticket_name
post
stringJohn DemoTicket Name column (tickets.ticket_name). Separate from customer_name.
email
post
string[email protected]Customer email saved on the ticket.
phone
post
string0500000000Customer phone saved on the ticket.
phone_two
post
string0520000000Second phone (dashboard phone_two → mobile).
mobile
post
string0520000000Customer mobile.
address
post
stringMain street 5Address.
city_id
post
int10City id.
rating
post
int3Urgency stars 1-5.
assign_member_id[]
post
array|string211Replace assigned team member ids. Stored as JSON string ids like ["211","212"] (dashboard format). How to pass: (1) multipart — repeat assign_member_id[]=211 and assign_member_id[]=212 (curl: --form 'assign_member_id[]=211' — do not wrap the number in extra quotes). (2) urlencoded — assign_member_id=211,212 or assign_member_id=["211","212"]. (3) JSON body — "assign_member_id": ["211","212"]. Aliases: assign_member_id, team_member_ticket_department, team_member_ticket_department[], team_member, team_member_id, organizations_user.
team_member_ticket_department
post
array|string211,212Dashboard alias for assignees. Same rules as assign_member_id[].
ticket_department
post
int2Department id. Alias: department.
department
post
int2Department id (alias of ticket_department).
product_id
post
array|string12,Custom serviceRelated products (product_id[]). Use Ticket.ProductsByCustomer / Ticket.Get products[].value: catalog id when iteeeem_id != 0, or item_name when iteeeem_id = 0.
mission_id
post
int555Related mission id.
status
post
int2Ticket status id from all_status (type=ticket). System defaults: 1=Opened, 2=Closed, 3=Assigned. Custom statuses (e.g. pending) have account-specific ids — list them via Statuses.List with type=ticket and use data[].id.
type
post
stringmy_ticketsmy_tickets or company_tickets.
due_date
post
datetime2026-07-20 09:00:00Due date/time Y-m-d H:i:s. Send UTC date/time as Y-m-d H:i:s, for example 2026-07-20 10:00:00. The SDK converts user local Date/local datetime input to UTC before posting.
from_time_ticket
post
time09:00Start time. Alias: ticket_from_time. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s.
to_time_ticket
post
time11:00End time. Alias: ticket_to_time. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s.
ticket_from_time
post
time09:00:00Optional start time in H:i or H:i:s. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s.
ticket_to_time
post
time11:00:00Optional end time in H:i or H:i:s. Send time values as H:i:s. If the route also has a date field, send that date as UTC Y-m-d H:i:s.
custom_fields
post
object|string{"a-1731562297":"[email protected]"}Custom fields object keyed by dashboard field id. Merged with existing ticket custom_fields. Do not use labels.
image_upload
file
filescreenshot.pngFile upload appended as a ticket message entry. Also: file, image, cop_paste_image3. With files use multipart and pass assign_member_id[] in the same request.
a-{field_id}
post
string[email protected]One custom field to merge. Key MUST be a-{numeric_id} from Tickets settings (same as dashboard new_ticket / edit form). Checkbox: a-1731562778[].

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Ticket.Edit",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "ticket_id": "900",
        "topic": "Payment issue updated",
        "messages": "Updated ticket message.",
        "assign_member_id[]": [
            "211",
            "212"
        ],
        "due_date": "2026-07-20 09:00:00",
        "ticket_department": "2",
        "a-1731562297": "[email protected]"
    },
    "curl_multipart": "curl --location 'https:\/\/YOUR_HOST\/app\/Ticket.Edit' \\\n--header 'Authorization: Bearer YOUR_TOKEN' \\\n--form 'ticket_id=900' \\\n--form 'topic=Payment issue updated' \\\n--form 'messages=Updated ticket message.' \\\n--form 'assign_member_id[]=211' \\\n--form 'assign_member_id[]=212' \\\n--form 'image_upload=@\/path\/to\/file.png'",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.Edit",
    "url_domain": "https:\/\/{domain}\/app\/Ticket.Edit"
}

Endpoint

POST /app/Ticket.Edit
POST https://{user}.bull36.com/app/Ticket.Edit
POST https://{domain}/app/Ticket.Edit

Sample Output

{
    "success": 1,
    "output": "1",
    "message": "Success",
    "insert_id": 900,
    "ticket_id": 900,
    "assign_member_id": [
        "211",
        "212"
    ],
    "files": [],
    "changed": [
        "subject",
        "messages",
        "assign_member_id"
    ],
    "automation_event": "ticket.updated",
    "socket_event": "ticket.updated"
}

JavaScript Example

const token = 'YOUR TOKEN';

// Without file
const body = new URLSearchParams({
  ticket_id: '900',
  topic: 'Payment issue updated',
  messages: 'Updated ticket message.',
  assign_member_id: '211,212'
});

const res = await fetch('/app/Ticket.Edit', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + token },
  body
});
const data = await res.json();
console.log(data.ticket_id, data.assign_member_id); // ["211","212"]

// With file (multipart)
const form = new FormData();
form.append('ticket_id', '900');
form.append('messages', 'See attached');
form.append('assign_member_id[]', '211');
form.append('assign_member_id[]', '212');
form.append('image_upload', fileInput.files[0]);

const res2 = await fetch('/app/Ticket.Edit', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + token },
  body: form
});

Error Example

{
    "success": 0,
    "message": "Missing required parameter: ticket_id"
}