younifyd
Menu

Create Ticket

Create a ticket

POST/api/tickets

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the Create Ticket action (under Tickets).
  3. Fill in the fields below, then reference the result from later steps as {{createTicket.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

assignee_teamobject
idinteger

ID of the user or team assigned to the ticket

assignee_userobject
idinteger

ID of the user or team assigned to the ticket

channeloneOf

Channel used to initiate the conversation with the customer

closed_datetimestring (date-time)

When the ticket was closed

created_datetimestring (date-time)

When the ticket was created

custom_fieldsarray<object>

Custom fields associated with the ticket

idintegerrequired

ID of the custom field

valueanyrequired

Value of the custom field

customerobject
idinteger

ID of the customer

emailstring

Primary email of the customer

namestring

Name of the customer

external_idstring

ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.

from_agentboolean

Whether the first message of the ticket was sent by your company to a customer, or the opposite

languagestring

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.

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

messagesarray<object>required

Messages of the ticket

actionsarray<oneOf>

Actions associated with the message

attachmentsarray<object>6 fields

Attachments associated with the message

body_htmlstring

HTML version of the body of the message

body_textstring

Text version of the body of the message

channeloneOfrequired

Channel used to send the message

created_datetimestring (date-time)

When the message was created

deleted_datetimestring (date-time)

When the message was deleted

external_idstring

ID 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.

failed_datetimestring (date-time)

When the message failed to be sent. Messages that couldn't be sent can be resent.

from_agentbooleanrequired

Whether the message was sent by your company

headersobject

Headers of the message

integration_idinteger

ID of the Integration used to send the message

last_sending_errorobject1 fields
macrosarray<object>1 fields

Macros used to compose the message

message_idstring

ID 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...

metaobject1 fields
opened_datetimestring (date-time)

When the message was seen by its recipient

publicboolean

Whether the message is public. Only internal notes are private.

Default true

sent_datetimestring (date-time)

When the message was sent. If omitted, the message will be sent by Gorgias.

sourceobject6 fields
stripped_htmlstring

HTML version of the body of the message without email signatures and previous replies.

stripped_signaturestring

Signature stripped from the body of the message

stripped_textstring

Text version of the body of the message without email signatures and previous replies.

subjectstring

Subject of the message

viastring

How the message 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"

mention_idsarray<integer>

List of User IDs to mention along with the internal note.

receiverobject9 fields
senderobject9 fields
metaobject

Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket

opened_datetimestring (date-time)

When the ticket was opened for the first time by a User

prioritystring

One ofcriticalhighnormallow

snooze_datetimestring (date-time)

When the ticket will be re-opened automatically

spamboolean

Whether the ticket is considered as spam

Default false

split_frominteger

ID of the ticket that this ticket was split from.

statusstring

One ofopenclosed

subjectstring

Subject of the ticket

tagsarray<object>

The tags associated with the ticket

namestringrequired

Name of the tag

decorationobject1 fields
trashed_datetimestring (date-time)

When the ticket was moved to the trash

updated_datetimestring (date-time)

When the ticket was lastly updated

viastring

How 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"

importedboolean

Whether the ticket was created by a historical import. When set to true, the ticket and all its messages are flagged as imported.

Default false

json
{
  "messages": [
    {
      "channel": null,
      "from_agent": false,
      "actions": [
        null
      ],
      "attachments": [
        {
          "url": "string",
          "name": "string",
          "content_type": "string",
          "size": 0,
          "public": true,
          "extra": null
        }
      ],
      "body_html": "string",
      "body_text": "string",
      "created_datetime": "2025-01-01T00:00:00Z",
      "deleted_datetime": "2025-01-01T00:00:00Z",
      "external_id": "string",
      "failed_datetime": "2025-01-01T00:00:00Z",
      "headers": {},
      "integration_id": 0
    }
  ],
  "assignee_team": {
    "id": 0
  },
  "assignee_user": {
    "id": 0
  },
  "channel": null,
  "closed_datetime": "2025-01-01T00:00:00Z",
  "created_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,
  "language": "string",
  "last_message_datetime": "2025-01-01T00:00:00Z"
}

Response

Returns 201 with an object. Read it in later steps with {{createTicket.response.data.<field>}}.

idinteger

ID of the ticket.

uristring

URI of the ticket.

external_idstring

External 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.

idintegerrequired

ID of the event.

typestringrequired

Type 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 fields
dataobjectrequired

Data associated with the event (key-value data).

created_datetimestring (date-time)required

When the event was created.

statusstring

One ofopenclosed

channeloneOf

The channel used to initiate the conversation with the customer.

viastring

One ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformgorgias_chathelp-centerhelpdeskinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-noteoffline_capturephoneruleself_serviceshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendesk

from_agentboolean

Whether the first message of the ticket was sent by your company to a customer, or the opposite.

spamboolean

Whether the ticket is considered as spam or not.

importedboolean

Whether the ticket was created by a historical import.

customerobject
idintegerrequired

ID of the customer.

emailstringrequired

Primary email address of the customer.

namestringrequired

Full name of the customer

firstnamestringrequired

First name of the customer.

lastnamestringrequired

Last name of the customer.

metaanyrequired

User defined JSON field. It can be useful for storing additional info about the object.

channelsarray<object>required9 fields

The [customer's contact channels](#the-customerchannel-object).

dataanyrequired
customeranyrequired
integrationsobjectrequired

Data 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_idstringrequired

ID 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.

notestringrequired

A note associated with the customer.

external_dataobject

External data associated with the customer.

ecommerce_dataobject

Ecommerce data associated with the customer.

assignee_userobject
idintegerrequired

ID of the user.

emailstringrequired

Email address of the user. `password_confirmation` field must be provided to change the email.

namestringrequired

Full name of the user.

firstnamestringrequired

First name of the user.

lastnamestringrequired

Last name of the user.

metaanyrequired

Data associated with the user.

biostringrequired

Short biography of the user.

languagestring

The 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.

subjectstring

The subject of the ticket.

summaryobject
contentstringrequired

The content of the AI summary.

created_datetimestring (date-time)required

When the ticket was summarized by AI for the first time.

updated_datetimestring (date-time)required

When the ticket was summarized by AI for the last time.

triggered_byintegerrequired

The id of the user who triggered the summary generation, if triggered manually.

metaany
tagsarray<object>

[Tags](#the-tag-object) linked to the ticket.

idintegerrequired

ID of the tag

namestringrequired

Name of the tag. Tags' names are case sensitive.

decorationobjectrequired1 fields
custom_fieldsobject

The custom fields associated with the ticket.

messagesarray<object>

Messages of the ticket.

idintegerrequired

ID of the message.

uristringrequired

URI of the message.

message_idstringrequired

ID 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_idintegerrequired

The ID of the ticket the message is associated with.

external_idstringrequired

ID 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.

publicboolean

Whether the message was sent/receive by a customer. Internal notes are not public.

Default true

channeloneOfrequired

The channel used to send the message.

viastringrequired

One ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformgorgias_chathelp-centerhelpdeskinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-noteoffline_capturephoneruleself_serviceshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendesk

sourceobjectrequired6 fields
senderobjectrequired6 fields
auth_customer_identityobjectrequired2 fields
integration_idintegerrequired

ID of the integration that either received or sent the message.

intentsarray<object>required3 fields
rule_idintegerrequired

ID of the rule which sent the message, if any.

from_agentbooleanrequired

Whether the message was sent by your company to a customer, or the opposite.

receiverobjectrequired6 fields
subjectstringrequired

The subject of the message.

body_textstringrequired

The full text version of the body of the message, if any.

body_htmlstringrequired

The full HTML version of the body of the message, if any.

stripped_textstringrequired

The text version of the body of the message without email signatures and previous replies.

stripped_htmlstringrequired

The HTML version of the body of the message without email signatures and previous replies.

stripped_signaturestringrequired
attachmentsarray<object>required6 fields

A list of files attached to the message.

macrosarray<object>1 fields

A list of macros.

actionsarray<object>required

A list of actions executed before the message was sent. These actions are set by macros.

headersobject

Message headers. Used for email messages.

importedbooleanrequired

Whether the message was created by a historical import.

metaanyrequired

Metadata 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)required

When the message was created.

processed_datetimestring (date-time)required

When 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)required

When the message was sent. If omitted, the message will be sent by Gorgias.

failed_datetimestring (date-time)required

When the message failed to be sent. Messages that couldn't be sent can be resend.

opened_datetimestring (date-time)required

When the message was opened by the primary receiver.

last_sending_errorobjectrequired1 fields
is_retriablebooleanrequired

It determines if the message can be retried or not.

replied_byobject7 fields
replied_toobject7 fields
created_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_surveyobject
idintegerrequired

ID of the survey.

customer_idintegerrequired

The ID of the customer who filled the survey.

ticket_idintegerrequired

The ID of the ticket the survey is associated with.

sent_datetimestring (date-time)required

When the survey was sent. If is not set it means that it was not sent yet.

scored_datetimestring (date-time)required

When the survey was filled by the customer.

should_send_datetimestring (date-time)required

When the survey should be sent. If not set then the survey will not be sent by Gorgias.

created_datetimestring (date-time)required

When the survey was created.

scoreintegerrequired

The level of satisfaction. Scores range from 1 to 5.

body_textstringrequired

The comment sent by the customer.

metaobjectrequired

Data 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_optionsobject
is_unreadboolean

Whether the ticket is unread for you.

json
{
  "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.

Create Ticket — Gorgias — Documentation