---
updatedAt: 2026-07-06T16:34:43.000Z
agentTools:
  projectIndex: https://developers.gorgias.com/llms.txt
---

# The Ticket object

A ticket is a conversation between your support agents and one of your customers.
It contains a list of [messages](#the-ticketmessage-object), can be associated with [tags](#the-tag-object), assigned to a [user](#the-user-object) and/or a team, and also collect customer's feedback with a [satisfaction survey](#the-satisfactionsurvey-object).

# Ticket properties

<div class="rm-ParamContainer">
<form class="rjsf">
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">id</label>
<div class="custom-field-type">integer</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>ID of the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">uri</label>
<div class="custom-field-type">string</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>URI of the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">external_id</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>External ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">events</label>
<div class="custom-field-type">array</div>
<div class="custom-field-deprecated">Deprecated</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>All <code>action-executed</code> <a href="#the-event-object">events</a> with the related user if any on the ticket.<br/><span style={{color: 'red'}}>This parameter has been deprecated.</span> Use <a href="/reference/list-events">events api</a> instead.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">status</label>
<div class="custom-field-type">None</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Ticket status is used for managing the lifecycle of the ticket</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">channel</label>
<div class="custom-field-type">LegacyChannelSlug | string</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The channel used to initiate the conversation with the customer.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">via</label>
<div class="custom-field-type">None</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>How the first message of the ticket has been received or sent from Gorgias.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">from_agent</label>
<div class="custom-field-type">boolean | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Whether the first message of the ticket was sent by your company to a customer, or the opposite.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">spam</label>
<div class="custom-field-type">boolean</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Whether the ticket is considered as spam or not.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">imported</label>
<div class="custom-field-type">boolean | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Whether the ticket was created by a historical import.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">customer</label>
<div class="custom-field-type">None</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The customer linked to the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">assignee_user</label>
<div class="custom-field-type">TicketUser | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The agent assigned to this ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">language</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>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.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">subject</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The subject of the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">summary</label>
<div class="custom-field-type">TicketSummary | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The summary of the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">meta</label>
<div class="custom-field-type">TicketMeta | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Extra metadatas about the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">tags</label>
<div class="custom-field-type">array</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p><a href="#the-tag-object">Tags</a> linked to the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">custom_fields</label>
<div class="custom-field-type">object | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The custom fields associated with the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">messages</label>
<div class="custom-field-type">array</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Messages of the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">created_datetime</label>
<div class="custom-field-type">ISO 8601 datetime</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was created.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">processed_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was processed by Gorgias. Differs from <code>created_datetime</code> which refers to the external service.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">opened_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was opened for the first time by a user.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">last_received_message_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the last customer's message was sent.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">last_message_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the last message was sent.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">updated_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was lastly updated.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">closed_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was closed.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">trashed_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket was moved to the trash.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">snooze_datetime</label>
<div class="custom-field-type">string | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>When the ticket will be re-opened.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">satisfaction_survey</label>
<div class="custom-field-type">TicketSatisfactionSurvey | null</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>The satisfaction survey linked to the ticket.</p></div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">reply_options</label>
<div class="custom-field-type">object</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body">None</div>
</div>
</div>
<div class="form-group field custom-field">
<div class="custom-field-row">
<label class="custom-field-name">is_unread</label>
<div class="custom-field-type">boolean</div>
</div>
<div class="custom-field-description-container">
<div class="field-description markdown-body"><p>Whether the ticket is unread for you.</p></div>
</div>
</div>
</form>
</div>

<style>
.custom-field {
    padding: 10px;
}
.custom-field:not(:first-child) {
    border-top: 1px solid rgba(0,0,0,0.1);
}
.custom-field-row {
    align-items: baseline;
    display: flex;
    flex-wrap: nowrap;
}
.custom-field-name {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-default);
    margin-right: 5px;
}
.custom-field-type {
    font-size: 12px;
    color: var(--color-text-minimum);
    margin-right: 5px;
}
.custom-field-deprecated {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-pill);
    color: #fff;
    display: inline-flex;
    font-size: 8px;
    font-weight: var(--font-weight-bold);
    height: 16px;
    line-height: 16px;
    padding-left: 5px;
    padding-right: 5px;
    text-transform: uppercase;
    background: #939eae;
    text-shadow: 1px 1px 0 #8a96a7,0 1px 0 #8a96a7,1px 0 0 #8a96a7;
}
.custom-field-description-container {
    margin-top: 5px;
}
</style>

# Ticket example object

```json
{
  "id": 123,
  "external_id": "RETURN#4213",
  "events": [
    {
      "created_datetime": "2019-11-16T15:59:41.966927",
      "data": null,
      "id": 1234,
      "type": "ticket-closed",
      "user": {
        "email": "steve@company.com",
        "firstname": "Steve",
        "id": 3924,
        "lastname": "Frazeli",
        "name": "Steve Frazelli"
      }
    }
  ],
  "status": "open",
  "channel": "email",
  "via": "email",
  "spam": false,
  "imported": false,
  "customer": {
    "email": "john@example.com",
    "external_id": "customer-84203241",
    "firstname": "John",
    "id": 3924,
    "integrations": {
      "6": {
        "__integration_type__": "shopify",
        "customer": {
          "default_address": {
            "address1": "52 Washburn Street",
            "address2": "",
            "city": "SAN FRANCISCO",
            "country": "United States",
            "country_code": "US",
            "country_name": "United States",
            "customer_id": 667928133655,
            "default": true,
            "first_name": "Marie",
            "id": 707106144279,
            "last_name": "Curie",
            "name": "Marie Curie",
            "province": "California",
            "province_code": "CA",
            "zip": "94103"
          },
          "email": "marie@gorgias.io",
          "first_name": "Marie",
          "id": 667928133655,
          "last_name": "Curie",
          "note": "",
          "orders_count": 1,
          "tags": ""
        },
        "orders": [
          {
            "billing_address": {
              "address1": "52 Washburn Street",
              "address2": "",
              "city": "SAN FRANCISCO",
              "country": "United States",
              "country_code": "US",
              "first_name": "Marie",
              "last_name": "Curie",
              "name": "Marie Curie",
              "province": "California",
              "province_code": "CA",
              "zip": "94103"
            },
            "contact_email": "marie@gorgias.io",
            "created_at": "2018-12-04T03:29:37-08:00",
            "id": 772803526679,
            "line_items": [
              {
                "fulfillable_quantity": 1,
                "fulfillment_service": "manual",
                "fulfillment_status": null,
                "grams": 10,
                "id": 1760305053719,
                "name": "Acidulous candy",
                "price": "0.10",
                "price_set": {
                  "presentment_money": {
                    "amount": "0.10",
                    "currency_code": "USD"
                  },
                  "shop_money": {
                    "amount": "0.10",
                    "currency_code": "USD"
                  }
                },
                "product_id": 8345093387,
                "quantity": 1,
                "requires_shipping": true,
                "sku": "0987654321",
                "tax_lines": [
                  {
                    "price": "0.02",
                    "price_set": {
                      "presentment_money": {
                        "amount": "0.02",
                        "currency_code": "USD"
                      },
                      "shop_money": {
                        "amount": "0.02",
                        "currency_code": "USD"
                      }
                    },
                    "rate": 0.2,
                    "title": "TVA"
                  }
                ],
                "taxable": true,
                "title": "Acidulous candy",
                "total_discount": "0.00",
                "total_discount_set": {
                  "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  },
                  "shop_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  }
                },
                "variant_id": 28442938955
              }
            ],
            "total_tax": "0.02"
          }
        ]
      }
    },
    "lastname": "Smith",
    "meta": {
      "position": "engineer"
    },
    "name": "John Smith",
    "note": "Our best customer."
  },
  "assignee_user": {
    "bio": "Full stack developer at Gorgias",
    "email": "steve@company.com",
    "firstname": "Steve",
    "id": 3924,
    "lastname": "Frazeli",
    "meta": {
      "avatar_url": "https://avatars.example.com/steve-profile.jpeg",
      "position": "engineer"
    },
    "name": "Steve Frazelli"
  },
  "language": "fr",
  "subject": "Can I get a refund?",
  "summary": {
    "content": "The customer is asking for a refund.",
    "created_datetime": "2020-01-27T10:42:21.932637",
    "triggered_by": 1,
    "updated_datetime": "2020-01-27T10:42:21.932637"
  },
  "meta": {},
  "tags": [
    {
      "decoration": {
        "color": "#F58D86"
      },
      "name": "urgent"
    }
  ],
  "created_datetime": "2019-07-05T14:42:00.384938",
  "processed_datetime": "2019-07-05T14:42:00.384938",
  "opened_datetime": "2019-07-05T15:22:46.472436",
  "last_received_message_datetime": "2020-01-27T10:42:21.468912",
  "last_message_datetime": "2020-02-01T19:12:32.432197",
  "updated_datetime": "2020-01-27T10:42:21.932637",
  "satisfaction_survey": {
    "body_text": "Such speed, much pertinent.",
    "created_datetime": "2019-11-16T15:59:41.966927",
    "customer_id": 120,
    "id": 1234,
    "meta": {
      "externalData": {
        "id": 1234
      }
    },
    "score": 2,
    "scored_datetime": "2019-11-25T15:59:41.966927",
    "sent_datetime": "2019-11-23T15:59:41.966927",
    "should_send_datetime": "2019-11-23T15:59:41.966927",
    "ticket_id": 12
  },
  "is_unread": true
}
```