Deskhero Developer Hub
Back to deskhero.com
Tickets

Lock

Locks the ticket for the calling User, or refreshes the lock when they already hold it, so that every other User's changes to the ticket (updates, replies and notes, conversation edits, delete, merge, forward, summary) answer 423 Locked until it is released. The lock lasts five minutes from the holder's last edit or refresh and then lets go on its own; when another User already holds the ticket nothing changes and the response describes that holder instead (is_locked with their user_id), so call this and read the answer rather than checking first.

PUT /api/{tenant:minlength(2)}/v{version:apiVersion}/tickets/{id}/lock
Authorisation
Minimum role: USER

Request arguments

Name Type Source
idInt32
Request body example

Response

Status
200 (OK)
Type
DTO_ticket_lock
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 401 (Unauthorized), 403 (Forbidden), 404 (NotFound), 429 (TooManyRequests)
Response body example
DTO_ticket_lock
NameTypeReadOnlyDescription
ticket_idInt32The ticket the lock belongs to
is_lockedBooleanTrue while a User holds the ticket. False means the ticket is free and the remaining properties are empty
user_idInt32The User holding the lock, default when the ticket is free
user_nameStringDisplay name of the User holding the lock, for the "locked by" indicator
locked_atDateTime (nullable)When the lock was first taken (UTC). Refreshing the lock keeps this
expires_in_secondsInt32Seconds until the lock expires on its own unless the holder edits the ticket or refreshes it again. 0 when the ticket is free

Generated Aug 22, 2026 09:36