Menu
Update Ticket
Update a ticket
/api/tickets/{id}Use it in a workflow
- Add a step and choose the Gorgias connector.
- Pick the Update Ticket action (under Tickets).
- Fill in the fields below, then reference the result from later steps as
{{updateTicket.response.data}}.
Request
Path parameters
idintegerrequiredThe ID of the ticket to update.
Request body
Enter the body as JSON in the step's Body field.
assignee_teamobjectidintegerID of the user or team to assign to the ticket
assignee_userobjectidintegerchanneloneOfChannel used to initiate the conversation with the customer
closed_datetimestring (date-time)When the ticket was closed
custom_fieldsarray<object>Custom fields associated with the ticket
idintegerrequiredID of the custom field
valueanyrequiredValue of the custom field
customerobjectidintegerID of the customer
emailstringPrimary email of the customer
namestringName of the customer
external_idstringID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.
from_agentbooleanWhether the first message of the ticket was sent by your company to a customer, or the opposite
is_unreadbooleanMark the ticket as read/unread
languagestringLanguage primarily used in the ticket
last_message_datetimestring (date-time)When the last message was sent
last_received_message_datetimestring (date-time)When the last customer's message was received
metaobjectMetadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket
opened_datetimestring (date-time)Priority of the ticket
prioritystringOne ofcriticalhighnormallow
snooze_datetimestring (date-time)When the ticket will be re-opened automatically
spambooleanWhether the ticket is considered as spam
statusstringOne ofopenclosed
subjectstringSubject of the ticket
tagsarray<object>Tags of the ticket
namestringrequiredName of the tag
decorationobject1 fieldstrashed_datetimestring (date-time)A datetime will move the ticket to the trash, `null` will move the ticket out of the trash
updated_datetimestring (date-time)When the ticket was lastly updated
viastringHow the first message of the ticket has been received or sent from Gorgias
One ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformhelpdeskhelp-centerinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-notephoneruleshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendeskDefault "api"
{
"assignee_team": {
"id": 0
},
"assignee_user": {
"id": 0
},
"channel": null,
"closed_datetime": "2025-01-01T00:00:00Z",
"custom_fields": [
{
"id": 0,
"value": null
}
],
"customer": {
"id": 0,
"email": "string",
"name": "string"
},
"external_id": "string",
"from_agent": false,
"is_unread": false,
"language": "string",
"last_message_datetime": "2025-01-01T00:00:00Z",
"last_received_message_datetime": "2025-01-01T00:00:00Z"
}
Response
Returns 202 with an object. Read it in later steps with {{updateTicket.response.data.<field>}}.
idintegerID of the ticket.
uristringURI of the ticket.
external_idstringExternal ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.
eventsarray<object>All `action-executed` [events](#the-event-object) with the related user if any on the ticket.<br/><span style={{color: 'red'}}>This parameter has been deprecated.</span> Use [events api](/reference/list-events) instead.
idintegerrequiredID of the event.
typestringrequiredType of the event. Event types are used to discriminate between events. List of event types: `account-created`, `account-deactivated`, `account-setting-created`, `account-setting-updated`, `account-updated`, `account-renamed`, `action-executed`, `facebook-comment-created`, `facebook-comment-deleted`, `facebook-comment-edited`, `facebook-comment-hidden`, `facebook-comment-unhidden`, `facebook-comment-liked`, `facebook-comment-unliked`, `facebook-message-created`, `facebook-message-deleted`, `facebook-message-edited`, `facebook-post-created`, `facebook-post-deleted`, `facebook-post-edited`, `facebook-review-deleted`, `integration-created`, `integration-deleted`, `integration-updated`, `integration-deactivated`, `integration-reactivation-started`, `integration-reactivated`, `integration-data-item-created`, `integration-data-item-deleted`, `macro-created`, `macro-deleted`, `macro-updated`, `macro-applied`, `macro-params-updated`, `macro-archived`, `macro-unarchived`, `rule-created`, `rule-priority-updated`, `rule-deleted`, `rule-executed`, `rule-updated`, `rule-deactivated`, `rule-reactivated`, `rules-pipeline-executed`, `subscription-created`, `subscription-updated`, `subscription-self-serve-changed`, `tag-created`, `tag-deleted`, `tag-merged`, `tag-updated`, `tag-renamed`, `team-created`, `team-deleted`, `team-updated`, `team-member-created`, `team-member-deleted`, `ticket-assigned`, `ticket-chat-updated`, `ticket-closed`, `ticket-created`, `ticket-customer-updated`, `ticket-deleted`, `ticket-excluded-from-auto-merge`, `ticket-excluded-from-csat`, `ticket-marked-spam`, `ticket-merged`, `ticket-read-status-updated`, `ticket-reopened`, `ticket-satisfaction-survey-skipped`, `ticket-self-unsnoozed`, `ticket-sla-policy-assigned`, `ticket-snoozed`, `ticket-split`, `ticket-subject-updated`, `ticket-tags-added`, `ticket-tags-removed`, `ticket-team-assigned`, `ticket-team-unassigned`, `ticket-trashed`, `ticket-typing-activity-shopper-started`, `ticket-unassigned`, `ticket-unmarked-spam`, `ticket-untrashed`, `ticket-updated`, `ticket-viewed`, `ticket-handed-over`, `ticket-message-chat-created`, `ticket-message-created`, `ticket-message-deleted`, `ticket-message-failed`, `ticket-message-summary-created`, `ticket-message-updated`, `customer-created`, `customer-updated`, `customer-merged`, `customer-deleted`, `customer-external-data-updated`, `custom-field-created`, `custom-field-updated`, `custom-field-condition-created`, `custom-field-condition-updated`, `custom-field-condition-enabled`, `custom-field-condition-disabled`, `custom-field-condition-deleted`, `custom-fields-ticket-values-updated`, `self-service-configurations-updated`, `self-service-configurations-update-started`, `user-created`, `user-invited`, `user-updated`, `user-mentioned`, `user-deleted`, `user-logged-in`, `user-logged-out`, `user-impersonated`, `user-password-changed`, `user-password-reset`, `user-2fa-changed`, `user-status-changed`, `user-setting-created`, `user-setting-updated`, `custom-availability-status-created`, `custom-availability-status-updated`, `custom-availability-status-deleted`, `views-count-updated`, `view-deactivated`, `view-created`, `view-deleted`, `view-updated`, `view-section-created`, `view-section-updated`, `view-section-deleted`, `widget-created`, `widget-deleted`, `widget-updated`, `satisfaction-survey-sent`, `satisfaction-survey-updated`, `satisfaction-survey-responded`.
userobjectrequired5 fieldsdataobjectrequiredData associated with the event (key-value data).
created_datetimestring (date-time)requiredWhen the event was created.
statusstringOne ofopenclosed
channeloneOfThe channel used to initiate the conversation with the customer.
viastringOne ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformgorgias_chathelp-centerhelpdeskinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-noteoffline_capturephoneruleself_serviceshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendesk
from_agentbooleanWhether the first message of the ticket was sent by your company to a customer, or the opposite.
spambooleanWhether the ticket is considered as spam or not.
importedbooleanWhether the ticket was created by a historical import.
customerobjectidintegerrequiredID of the customer.
emailstringrequiredPrimary email address of the customer.
namestringrequiredFull name of the customer
firstnamestringrequiredFirst name of the customer.
lastnamestringrequiredLast name of the customer.
metaanyrequiredUser defined JSON field. It can be useful for storing additional info about the object.
channelsarray<object>required9 fieldsThe [customer's contact channels](#the-customerchannel-object).
dataanyrequiredcustomeranyrequiredintegrationsobjectrequiredData coming from integrations (Shopify, Recharge, HTTP, etc...) associated with the customer. Keys of the object are integration IDs, values are raw data collected from the integrations.
external_idstringrequiredID of the customer in a foreign system (Stripe, Aircall, etc...). This field is not used by Gorgias, feel free to set it as you wish.
notestringrequiredA note associated with the customer.
external_dataobjectExternal data associated with the customer.
ecommerce_dataobjectEcommerce data associated with the customer.
assignee_userobjectidintegerrequiredID of the user.
emailstringrequiredEmail address of the user. `password_confirmation` field must be provided to change the email.
namestringrequiredFull name of the user.
firstnamestringrequiredFirst name of the user.
lastnamestringrequiredLast name of the user.
metaanyrequiredData associated with the user.
biostringrequiredShort biography of the user.
languagestringThe language primarily used in the ticket. The language is automatically detected on the first messages by Gorgias if not set explicitly. Once the language has been set, it won't be updated according to future messages.
subjectstringThe subject of the ticket.
summaryobjectcontentstringrequiredThe content of the AI summary.
created_datetimestring (date-time)requiredWhen the ticket was summarized by AI for the first time.
updated_datetimestring (date-time)requiredWhen the ticket was summarized by AI for the last time.
triggered_byintegerrequiredThe id of the user who triggered the summary generation, if triggered manually.
metaanytagsarray<object>[Tags](#the-tag-object) linked to the ticket.
idintegerrequiredID of the tag
namestringrequiredName of the tag. Tags' names are case sensitive.
decorationobjectrequired1 fieldscustom_fieldsobjectThe custom fields associated with the ticket.
messagesarray<object>Messages of the ticket.
idintegerrequiredID of the message.
uristringrequiredURI of the message.
message_idstringrequiredID of the message on the service that sent the message.It can be the ID of an email, a Messenger message, a Facebook comment, etc...
ticket_idintegerrequiredThe ID of the ticket the message is associated with.
external_idstringrequiredID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish.
publicbooleanWhether the message was sent/receive by a customer. Internal notes are not public.
Default true
channeloneOfrequiredThe channel used to send the message.
viastringrequiredOne ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformgorgias_chathelp-centerhelpdeskinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-noteoffline_capturephoneruleself_serviceshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendesk
sourceobjectrequired6 fieldssenderobjectrequired6 fieldsauth_customer_identityobjectrequired2 fieldsintegration_idintegerrequiredID of the integration that either received or sent the message.
intentsarray<object>required3 fieldsrule_idintegerrequiredID of the rule which sent the message, if any.
from_agentbooleanrequiredWhether the message was sent by your company to a customer, or the opposite.
receiverobjectrequired6 fieldssubjectstringrequiredThe subject of the message.
body_textstringrequiredThe full text version of the body of the message, if any.
body_htmlstringrequiredThe full HTML version of the body of the message, if any.
stripped_textstringrequiredThe text version of the body of the message without email signatures and previous replies.
stripped_htmlstringrequiredThe HTML version of the body of the message without email signatures and previous replies.
stripped_signaturestringrequiredattachmentsarray<object>required6 fieldsA list of files attached to the message.
macrosarray<object>1 fieldsA list of macros.
actionsarray<object>requiredA list of actions executed before the message was sent. These actions are set by macros.
headersobjectMessage headers. Used for email messages.
importedbooleanrequiredWhether the message was created by a historical import.
metaanyrequiredMetadata associated with the message. You can use this field to store structured information (key-value data) about the message. Reserved keys: - `current_page`: The page from where the user is currently chatting. - `relevant_content_indexes`: Indexes containing relevant text of the message. - `is_quick_reply`: Whether the message is a "quick reply". - `campaigns`: ID of the chat campaign the message is replying to. - `campaigns_id`: ID of the chat campaign that sent this message. - `self_service_flow`: An object containing metadata of the self-service flow associated to the message.
created_datetimestring (date-time)requiredWhen the message was created.
processed_datetimestring (date-time)requiredWhen the message was processed by Gorgias. Differs from `created_datetime` which refers to the external service.
deleted_datetimestring (date-time)When the message was deleted.
sent_datetimestring (date-time)requiredWhen the message was sent. If omitted, the message will be sent by Gorgias.
failed_datetimestring (date-time)requiredWhen the message failed to be sent. Messages that couldn't be sent can be resend.
opened_datetimestring (date-time)requiredWhen the message was opened by the primary receiver.
last_sending_errorobjectrequired1 fieldsis_retriablebooleanrequiredIt determines if the message can be retried or not.
replied_byobject7 fieldsreplied_toobject7 fieldscreated_datetimestring (date-time)When the ticket was created.
processed_datetimestring (date-time)When the ticket was processed by Gorgias. Differs from `created_datetime` which refers to the external service.
opened_datetimestring (date-time)When the ticket was opened for the first time by a user.
last_received_message_datetimestring (date-time)When the last customer's message was sent.
last_message_datetimestring (date-time)When the last message was sent.
updated_datetimestring (date-time)When the ticket was lastly updated.
closed_datetimestring (date-time)When the ticket was closed.
trashed_datetimestring (date-time)When the ticket was moved to the trash.
snooze_datetimestring (date-time)When the ticket will be re-opened.
satisfaction_surveyobjectidintegerrequiredID of the survey.
customer_idintegerrequiredThe ID of the customer who filled the survey.
ticket_idintegerrequiredThe ID of the ticket the survey is associated with.
sent_datetimestring (date-time)requiredWhen the survey was sent. If is not set it means that it was not sent yet.
scored_datetimestring (date-time)requiredWhen the survey was filled by the customer.
should_send_datetimestring (date-time)requiredWhen the survey should be sent. If not set then the survey will not be sent by Gorgias.
created_datetimestring (date-time)requiredWhen the survey was created.
scoreintegerrequiredThe level of satisfaction. Scores range from 1 to 5.
body_textstringrequiredThe comment sent by the customer.
metaobjectrequiredData associated with the satisfaction survey. You can use this parameter to store structured information (key-value data) about the satisfaction survey. This field is not used by Gorgias.
reply_optionsobjectis_unreadbooleanWhether the ticket is unread for you.
{
"id": 0,
"uri": "string",
"external_id": "string",
"events": [
{
"id": 0,
"type": "string",
"user": {
"id": 0,
"firstname": "string",
"lastname": "string",
"name": "string",
"email": "string"
},
"data": {},
"created_datetime": "2025-01-01T00:00:00Z"
}
],
"channel": null,
"via": "aircall",
"from_agent": false,
"spam": false,
"imported": false,
"customer": {
"id": 0,
"email": "string",
"name": "string",
"firstname": "string",
"lastname": "string",
"meta": null,
"channels": [
{
"id": 0,
"type": "string",
"address": "string",
"created_datetime": "2025-01-01T00:00:00Z",
"updated_datetime": "2025-01-01T00:00:00Z",
"deleted_datetime": "2025-01-01T00:00:00Z",
"user": {
"id": 0,
"name": "string"
},
"customer": {
"id": 0,
"name": "string"
},
"preferred": false
}
],
"data": null,
"customer": null,
"integrations": {},
"external_id": "string",
"note": "string"
},
"assignee_user": {
"id": 0,
"email": "string",
"name": "string",
"firstname": "string",
"lastname": "string",
"meta": null,
"bio": "string"
},
"language": "string"
}
Need more? See the Gorgias guide for connection setup and behaviour shared by every action.