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
| Name | Type | Sample | Explanation |
|---|---|---|---|
ticket_idpost | int | 900 | Ticket id to update. Aliases: id, data_id, t_id. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
topicpost | string | Payment issue updated | New ticket subject. Alias: subject. |
messagespost | string | Updated ticket message. | Message text to append to the ticket conversation. Alias: message. |
cust_idpost | int | 123 | Change the connected customer. Alias: customer_id. |
customernamepost | string | John Demo | Customer display name. |
ticket_namepost | string | John Demo | Ticket Name column (tickets.ticket_name). Separate from customer_name. |
emailpost | string | [email protected] | Customer email saved on the ticket. |
phonepost | string | 0500000000 | Customer phone saved on the ticket. |
phone_twopost | string | 0520000000 | Second phone (dashboard phone_two → mobile). |
mobilepost | string | 0520000000 | Customer mobile. |
addresspost | string | Main street 5 | Address. |
city_idpost | int | 10 | City id. |
ratingpost | int | 3 | Urgency stars 1-5. |
assign_member_id[]post | array|string | 211 | Replace 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_departmentpost | array|string | 211,212 | Dashboard alias for assignees. Same rules as assign_member_id[]. |
ticket_departmentpost | int | 2 | Department id. Alias: department. |
departmentpost | int | 2 | Department id (alias of ticket_department). |
product_idpost | array|string | 12,Custom service | Related products (product_id[]). Use Ticket.ProductsByCustomer / Ticket.Get products[].value: catalog id when iteeeem_id != 0, or item_name when iteeeem_id = 0. |
mission_idpost | int | 555 | Related mission id. |
statuspost | int | 2 | Ticket 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. |
typepost | string | my_tickets | my_tickets or company_tickets. |
due_datepost | datetime | 2026-07-20 09:00:00 | Due 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_ticketpost | time | 09:00 | Start 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_ticketpost | time | 11:00 | End 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_timepost | time | 09:00:00 | Optional 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_timepost | time | 11:00:00 | Optional 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_fieldspost | 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_uploadfile | file | screenshot.png | File 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.EditSample 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"
}