Deskhero Developer Hub
Back to deskhero.com
Tickets

Create

Creates one or more tickets from a JSON array, running the workspace's new-ticket automations before the insert and then queueing the background work (embeddings, AI auto-reply, notifications, mention notifications). An omitted requester defaults to the calling User and a requester email with no matching user creates a contact record, an omitted group falls back to the Everyone group, and the whole call is rejected when the workspace has passed its hourly outbound-email limit or its plan ticket quota.

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

Request arguments

Name Type Source
tickets_inputDTO_ticket[]Body
Request body example

Response

Status
200 (OK)
Type
DTO_ticket[]
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 403 (Forbidden)
Response body example
DTO_ticket
NameTypeReadOnlyDescription
idInt32ReadOnlyThe ticket number, assigned by Deskhero on creation and unique within the workspace
groupDTO_referenceThe group that owns the ticket, which decides which Users can see it, or null when no group is set
assigneeDTO_referenceThe User the ticket is assigned to, or null when nobody has been assigned yet
requesterDTO_contactThe contact who asked for help, created automatically from the sender address when the ticket arrives by email
createdDateTimeReadOnlyWhen the ticket was created, in UTC
created_byDTO_reference_userReadOnlyThe User who created the ticket, null when it came from someone who is not a User in the workspace
last_updatedDateTimeReadOnlyWhen the ticket was last written to, in UTC, which any change moves forward and not only new messages
last_updated_byDTO_reference_userReadOnlyThe User behind the most recent change, null when the change did not come from a User (inbound email or a background job, for example)
last_messageDateTime (nullable)ReadOnlyWhen the most recent message was added to the ticket, in UTC, starting out equal to created on a brand new ticket
reply_countInt32ReadOnlyNumber of replies and notes recorded on the ticket, excluding the message it was created from, AI reply suggestions and static auto-reply acknowledgements
ai_replyBooleanReadOnlyTrue when the ticket has received an AI-generated auto-reply
chat_bot_resolvedBoolean (nullable)ReadOnlyChat-bot session outcome: true = visitor confirmed the bot answered their question, false = visitor said No. Null when not rated / not a chat ticket.
sourceStringReadOnlyHow the ticket was created (EMAIL, FORM, CHAT_BOT, ...)
reply_historyDTO_ticket_reply_history[]ReadOnlyOne entry per message counted in reply_count, each naming the conversation, its type and who sent it
sys_priorityDTO_reference_colorPriority of the ticket, referencing one of the priority values configured for the workspace, and carrying that value's display colours
sys_statusDTO_reference_colorStatus of the ticket, referencing one of the statuses configured for the workspace, and carrying that status's display colours
sys_subjectStringSubject line of the ticket, taken from the email subject when the ticket arrives by email
sys_content_richDTO_rich_textBody of the message the ticket was created from, carried as rich text in whichever of the html, tiptap and editorjs representations was stored
suggested_reply_statusENUM suggested_reply_statusProgress of the AI reply suggestion for the ticket: IN_PROGRESS while it is being generated, DONE when one is available, ERROR_NO_KNOWLEDGE when the knowledge base held nothing relevant, and ERROR_UNKNOWN for any other failure.
sys_attachmentsDTO_reference_attachment[]Files attached to the message the ticket was created from, each referenced by its attachment id
DTO_reference
NameTypeReadOnlyDescription
idInt32The id of the reference
labelObjectReadOnlyName/Label from referenced object.
DTO_contact
NameTypeReadOnlyDescription
user_idInt32User id
emailStringEmail
nameStringName
profile_picStringProfile pic
DTO_reference_user
NameTypeReadOnlyDescription
profile_picStringReadOnlyProfile pic
emailStringReadOnlyEmail
idInt32Id
labelObjectReadOnlyLabel
DTO_ticket_reply_history
NameTypeReadOnlyDescription
byDTO_reference_userBy
idInt32Id
typeENUM ticket_conversation_typeType
createdDateTimeCreated
DTO_reference_color
NameTypeReadOnlyDescription
bg_colorStringReadOnlyBg color
text_colorStringReadOnlyText color
idInt32Id
labelObjectReadOnlyLabel
DTO_rich_text
NameTypeReadOnlyDescription
plain_previewStringReadOnlyPlain preview
htmlStringHtml
editorjsDTO_editorjsEditorjs
tiptapDTO_tiptapTiptap
read_minutesInt32Read minutes
DTO_editorjs
NameTypeReadOnlyDescription
timeInt64Time
versionStringVersion
blocksDTO_editorjs_block[]Blocks
DTO_editorjs_block
NameTypeReadOnlyDescription
idStringId
typeStringType
dataObjectData
DTO_tiptap
NameTypeReadOnlyDescription
typeStringType
contentDTO_tiptap_node[]Content
DTO_tiptap_node
NameTypeReadOnlyDescription
typeStringType
attrsDTO_tiptap_attrsAttrs
contentDTO_tiptap_node[]Content
textStringText
marksDTO_tiptap_mark[]Marks
DTO_tiptap_attrs
NameTypeReadOnlyDescription
textAlignStringTextalign
levelInt32 (nullable)Level
checkedBoolean (nullable)Checked
idInt32 (nullable)Id
altStringAlt
titleStringTitle
widthStringWidth
wrapperStyleStringWrapperstyle
filesDTO_tiptap_file_ref[]Files
hrefStringHref
targetStringTarget
colspanInt32 (nullable)Colspan
rowspanInt32 (nullable)Rowspan
colorStringColor
textStringText
nameStringFor emoji
nativeStringFor emoji
DTO_tiptap_file_ref
NameTypeReadOnlyDescription
idInt32Id
labelStringLabel
DTO_tiptap_mark
NameTypeReadOnlyDescription
typeStringType
attrsDTO_tiptap_attrsAttrs
DTO_reference_attachment
NameTypeReadOnlyDescription
size_kbInt32ReadOnlySize kb
statusENUM attachment_statusReadOnlyStatus
status_messageStringReadOnlyStatus message
download_urlStringReadOnlyDownload url
idInt32Id
labelObjectReadOnlyLabel
ENUM ticket_conversation_type
ValueNameDescription
0UNKNOWNUNKNOWN
1REPLY_INBOUNDREPLY_INBOUND
2NOTE_PRIVATENOTE_PRIVATE
3NOTE_PUBLICNOTE_PUBLIC
4FORWARDFORWARD
5REPLY_OUTBOUNDREPLY_OUTBOUND
6SUGGESTED_REPLYSUGGESTED_REPLY
7AUTO_REPLY_AIAUTO_REPLY_AI
8AUTO_REPLY_STATICAUTO_REPLY_STATIC
9CHAT_USERCHAT_USER
10CHAT_BOTCHAT_BOT
ENUM attachment_status
ValueNameDescription
0UNKNOWNUNKNOWN
1UNAVAILABLEUNAVAILABLE, processing in progress
2OKOK
3WARNINGWARNING
4ERRORERROR
ENUM suggested_reply_status
ValueNameDescription
0UNKNOWNUNKNOWN
1IN_PROGRESSIn progress
2DONEDone
3ERROR_NO_KNOWLEDGEError no knowledge
4ERROR_UNKNOWNError unknown

Generated Aug 4, 2026 18:37