---
updatedAt: 2026-04-20T19:43:50.000Z
agentTools:
  projectIndex: https://developers.gorgias.com/llms.txt
---

# Create a ticket

# OpenAPI definition

````json
{
  "security": [
    {
      "basicAuth": []
    }
  ],
  "info": {
    "description": "The Gorgias REST API. Please go to https://developers.gorgias.com for more details.",
    "title": "Gorgias REST API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://{domain}.gorgias.com",
      "variables": {
        "domain": {
          "default": "your-domain"
        }
      }
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "paths": {
    "/api/tickets": {
      "post": {
        "summary": "Create a ticket",
        "operationId": "create-ticket",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTicket"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created ticket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                },
                "examples": {
                  "responses": {
                    "value": {
                      "id": 123,
                      "assignee_user": null,
                      "channel": "email",
                      "closed_datetime": null,
                      "created_datetime": "2019-07-05T14:42:00.384938",
                      "customer": {
                        "id": 3924,
                        "active": true,
                        "created_datetime": "2019-04-13T03:27:56.973873",
                        "customer": {},
                        "data": {
                          "city": "San Francisco"
                        },
                        "email": "john@example.com",
                        "external_id": "customer-84203241",
                        "firstname": "John",
                        "integrations": {
                          "6": {
                            "orders": [
                              {
                                "id": 772803526679,
                                "total_tax": "0.02",
                                "created_at": "2018-12-04T03:29:37-08:00",
                                "line_items": [
                                  {
                                    "id": 1760305053719,
                                    "sku": "0987654321",
                                    "name": "Acidulous candy",
                                    "grams": 10,
                                    "price": "0.10",
                                    "title": "acidulous candy",
                                    "taxable": true,
                                    "quantity": 1,
                                    "price_set": {
                                      "shop_money": {
                                        "amount": "0.10",
                                        "currency_code": "USD"
                                      },
                                      "presentment_money": {
                                        "amount": "0.10",
                                        "currency_code": "USD"
                                      }
                                    },
                                    "tax_lines": [
                                      {
                                        "rate": 0.2,
                                        "price": "0.02",
                                        "title": "tva",
                                        "price_set": {
                                          "shop_money": {
                                            "amount": "0.02",
                                            "currency_code": "USD"
                                          },
                                          "presentment_money": {
                                            "amount": "0.02",
                                            "currency_code": "USD"
                                          }
                                        }
                                      }
                                    ],
                                    "product_id": 8345093387,
                                    "variant_id": 28442938955,
                                    "total_discount": "0.00",
                                    "requires_shipping": true,
                                    "fulfillment_status": null,
                                    "total_discount_set": {
                                      "shop_money": {
                                        "amount": "0.00",
                                        "currency_code": "USD"
                                      },
                                      "presentment_money": {
                                        "amount": "0.00",
                                        "currency_code": "USD"
                                      }
                                    },
                                    "fulfillment_service": "manual",
                                    "fulfillable_quantity": 1
                                  }
                                ],
                                "contact_email": "marie@gorgias.io",
                                "billing_address": {
                                  "zip": "94103",
                                  "city": "SAN FRANCISCO",
                                  "name": "Marie Curie",
                                  "country": "United States",
                                  "address1": "52 Washburn Street",
                                  "address2": "",
                                  "province": "California",
                                  "last_name": "Curie",
                                  "first_name": "Marie",
                                  "country_code": "US",
                                  "province_code": "CA"
                                }
                              }
                            ],
                            "customer": {
                              "id": 667928133655,
                              "note": "",
                              "tags": "",
                              "email": "marie@gorgias.io",
                              "first_name": "Marie",
                              "last_name": "Curie",
                              "orders_count": 1,
                              "default_address": {
                                "id": 707106144279,
                                "zip": "94103",
                                "city": "SAN FRANCISCO",
                                "name": "Marie Curie",
                                "country": "United States",
                                "default": true,
                                "address1": "52 Washburn Street",
                                "address2": "",
                                "province": "California",
                                "last_name": "Curie",
                                "first_name": "Marie",
                                "customer_id": 667928133655,
                                "country_code": "US",
                                "country_name": "United States",
                                "province_code": "CA"
                              }
                            },
                            "__integration_type__": "shopify"
                          }
                        },
                        "language": "fr",
                        "lastname": "Smith",
                        "meta": {
                          "position": "engineer"
                        },
                        "name": "John Smith",
                        "note": "Our best customer.",
                        "timezone": "UTC",
                        "updated_datetime": "2019-09-25T06:18:22.839271"
                      },
                      "events": [
                        {
                          "id": 1234,
                          "uri": "/api/events/1234/",
                          "context": "dd4ff312-69df-494a-be96-1a58b3d8b8e0",
                          "created_datetime": "2019-11-16T15:59:41.966927",
                          "data": null,
                          "object_id": 123,
                          "object_type": "Ticket",
                          "type": "ticket-closed",
                          "user_id": 123,
                          "user": {
                            "id": 3924,
                            "firstname": "Steve",
                            "lastname": "Frazeli",
                            "name": "Steve Frazelli",
                            "email": "steve@company.com"
                          }
                        }
                      ],
                      "external_id": "RETURN#4213",
                      "is_unread": true,
                      "language": "fr",
                      "last_message_datetime": "2020-02-01T19:12:32.432197",
                      "last_received_message_datetime": "2020-01-27T10:42:21.468912",
                      "messages": [
                        {
                          "id": 924712,
                          "uri": "/api/tickets/12/messages/924712/",
                          "message_id": "<123345676453.2445.234@web>",
                          "integration_id": 28643,
                          "rule_id": 89465,
                          "external_id": "MSG-78545",
                          "ticket_id": 12,
                          "channel": "email",
                          "via": "api",
                          "source": {
                            "type": "email",
                            "from": {
                              "id": 7,
                              "name": "Sender Doe",
                              "address": "sender@gorgias.io"
                            },
                            "to": [
                              {
                                "id": 8,
                                "name": "Receiver Doe",
                                "address": "receiver@gorgias.io"
                              }
                            ]
                          },
                          "subject": "Re:Refund request",
                          "body_text": "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        ",
                          "body_html": "Hello,<br><br>\n\n        I can't place an order on your site, it says: I don't have enough credit.<br>\n        How can I add some credits?<br><br>\n\n        Cheers,<br>\n        John Doe\n        ",
                          "stripped_text": null,
                          "stripped_html": null,
                          "stripped_signature": null,
                          "public": true,
                          "from_agent": true,
                          "sender": {
                            "id": 7
                          },
                          "receiver": {
                            "id": 8
                          },
                          "attachments": [],
                          "meta": {},
                          "headers": {},
                          "actions": [],
                          "macros": [
                            {
                              "id": 5132
                            }
                          ],
                          "created_datetime": "2020-01-27T10:42:21.468912",
                          "processed_datetime": "2020-01-27T10:42:21.468912",
                          "opened_datetime": "2019-07-05T15:22:46.472436",
                          "failed_datetime": null,
                          "last_sending_error": null,
                          "deleted_datetime": null,
                          "replied_by": null,
                          "replied_to": null
                        }
                      ],
                      "meta": {},
                      "opened_datetime": "2019-07-05T15:22:46.472436",
                      "satisfaction_survey": {
                        "id": 1234,
                        "uri": "/api/satisfaction-surveys/1234/",
                        "body_text": "Such speed, much pertinent.",
                        "created_datetime": "2019-11-16T15:59:41.966927",
                        "customer_id": 120,
                        "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
                      },
                      "snooze_datetime": null,
                      "spam": false,
                      "status": "open",
                      "subject": "Can I get a refund?",
                      "tags": [
                        {
                          "name": "urgent",
                          "description": "Mark a ticket as urgent",
                          "usage": 123,
                          "decoration": {
                            "color": "#F58D86"
                          },
                          "created_datetime": "2020-07-1300:00:00-05:00",
                          "deleted_datetime": "2020-07-1500:00:00-05:00"
                        }
                      ],
                      "trashed_datetime": null,
                      "updated_datetime": "2020-01-27T10:42:21.932637",
                      "via": "email",
                      "uri": "/api/tickets/123/"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Tickets"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Tickets"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "LegacyChannelSlug": {
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "help-center",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "phone",
          "sms",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo-review"
        ],
        "title": "legacy channel slug",
        "type": "string"
      },
      "TicketStatus": {
        "enum": [
          "open",
          "closed"
        ],
        "title": "ticket status",
        "type": "string"
      },
      "TicketVia": {
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "form",
          "gorgias_chat",
          "help-center",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "offline_capture",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "twilio",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo",
          "yotpo-review",
          "zendesk"
        ],
        "title": "ticket via",
        "type": "string"
      },
      "ManagedTicketFieldType": {
        "enum": [
          "contact_reason",
          "product",
          "resolution",
          "ai_intent",
          "ai_outcome",
          "ai_sales",
          "ai_discount",
          "ai_journey",
          "managed_sentiment",
          "call_status"
        ],
        "title": "managed ticket field type",
        "type": "string"
      },
      "RequirementType": {
        "enum": [
          "visible",
          "required",
          "conditional"
        ],
        "title": "requirement type",
        "type": "string"
      },
      "CreateTicketAssignee": {
        "properties": {
          "id": {
            "description": "ID of the user or team assigned to the ticket",
            "title": "id",
            "minimum": 0,
            "type": "integer"
          }
        },
        "title": "ticket assignee",
        "type": "object"
      },
      "CreateTicketCustomField": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the custom field",
            "title": "id",
            "type": "integer"
          },
          "value": {
            "description": "Value of the custom field",
            "title": "value"
          }
        },
        "required": [
          "id",
          "value"
        ],
        "title": "ticket custom field",
        "type": "object"
      },
      "CreateTicketCustomer": {
        "properties": {
          "id": {
            "description": "ID of the customer",
            "title": "id",
            "type": "integer"
          },
          "email": {
            "description": "Primary email of the customer",
            "title": "email",
            "maxLength": 320,
            "type": "string"
          },
          "name": {
            "description": "Name of the customer",
            "title": "name",
            "type": "string"
          }
        },
        "title": "ticket customer",
        "type": "object"
      },
      "CreateTicketMessage": {
        "properties": {
          "actions": {
            "description": "Actions associated with the message",
            "title": "actions",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                }
              ]
            },
            "type": "array"
          },
          "attachments": {
            "description": "Attachments associated with the message",
            "title": "attachments",
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageAttachment"
            },
            "type": "array"
          },
          "body_html": {
            "description": "HTML version of the body of the message",
            "title": "body  html",
            "type": "string"
          },
          "body_text": {
            "description": "Text version of the body of the message",
            "title": "body  text",
            "type": "string"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyChannelSlug"
              },
              {
                "type": "string"
              }
            ],
            "description": "Channel used to send the message",
            "title": "channel"
          },
          "created_datetime": {
            "description": "When the message was created",
            "title": "created  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the message was deleted",
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          },
          "external_id": {
            "description": "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.",
            "title": "external  id",
            "maxLength": 255,
            "type": "string"
          },
          "failed_datetime": {
            "description": "When the message failed to be sent. Messages that couldn't be sent can be resent.",
            "title": "failed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "from_agent": {
            "description": "Whether the message was sent by your company",
            "title": "from  agent",
            "type": "boolean"
          },
          "headers": {
            "description": "Headers of the message",
            "title": "headers",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                }
              ]
            },
            "type": "object"
          },
          "integration_id": {
            "description": "ID of the Integration used to send the message",
            "title": "integration  id",
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "last_sending_error": {
            "description": "Details of the last error encountered when Gorgias attempted to send the message",
            "$ref": "#/components/schemas/CreateTicketMessageLastSendingError"
          },
          "macros": {
            "description": "Macros used to compose the message",
            "title": "macros",
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageMacro"
            },
            "type": "array"
          },
          "message_id": {
            "description": "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...",
            "title": "message  id",
            "type": "string"
          },
          "meta": {
            "description": "Metadata associated with the ticket message. You can use this field to store structured information (key-value data) about the ticket message.",
            "$ref": "#/components/schemas/CreateTicketMessageMeta"
          },
          "opened_datetime": {
            "description": "When the message was seen by its recipient",
            "title": "opened  datetime",
            "format": "date-time",
            "type": "string"
          },
          "public": {
            "default": true,
            "description": "Whether the message is public. Only internal notes are private.",
            "title": "public",
            "type": "boolean"
          },
          "sent_datetime": {
            "description": "When the message was sent. If omitted, the message will be sent by Gorgias.",
            "title": "sent  datetime",
            "format": "date-time",
            "type": "string"
          },
          "source": {
            "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
            "$ref": "#/components/schemas/CreateTicketMessageSource"
          },
          "stripped_html": {
            "description": "HTML version of the body of the message without email signatures and previous replies.",
            "title": "stripped  html",
            "type": "string"
          },
          "stripped_signature": {
            "description": "Signature stripped from the body of the message",
            "title": "stripped  signature",
            "type": "string"
          },
          "stripped_text": {
            "description": "Text version of the body of the message without email signatures and previous replies.",
            "title": "stripped  text",
            "type": "string"
          },
          "subject": {
            "description": "Subject of the message",
            "title": "subject",
            "type": "string"
          },
          "via": {
            "default": "api",
            "description": "How the message has been received or sent from Gorgias",
            "enum": [
              "aircall",
              "api",
              "chat",
              "contact_form",
              "email",
              "facebook",
              "facebook-mention",
              "facebook-messenger",
              "facebook-recommendations",
              "form",
              "helpdesk",
              "help-center",
              "instagram",
              "instagram-ad-comment",
              "instagram-comment",
              "instagram-direct-message",
              "instagram-mention",
              "internal-note",
              "phone",
              "rule",
              "shopify",
              "sms",
              "twilio",
              "twitter",
              "twitter-direct-message",
              "whatsapp",
              "yotpo",
              "yotpo-review",
              "zendesk"
            ],
            "type": "string"
          },
          "mention_ids": {
            "description": "List of User IDs to mention along with the internal note.",
            "title": "mention  ids",
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "receiver": {
            "description": "Primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\".",
            "$ref": "#/components/schemas/CreateTicketMessageCustomerOrUser"
          },
          "sender": {
            "description": "Person who sent the message. It can be a user or a customer.",
            "$ref": "#/components/schemas/CreateTicketMessageCustomerOrUser"
          }
        },
        "required": [
          "channel",
          "from_agent"
        ],
        "title": "ticket message",
        "type": "object"
      },
      "CreateTicketMessageAttachment": {
        "properties": {
          "url": {
            "format": "uri",
            "minLength": 1,
            "title": "url",
            "type": "string"
          },
          "name": {
            "title": "name",
            "type": "string"
          },
          "size": {
            "title": "size",
            "type": "integer"
          },
          "content_type": {
            "title": "content  type",
            "type": "string"
          },
          "public": {
            "default": true,
            "title": "public",
            "type": "boolean"
          },
          "extra": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "extra"
          }
        },
        "required": [
          "url",
          "name",
          "content_type"
        ],
        "title": "ticket message attachment",
        "type": "object"
      },
      "CreateTicketMessageCustomerChannel": {
        "properties": {
          "type": {
            "title": "type",
            "type": "string"
          },
          "address": {
            "title": "address",
            "type": "string"
          }
        },
        "required": [
          "type",
          "address"
        ],
        "title": "ticket message customer channel",
        "type": "object"
      },
      "CreateTicketMessageCustomerOrUser": {
        "properties": {
          "id": {
            "description": "ID of the customer or user",
            "title": "id",
            "minimum": 0,
            "type": "integer"
          },
          "email": {
            "description": "Email of the customer or user",
            "title": "email",
            "maxLength": 320,
            "type": "string"
          },
          "name": {
            "description": "Name of the customer or user",
            "title": "name",
            "type": "string"
          },
          "external_id": {
            "description": "ID of the customer or user in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish.",
            "title": "external  id",
            "type": "string"
          },
          "note": {
            "description": "Note attached to the customer or user",
            "title": "note",
            "type": "string"
          },
          "timezone": {
            "description": "Timezone of the customer or user",
            "title": "timezone",
            "type": "string"
          },
          "language": {
            "description": "Language of the customer or user",
            "title": "language",
            "type": "string"
          },
          "meta": {
            "description": "Metadata associated with the customer or user. You can use this field to store structured information (key-value data) about the customer or user.",
            "title": "meta",
            "type": "object"
          },
          "channels": {
            "default": [],
            "description": "Channels associated with the customer or user",
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageCustomerChannel"
            },
            "title": "channels",
            "type": "array"
          }
        },
        "title": "ticket message customer or user",
        "type": "object"
      },
      "CreateTicketMessageLastSendingError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "title": "error",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "ticket message last sending error",
        "type": "object"
      },
      "CreateTicketMessageMacro": {
        "properties": {
          "id": {
            "exclusiveMinimum": 0,
            "title": "id",
            "type": "integer"
          }
        },
        "required": [
          "id"
        ],
        "title": "ticket message macro",
        "type": "object"
      },
      "CreateTicketMessageSourcePerson": {
        "properties": {
          "name": {
            "title": "name",
            "type": "string"
          },
          "address": {
            "title": "address",
            "type": "string"
          }
        },
        "title": "ticket message source person",
        "type": "object"
      },
      "CreateTicketTag": {
        "properties": {
          "name": {
            "description": "Name of the tag",
            "maxLength": 256,
            "minLength": 1,
            "title": "name",
            "type": "string"
          },
          "decoration": {
            "$ref": "#/components/schemas/CreateTicketTagDecoration"
          }
        },
        "required": [
          "name"
        ],
        "title": "ticket tag",
        "type": "object"
      },
      "CreateTicketTagDecoration": {
        "additionalProperties": false,
        "properties": {
          "color": {
            "title": "color",
            "type": "string"
          }
        },
        "title": "ticket tag decoration",
        "type": "object"
      },
      "TicketMessageSourceType": {
        "enum": [
          "aircall",
          "api",
          "app",
          "custom-chat",
          "chat",
          "chat-contact-form",
          "chat-offline-capture",
          "contact-form",
          "email",
          "facebook",
          "facebook-comment",
          "facebook-mention-comment",
          "facebook-mention-post",
          "facebook-message",
          "facebook-messenger",
          "facebook-post",
          "facebook-review",
          "facebook-review-comment",
          "form",
          "google-business-messages",
          "help-center",
          "help-center-contact-form",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-ad-media",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-media",
          "instagram-mention-comment",
          "instagram-mention-media",
          "internal-note",
          "ottspott-call",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "system-message",
          "tiktok-shop",
          "twilio",
          "twitter-direct-message",
          "twitter-mention-tweet",
          "twitter-quoted-tweet",
          "twitter-tweet",
          "whatsapp-message",
          "yotpo-review",
          "yotpo-review-private-comment",
          "yotpo-review-public-comment"
        ],
        "title": "ticket message source type",
        "type": "string"
      },
      "TicketPriority": {
        "enum": [
          "critical",
          "high",
          "normal",
          "low"
        ],
        "title": "ticket priority",
        "type": "string"
      },
      "CreateTicketMessageMeta": {
        "additionalProperties": true,
        "properties": {
          "relevant_content_indexes": {
            "title": "relevant  content  indexes",
            "items": {
              "type": "integer"
            },
            "type": "array"
          }
        },
        "title": "ticket message meta",
        "type": "object"
      },
      "CreateTicketMessageSource": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TicketMessageSourceType"
          },
          "from": {
            "$ref": "#/components/schemas/CreateTicketMessageSourcePerson"
          },
          "to": {
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageSourcePerson"
            },
            "title": "to",
            "type": "array"
          },
          "cc": {
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageSourcePerson"
            },
            "title": "cc",
            "type": "array"
          },
          "bcc": {
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessageSourcePerson"
            },
            "title": "bcc",
            "type": "array"
          },
          "extra": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "extra"
          }
        },
        "title": "ticket message source",
        "type": "object"
      },
      "CreateTicket": {
        "additionalProperties": false,
        "properties": {
          "assignee_team": {
            "description": "Team assigned to the ticket",
            "examples": [
              {}
            ],
            "$ref": "#/components/schemas/CreateTicketAssignee"
          },
          "assignee_user": {
            "description": "User assigned to this ticket",
            "examples": [
              {}
            ],
            "$ref": "#/components/schemas/CreateTicketAssignee"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyChannelSlug"
              },
              {
                "type": "string"
              }
            ],
            "description": "Channel used to initiate the conversation with the customer",
            "examples": [
              "email"
            ],
            "title": "channel"
          },
          "closed_datetime": {
            "description": "When the ticket was closed",
            "title": "closed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the ticket was created",
            "title": "created  datetime",
            "format": "date-time",
            "type": "string"
          },
          "custom_fields": {
            "description": "Custom fields associated with the ticket",
            "title": "custom  fields",
            "items": {
              "$ref": "#/components/schemas/CreateTicketCustomField"
            },
            "type": "array"
          },
          "customer": {
            "description": "Customer associated with the ticket",
            "$ref": "#/components/schemas/CreateTicketCustomer"
          },
          "external_id": {
            "description": "ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.",
            "title": "external  id",
            "maxLength": 255,
            "type": "string"
          },
          "from_agent": {
            "description": "Whether the first message of the ticket was sent by your company to a customer, or the opposite",
            "title": "from  agent",
            "type": "boolean"
          },
          "language": {
            "description": "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.",
            "title": "language",
            "type": "string"
          },
          "last_message_datetime": {
            "description": "When the last message was sent",
            "title": "last  message  datetime",
            "format": "date-time",
            "type": "string"
          },
          "last_received_message_datetime": {
            "description": "When the last customer's message was received",
            "title": "last  received  message  datetime",
            "format": "date-time",
            "type": "string"
          },
          "messages": {
            "description": "Messages of the ticket",
            "items": {
              "$ref": "#/components/schemas/CreateTicketMessage"
            },
            "maxItems": 500,
            "minItems": 1,
            "title": "messages",
            "type": "array"
          },
          "meta": {
            "description": "Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket",
            "title": "meta",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                }
              ]
            },
            "type": "object"
          },
          "opened_datetime": {
            "description": "When the ticket was opened for the first time by a User",
            "title": "opened  datetime",
            "format": "date-time",
            "type": "string"
          },
          "priority": {
            "$ref": "#/components/schemas/TicketPriority",
            "default": "normal",
            "description": "Priority of the ticket"
          },
          "snooze_datetime": {
            "description": "When the ticket will be re-opened automatically",
            "title": "snooze  datetime",
            "format": "date-time",
            "type": "string"
          },
          "spam": {
            "default": false,
            "description": "Whether the ticket is considered as spam",
            "title": "spam",
            "type": "boolean"
          },
          "split_from": {
            "description": "ID of the ticket that this ticket was split from.",
            "title": "split  from",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/TicketStatus",
            "default": "open",
            "description": "The status of the ticket"
          },
          "subject": {
            "description": "Subject of the ticket",
            "title": "subject",
            "maxLength": 998,
            "type": "string"
          },
          "tags": {
            "description": "The tags associated with the ticket",
            "title": "tags",
            "items": {
              "$ref": "#/components/schemas/CreateTicketTag"
            },
            "type": "array"
          },
          "trashed_datetime": {
            "description": "When the ticket was moved to the trash",
            "title": "trashed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the ticket was lastly updated",
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "via": {
            "default": "api",
            "description": "How the first message of the ticket has been received or sent from Gorgias",
            "enum": [
              "aircall",
              "api",
              "chat",
              "contact_form",
              "email",
              "facebook",
              "facebook-mention",
              "facebook-messenger",
              "facebook-recommendations",
              "form",
              "helpdesk",
              "help-center",
              "instagram",
              "instagram-ad-comment",
              "instagram-comment",
              "instagram-direct-message",
              "instagram-mention",
              "internal-note",
              "phone",
              "rule",
              "shopify",
              "sms",
              "twilio",
              "twitter",
              "twitter-direct-message",
              "whatsapp",
              "yotpo",
              "yotpo-review",
              "zendesk"
            ],
            "type": "string"
          },
          "imported": {
            "default": false,
            "description": "Whether the ticket was created by a historical import. When set to true, the ticket and all its messages are flagged as imported.",
            "title": "imported",
            "type": "boolean"
          }
        },
        "required": [
          "messages"
        ],
        "title": "ticket",
        "type": "object"
      },
      "Currency": {
        "description": "ISO 4217 currency.  Its enumerants are ISO 4217 currencies except for\nsome special currencies like ```XXX``.  Enumerants names are lowercase\ncureency code e.g. :attr:`Currency.eur`, :attr:`Currency.usd`.",
        "enum": [
          "AFN",
          "EUR",
          "ALL",
          "DZD",
          "USD",
          "AOA",
          "XCD",
          "ARS",
          "AMD",
          "AWG",
          "AUD",
          "AZN",
          "BSD",
          "BHD",
          "BDT",
          "BBD",
          "BYN",
          "BZD",
          "XOF",
          "BMD",
          "INR",
          "BTN",
          "BOB",
          "BOV",
          "BAM",
          "BWP",
          "NOK",
          "BRL",
          "BND",
          "BGN",
          "BIF",
          "CVE",
          "KHR",
          "XAF",
          "CAD",
          "KYD",
          "CLP",
          "CLF",
          "CNY",
          "COP",
          "COU",
          "KMF",
          "CDF",
          "NZD",
          "CRC",
          "HRK",
          "CUP",
          "CUC",
          "ANG",
          "CZK",
          "DKK",
          "DJF",
          "DOP",
          "EGP",
          "SVC",
          "ERN",
          "SZL",
          "ETB",
          "FKP",
          "FJD",
          "XPF",
          "GMD",
          "GEL",
          "GHS",
          "GIP",
          "GTQ",
          "GBP",
          "GNF",
          "GYD",
          "HTG",
          "HNL",
          "HKD",
          "HUF",
          "ISK",
          "IDR",
          "XDR",
          "IRR",
          "IQD",
          "ILS",
          "JMD",
          "JPY",
          "JOD",
          "KZT",
          "KES",
          "KPW",
          "KRW",
          "KWD",
          "KGS",
          "LAK",
          "LBP",
          "LSL",
          "ZAR",
          "LRD",
          "LYD",
          "CHF",
          "MOP",
          "MKD",
          "MGA",
          "MWK",
          "MYR",
          "MVR",
          "MRU",
          "MUR",
          "XUA",
          "MXN",
          "MXV",
          "MDL",
          "MNT",
          "MAD",
          "MZN",
          "MMK",
          "NAD",
          "NPR",
          "NIO",
          "NGN",
          "OMR",
          "PKR",
          "PAB",
          "PGK",
          "PYG",
          "PEN",
          "PHP",
          "PLN",
          "QAR",
          "RON",
          "RUB",
          "RWF",
          "SHP",
          "WST",
          "STN",
          "SAR",
          "RSD",
          "SCR",
          "SLL",
          "SLE",
          "SGD",
          "XSU",
          "SBD",
          "SOS",
          "SSP",
          "LKR",
          "SDG",
          "SRD",
          "SEK",
          "CHE",
          "CHW",
          "SYP",
          "TWD",
          "TJS",
          "TZS",
          "THB",
          "TOP",
          "TTD",
          "TND",
          "TRY",
          "TMT",
          "UGX",
          "UAH",
          "AED",
          "USN",
          "UYU",
          "UYI",
          "UYW",
          "UZS",
          "VUV",
          "VES",
          "VED",
          "VND",
          "YER",
          "ZMW",
          "ZWL",
          "XBA",
          "XBB",
          "XBC",
          "XBD",
          "XTS",
          "XXX",
          "XAU",
          "XPD",
          "XPT",
          "XAG"
        ],
        "title": "currency",
        "type": "string"
      },
      "DefinitionBoolean": {
        "additionalProperties": false,
        "properties": {
          "data_type": {
            "const": "boolean",
            "enum": [
              "boolean"
            ],
            "title": "data  type",
            "type": "string"
          },
          "input_settings": {
            "$ref": "#/components/schemas/InputSettingsDropdown_bool"
          }
        },
        "required": [
          "data_type",
          "input_settings"
        ],
        "title": "definition boolean",
        "type": "object"
      },
      "DefinitionNumber": {
        "additionalProperties": false,
        "properties": {
          "data_type": {
            "const": "number",
            "enum": [
              "number"
            ],
            "title": "data  type",
            "type": "string"
          },
          "input_settings": {
            "$ref": "#/components/schemas/InputSettingsNumber"
          }
        },
        "required": [
          "data_type",
          "input_settings"
        ],
        "title": "definition number",
        "type": "object"
      },
      "DefinitionText": {
        "additionalProperties": false,
        "properties": {
          "data_type": {
            "const": "text",
            "enum": [
              "text"
            ],
            "title": "data  type",
            "type": "string"
          },
          "input_settings": {
            "discriminator": {
              "mapping": {
                "dropdown": "#/components/schemas/InputSettingsDropdown_str",
                "input": "#/components/schemas/InputSettingsText"
              },
              "propertyName": "input_type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/InputSettingsText"
              },
              {
                "$ref": "#/components/schemas/InputSettingsDropdown_str"
              }
            ],
            "title": "input  settings"
          }
        },
        "required": [
          "data_type",
          "input_settings"
        ],
        "title": "definition text",
        "type": "object"
      },
      "DiscountType": {
        "enum": [
          "percentage",
          "fixed_amount"
        ],
        "title": "discount type",
        "type": "string"
      },
      "EventObjectType": {
        "enum": [
          "Account",
          "AccountSetting",
          "Customer",
          "CustomField",
          "CustomFieldCondition",
          "CustomUserAvailabilityStatus",
          "CustomerExternalData",
          "Integration",
          "Macro",
          "Order",
          "Role",
          "Rule",
          "SatisfactionSurvey",
          "Shopper",
          "ShopperAddress",
          "Subscription",
          "Tag",
          "Team",
          "TicketMessage",
          "Ticket",
          "User",
          "UserSetting",
          "View",
          "Widget"
        ],
        "title": "event object type",
        "type": "string"
      },
      "InputSettingsDropdown_bool": {
        "additionalProperties": false,
        "properties": {
          "input_type": {
            "const": "dropdown",
            "enum": [
              "dropdown"
            ],
            "title": "input  type",
            "type": "string"
          },
          "choices": {
            "items": {
              "type": "boolean"
            },
            "title": "choices",
            "type": "array"
          },
          "default": {
            "title": "default",
            "type": "boolean"
          }
        },
        "required": [
          "input_type",
          "choices"
        ],
        "title": "input settings dropdown[bool]",
        "type": "object"
      },
      "InputSettingsDropdown_str": {
        "additionalProperties": false,
        "properties": {
          "input_type": {
            "const": "dropdown",
            "enum": [
              "dropdown"
            ],
            "title": "input  type",
            "type": "string"
          },
          "choices": {
            "items": {
              "type": "string"
            },
            "title": "choices",
            "type": "array"
          },
          "default": {
            "title": "default",
            "type": "string"
          }
        },
        "required": [
          "input_type",
          "choices"
        ],
        "title": "input settings dropdown[str]",
        "type": "object"
      },
      "InputSettingsNumber": {
        "additionalProperties": false,
        "properties": {
          "input_type": {
            "const": "input_number",
            "enum": [
              "input_number"
            ],
            "title": "input  type",
            "type": "string"
          },
          "placeholder": {
            "title": "placeholder",
            "type": "string"
          },
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "title": "min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "title": "max"
          }
        },
        "required": [
          "input_type"
        ],
        "title": "input settings number",
        "type": "object"
      },
      "InputSettingsText": {
        "additionalProperties": false,
        "properties": {
          "input_type": {
            "const": "input",
            "enum": [
              "input"
            ],
            "title": "input  type",
            "type": "string"
          },
          "placeholder": {
            "title": "placeholder",
            "type": "string"
          }
        },
        "required": [
          "input_type"
        ],
        "title": "input settings text",
        "type": "object"
      },
      "Order": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the order.",
            "examples": [
              123456
            ],
            "title": "id",
            "type": "integer"
          },
          "external_id": {
            "description": "The ID in the external ecommerce platform.",
            "examples": [
              "example-id-123"
            ],
            "title": "external  id",
            "type": "string"
          },
          "shopper_external_id": {
            "description": "The customer's ID in the external ecommerce platform.",
            "examples": [
              "example-id-123"
            ],
            "title": "shopper  external  id",
            "type": "string"
          },
          "number": {
            "description": "Order number.",
            "examples": [
              123456
            ],
            "title": "number",
            "type": "integer"
          },
          "name": {
            "description": "The name of the order.",
            "examples": [
              "Order #123456"
            ],
            "title": "name",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "The currency of the order",
            "examples": [
              "usd"
            ]
          },
          "discount_codes": {
            "description": "The discount codes applied to the order.",
            "examples": [
              "DISCOUNT_CODE_1",
              "DISCOUNT_CODE_2"
            ],
            "title": "discount  codes",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The flat discount amount.",
            "examples": [
              "20"
            ],
            "title": "discount  amount"
          },
          "subtotal_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The subtotal for the line items.",
            "examples": [
              "20"
            ],
            "title": "subtotal  amount"
          },
          "shipping_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The shipping amount.",
            "examples": [
              "20"
            ],
            "title": "shipping  amount"
          },
          "tax_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The tax amount.",
            "examples": [
              "20"
            ],
            "title": "tax  amount"
          },
          "total_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The total amount.",
            "examples": [
              "20"
            ],
            "title": "total  amount"
          },
          "external_status": {
            "description": "Ecommerce platform's native order status.",
            "examples": [
              "pending"
            ],
            "title": "external  status",
            "type": "string"
          },
          "external_fulfillment_status": {
            "description": "Ecommerce platform's native order fulfillment status.",
            "examples": [
              "fulfilled"
            ],
            "title": "external  fulfillment  status",
            "type": "string"
          },
          "external_payment_status": {
            "description": "Ecommerce platform's native order payment status.",
            "examples": [
              "paid"
            ],
            "title": "external  payment  status",
            "type": "string"
          },
          "status": {
            "description": "The status of the order",
            "examples": [
              "completed"
            ],
            "$ref": "#/components/schemas/Status"
          },
          "payment_status": {
            "description": "The status of the order",
            "examples": [
              "paid"
            ],
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "billing_address": {
            "$ref": "#/components/schemas/ShopperAddress",
            "description": "The billing address for the order."
          },
          "shipping_address": {
            "$ref": "#/components/schemas/ShopperAddress",
            "description": "The shipping address for the order."
          },
          "line_items": {
            "description": "The line items for the order.",
            "items": {
              "$ref": "#/components/schemas/OrderLine"
            },
            "title": "line  items",
            "type": "array"
          },
          "created_datetime": {
            "description": "When the order was created.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the order was updated.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the order was deleted.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "external_id",
          "shopper_external_id",
          "number",
          "name",
          "currency",
          "discount_codes",
          "discount_amount",
          "subtotal_amount",
          "shipping_amount",
          "tax_amount",
          "total_amount",
          "external_status",
          "external_fulfillment_status",
          "external_payment_status",
          "status",
          "payment_status",
          "billing_address",
          "shipping_address",
          "line_items",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime"
        ],
        "title": "order",
        "type": "object"
      },
      "OrderLine": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the address.",
            "examples": [
              123456
            ],
            "title": "id",
            "type": "integer"
          },
          "title": {
            "description": "The custom title of the product for the current order.",
            "examples": [
              "My Awesome Product"
            ],
            "title": "title",
            "type": "string"
          },
          "taxable": {
            "description": "Whether item is taxable or not.",
            "examples": [
              true
            ],
            "title": "taxable",
            "type": "boolean"
          },
          "requires_shipping": {
            "description": "Whether item requires shipping or not.",
            "examples": [
              true
            ],
            "title": "requires  shipping",
            "type": "boolean"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The price for a single unit.",
            "examples": [
              "123456"
            ],
            "title": "unit  price"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The discount amount.",
            "examples": [
              "20"
            ],
            "title": "discount  amount"
          },
          "discount_type": {
            "description": "Type of discount.",
            "examples": [
              "percentage"
            ],
            "$ref": "#/components/schemas/DiscountType"
          },
          "discount_reason": {
            "description": "The reason for granting a discount.",
            "examples": [
              "Refurbished product"
            ],
            "title": "discount  reason",
            "type": "string"
          },
          "quantity": {
            "description": "The number of products of this kind in the current order.",
            "examples": [
              5
            ],
            "title": "quantity",
            "type": "integer"
          },
          "total_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "The total amount for the quantity of products.",
            "examples": [
              "5"
            ],
            "title": "total  amount"
          },
          "product_options": {
            "description": "Additional information for the product in current order.",
            "examples": [
              {
                "size": 10
              }
            ],
            "title": "product  options",
            "type": "object"
          },
          "fulfilled_quantity": {
            "description": "The number of products of this kind that have been fulfilled.",
            "examples": [
              5
            ],
            "title": "fulfilled  quantity",
            "type": "integer"
          },
          "created_datetime": {
            "description": "When the order line was created.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the order line was updated.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the order line was deleted.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "taxable",
          "requires_shipping",
          "unit_price",
          "discount_amount",
          "discount_type",
          "discount_reason",
          "quantity",
          "total_amount",
          "product_options",
          "fulfilled_quantity",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime"
        ],
        "title": "order line",
        "type": "object"
      },
      "PaymentStatus": {
        "enum": [
          "refunded",
          "partially_refunded",
          "unpaid",
          "voided",
          "failed",
          "manual_verification_required",
          "customer_authentication_required",
          "paid",
          "declined",
          "authorized"
        ],
        "title": "payment status",
        "type": "string"
      },
      "ShopperAddress": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the address.",
            "examples": [
              123456
            ],
            "title": "id",
            "type": "integer"
          },
          "external_id": {
            "description": "The ID in the external ecommerce platform.",
            "examples": [
              "example-id-123"
            ],
            "title": "external  id",
            "type": "string"
          },
          "shopper_external_id": {
            "description": "The shopper's ID in the external ecommerce platform.",
            "examples": [
              "example-id-123"
            ],
            "title": "shopper  external  id",
            "type": "string"
          },
          "preferred": {
            "description": "Whether the address is preferred or not.",
            "examples": [
              true
            ],
            "title": "preferred",
            "type": "boolean"
          },
          "line_1": {
            "description": "The first line of an address where the primary information for locating a recipient is provided",
            "examples": [
              "123 Main Street"
            ],
            "title": "line 1",
            "type": "string"
          },
          "line_2": {
            "description": "Additional information for locating a recipient, such as the floor of a building",
            "examples": [
              "Apt 123, Floor 2"
            ],
            "title": "line 2",
            "type": "string"
          },
          "city": {
            "description": "The city where the address is located.",
            "examples": [
              "Miami"
            ],
            "title": "city",
            "type": "string"
          },
          "state": {
            "description": "The state where the address is located.",
            "examples": [
              "FL"
            ],
            "title": "state",
            "type": "string"
          },
          "country": {
            "description": "The country where the address is located.",
            "examples": [
              "USA"
            ],
            "title": "country",
            "type": "string"
          },
          "zip_code": {
            "description": "The zip code of the address.",
            "examples": [
              "123456"
            ],
            "title": "zip  code",
            "type": "string"
          },
          "first_name": {
            "description": "The first name for the contact person.",
            "examples": [
              "Jane"
            ],
            "title": "first  name",
            "type": "string"
          },
          "last_name": {
            "description": "The last name for the contact person.",
            "examples": [
              "Doe"
            ],
            "title": "last  name",
            "type": "string"
          },
          "phone_number": {
            "description": "The phone number for the contact person.",
            "examples": [
              "+1 123 456 7890"
            ],
            "title": "phone  number",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the address was created.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the address was updated.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the address was deleted.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "external_id",
          "shopper_external_id",
          "preferred",
          "line_1",
          "line_2",
          "city",
          "state",
          "country",
          "zip_code",
          "first_name",
          "last_name",
          "phone_number",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime"
        ],
        "title": "shopper address",
        "type": "object"
      },
      "Shopper": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the address.",
            "examples": [
              123456
            ],
            "title": "id",
            "type": "integer"
          },
          "external_id": {
            "description": "The ID in the external ecommerce platform.",
            "examples": [
              "example-id-123"
            ],
            "title": "external  id",
            "type": "string"
          },
          "helpdesk_customer_id": {
            "description": "ID of the helpdesk customer associated to this store.",
            "examples": [
              123456
            ],
            "title": "helpdesk  customer  id",
            "type": "integer"
          },
          "email_address": {
            "description": "The email address of the shopper.",
            "examples": [
              "foo@bar.com"
            ],
            "title": "email  address",
            "format": "email",
            "type": "string"
          },
          "phone_number": {
            "description": "The phone number of the shopper.",
            "examples": [
              "+1 123 456 7890"
            ],
            "title": "phone  number",
            "type": "string"
          },
          "first_name": {
            "description": "The first name of the shopper.",
            "examples": [
              "Jean"
            ],
            "title": "first  name",
            "type": "string"
          },
          "middle_name": {
            "description": "The middle name of the shopper.",
            "examples": [
              "Mary"
            ],
            "title": "middle  name",
            "type": "string"
          },
          "last_name": {
            "description": "The last name of the shopper.",
            "examples": [
              "Doe"
            ],
            "title": "last  name",
            "type": "string"
          },
          "birthdate": {
            "description": "The birthdate of the shopper.",
            "examples": [
              "2023-07-15"
            ],
            "title": "birthdate",
            "format": "date",
            "type": "string"
          },
          "status": {
            "description": "The status of the shopper.",
            "examples": [
              "tax_exempt"
            ],
            "$ref": "#/components/schemas/ShopperStatus"
          },
          "accepts_marketing_email": {
            "description": "Whether the shopper accepts marketing emails.",
            "examples": [
              true
            ],
            "title": "accepts  marketing  email",
            "type": "boolean"
          },
          "accepts_marketing_sms": {
            "description": "Whether the shopper accepts marketing SMS.",
            "examples": [
              true
            ],
            "title": "accepts  marketing  sms",
            "type": "boolean"
          },
          "created_datetime": {
            "description": "When the shopper was created.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the shopper was updated.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the shopper was deleted.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "external_id",
          "helpdesk_customer_id",
          "email_address",
          "phone_number",
          "first_name",
          "middle_name",
          "last_name",
          "birthdate",
          "status",
          "accepts_marketing_email",
          "accepts_marketing_sms",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime"
        ],
        "title": "shopper",
        "type": "object"
      },
      "ShopperEcommerceData": {
        "additionalProperties": false,
        "properties": {
          "store": {
            "$ref": "#/components/schemas/Store"
          },
          "shopper": {
            "$ref": "#/components/schemas/Shopper"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "title": "orders",
            "type": "array"
          },
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/ShopperAddress"
            },
            "title": "addresses",
            "type": "array"
          }
        },
        "required": [
          "store",
          "shopper",
          "orders",
          "addresses"
        ],
        "title": "shopper ecommerce data",
        "type": "object"
      },
      "ShopperStatus": {
        "enum": [
          "tax_exempt",
          "veteran"
        ],
        "title": "shopper status",
        "type": "string"
      },
      "Status": {
        "enum": [
          "partially_fulfilled",
          "completed",
          "canceled",
          "on_hold",
          "awaiting_fulfillment",
          "awaiting_payment",
          "scheduled",
          "order_pending"
        ],
        "title": "status",
        "type": "string"
      },
      "Store": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the store.",
            "examples": [
              123456
            ],
            "title": "id",
            "type": "integer"
          },
          "currencies": {
            "description": "Currencies supported by the store.",
            "examples": [
              "usd",
              "eur"
            ],
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "title": "currencies",
            "type": "array"
          },
          "default_currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "Default currency of the store.",
            "examples": [
              "usd"
            ]
          },
          "display_name": {
            "description": "Display name of the store.",
            "examples": [
              "My Demo Store"
            ],
            "title": "display  name",
            "type": "string"
          },
          "name": {
            "description": "Name of the store (case sensitive).",
            "examples": [
              "my-demo-store"
            ],
            "title": "name",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/StoreType",
            "description": "Type of the store.",
            "examples": [
              "woocommerce"
            ]
          },
          "url": {
            "description": "URL of the store.",
            "examples": [
              "https://my-demo-store.com/"
            ],
            "title": "url",
            "type": "string"
          },
          "helpdesk_integration_id": {
            "description": "ID of the integration associated to this store.",
            "examples": [
              123456
            ],
            "title": "helpdesk  integration  id",
            "type": "integer"
          },
          "uuid": {
            "description": "UUID of the store.",
            "examples": [
              "7736626b-0d5f-4e2c-86de-8b74e3401c26"
            ],
            "format": "uuid",
            "title": "uuid",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the store was created.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the store was updated.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the store was deleted.",
            "examples": [
              "2023-07-15T00:00:00.000000+00:00"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "currencies",
          "default_currency",
          "display_name",
          "name",
          "type",
          "url",
          "helpdesk_integration_id",
          "uuid",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime"
        ],
        "title": "store",
        "type": "object"
      },
      "StoreType": {
        "enum": [
          "bigcommerce",
          "magento",
          "shopify",
          "woocommerce"
        ],
        "title": "store type",
        "type": "string"
      },
      "TicketCustomField": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "exclusiveMinimum": 0,
            "title": "id",
            "type": "integer"
          },
          "external_id": {
            "title": "external  id",
            "type": "string"
          },
          "object_type": {
            "$ref": "#/components/schemas/EventObjectType"
          },
          "label": {
            "title": "label",
            "type": "string"
          },
          "description": {
            "title": "description",
            "type": "string"
          },
          "priority": {
            "title": "priority",
            "type": "integer"
          },
          "required": {
            "title": "required",
            "type": "boolean"
          },
          "requirement_type": {
            "$ref": "#/components/schemas/RequirementType"
          },
          "managed_type": {
            "$ref": "#/components/schemas/ManagedTicketFieldType"
          },
          "definition": {
            "discriminator": {
              "mapping": {
                "boolean": "#/components/schemas/DefinitionBoolean",
                "number": "#/components/schemas/DefinitionNumber",
                "text": "#/components/schemas/DefinitionText"
              },
              "propertyName": "data_type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/DefinitionNumber"
              },
              {
                "$ref": "#/components/schemas/DefinitionText"
              },
              {
                "$ref": "#/components/schemas/DefinitionBoolean"
              }
            ],
            "title": "definition"
          },
          "created_datetime": {
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deactivated_datetime": {
            "title": "deactivated  datetime",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object_type",
          "label",
          "priority",
          "required",
          "requirement_type",
          "definition",
          "created_datetime"
        ],
        "title": "ticket custom field",
        "type": "object"
      },
      "TicketCustomFieldValue": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "$ref": "#/components/schemas/TicketCustomField"
          },
          "id": {
            "title": "id",
            "type": "integer"
          },
          "prediction": {
            "default": null,
            "title": "prediction"
          },
          "value": {
            "title": "value"
          }
        },
        "required": [
          "value"
        ],
        "title": "ticket custom field value",
        "type": "object"
      },
      "TicketCustomer": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the customer.",
            "examples": [
              3924
            ],
            "title": "id",
            "type": "integer"
          },
          "email": {
            "description": "Primary email address of the customer.",
            "examples": [
              "john@example.com"
            ],
            "title": "email",
            "type": "string"
          },
          "name": {
            "description": "Full name of the customer",
            "examples": [
              "John Smith"
            ],
            "title": "name",
            "type": "string"
          },
          "firstname": {
            "description": "First name of the customer.",
            "examples": [
              "John"
            ],
            "title": "firstname",
            "type": "string"
          },
          "lastname": {
            "description": "Last name of the customer.",
            "examples": [
              "Smith"
            ],
            "title": "lastname",
            "type": "string"
          },
          "meta": {
            "description": "User defined JSON field. It can be useful for storing additional info about the object.",
            "examples": [
              {
                "position": "engineer"
              }
            ],
            "title": "meta"
          },
          "channels": {
            "description": "The [customer's contact channels](#the-customerchannel-object).",
            "items": {
              "$ref": "#/components/schemas/TicketCustomerChannel"
            },
            "title": "channels",
            "type": "array"
          },
          "data": {
            "title": "data"
          },
          "customer": {
            "title": "customer"
          },
          "integrations": {
            "description": "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. ",
            "examples": [
              {
                "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"
                    }
                  ]
                }
              }
            ],
            "title": "integrations",
            "type": "object"
          },
          "external_id": {
            "description": "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.",
            "examples": [
              "customer-84203241"
            ],
            "title": "external  id",
            "type": "string"
          },
          "note": {
            "description": "A note associated with the customer.",
            "examples": [
              "Our best customer."
            ],
            "title": "note",
            "type": "string"
          },
          "external_data": {
            "description": "External data associated with the customer.",
            "title": "external  data",
            "additionalProperties": {
              "type": "object"
            },
            "type": "object"
          },
          "ecommerce_data": {
            "description": "Ecommerce data associated with the customer.",
            "title": "ecommerce  data",
            "additionalProperties": {
              "$ref": "#/components/schemas/ShopperEcommerceData"
            },
            "type": "object"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "firstname",
          "lastname",
          "meta",
          "channels",
          "data",
          "customer",
          "integrations",
          "external_id",
          "note"
        ],
        "title": "ticket customer",
        "type": "object"
      },
      "TicketCustomerChannel": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the object",
            "title": "id",
            "type": "integer"
          },
          "type": {
            "description": "Either the slug of a non-legacy channel or one of email,phone,chat,twitter,facebook,instagram,instagram-direct-message,whatsapp,whatsapp-bsuid",
            "examples": [
              "email"
            ],
            "title": "type",
            "type": "string"
          },
          "address": {
            "description": "Address can be email, phone, facebook id, etc...",
            "examples": [
              "marie@gorgias.io"
            ],
            "title": "address",
            "type": "string"
          },
          "preferred": {
            "default": false,
            "description": "Is this the preferred or (primary) channel to contact this user.",
            "title": "preferred",
            "type": "boolean"
          },
          "created_datetime": {
            "description": "When the user channel was created.",
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the user channel was last updated.",
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the user channel was deleted.",
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/TicketCustomerChannelCustomer"
          },
          "customer": {
            "$ref": "#/components/schemas/TicketCustomerChannelCustomer"
          }
        },
        "required": [
          "id",
          "type",
          "address",
          "created_datetime",
          "updated_datetime",
          "deleted_datetime",
          "user",
          "customer"
        ],
        "title": "ticket customer channel",
        "type": "object"
      },
      "TicketCustomerChannelCustomer": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the object",
            "title": "id",
            "type": "integer"
          },
          "name": {
            "description": "Full name of the customer",
            "examples": [
              "John Smith"
            ],
            "title": "name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ticket customer channel customer",
        "type": "object"
      },
      "TicketEvent": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the event.",
            "examples": [
              1234
            ],
            "title": "id",
            "type": "integer"
          },
          "type": {
            "description": "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-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-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-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`, `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`.",
            "examples": [
              "ticket-closed"
            ],
            "title": "type",
            "type": "string"
          },
          "user": {
            "description": "The user who triggered the event if any.",
            "examples": [
              {
                "email": "steve@company.com",
                "firstname": "Steve",
                "id": 3924,
                "lastname": "Frazeli",
                "name": "Steve Frazelli"
              }
            ],
            "$ref": "#/components/schemas/TicketEventUser"
          },
          "data": {
            "description": "Data associated with the event (key-value data).",
            "examples": [
              null
            ],
            "title": "data",
            "type": "object"
          },
          "created_datetime": {
            "description": "When the event was created.",
            "examples": [
              "2019-11-16T15:59:41.966927"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "user",
          "data",
          "created_datetime"
        ],
        "title": "ticket event",
        "type": "object"
      },
      "TicketEventUser": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the user.",
            "examples": [
              3924
            ],
            "title": "id",
            "type": "integer"
          },
          "firstname": {
            "description": "First name of the user.",
            "examples": [
              "Steve"
            ],
            "title": "firstname",
            "type": "string"
          },
          "lastname": {
            "description": "Last name of the user.",
            "examples": [
              "Frazeli"
            ],
            "title": "lastname",
            "type": "string"
          },
          "name": {
            "description": "Full name of the user.",
            "examples": [
              "Steve Frazelli"
            ],
            "title": "name",
            "type": "string"
          },
          "email": {
            "description": "Email address of the user. `password_confirmation` field must be provided to change the email.",
            "examples": [
              "steve@company.com"
            ],
            "title": "email",
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstname",
          "lastname",
          "name",
          "email"
        ],
        "title": "ticket event user",
        "type": "object"
      },
      "TicketMessage": {
        "additionalProperties": false,
        "description": "A ticket-message represents a message (an email, an SMS, a Facebook comment, chat message, etc..) under a normalized format.\nThere are 3 types of messages:\n  - Outgoing messages: messages sent by your company (by rules or support agents) to your customers.\n  - Incoming messages: messages sent by your [customers](#the-customer-object) to your company.\n  - Internal notes: internal messages sent between support agents ([users](#the-user-object)). Internal notes are not sent/shared with your customers.\n\nA ticket-message is associated with only one ticket.",
        "properties": {
          "id": {
            "description": "ID of the message.",
            "examples": [
              924712
            ],
            "title": "id",
            "type": "integer"
          },
          "uri": {
            "description": "URI of the message.",
            "title": "uri",
            "type": "string"
          },
          "message_id": {
            "description": "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...",
            "examples": [
              "<123345676453.2445.234@web>"
            ],
            "title": "message  id",
            "type": "string"
          },
          "ticket_id": {
            "description": "The ID of the ticket the message is associated with.",
            "examples": [
              12
            ],
            "title": "ticket  id",
            "type": "integer"
          },
          "external_id": {
            "description": "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.",
            "examples": [
              "MSG-78545"
            ],
            "title": "external  id",
            "type": "string"
          },
          "public": {
            "default": true,
            "description": "Whether the message was sent/receive by a customer. Internal notes are not public.",
            "examples": [
              true
            ],
            "title": "public",
            "type": "boolean"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyChannelSlug"
              },
              {
                "type": "string"
              }
            ],
            "description": "The channel used to send the message.",
            "examples": [
              "email"
            ],
            "title": "channel"
          },
          "via": {
            "$ref": "#/components/schemas/TicketVia",
            "description": "How the message has been received, or sent from Gorgias.",
            "examples": [
              "api"
            ]
          },
          "source": {
            "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
            "examples": [
              {
                "from": {
                  "address": "sender@gorgias.io",
                  "id": 7,
                  "name": "Sender Doe"
                },
                "to": [
                  {
                    "address": "receiver@gorgias.io",
                    "id": 8,
                    "name": "Receiver Doe"
                  }
                ],
                "type": "email"
              }
            ],
            "$ref": "#/components/schemas/TicketMessageSource"
          },
          "sender": {
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer",
            "description": "The person who sent the message. It can be a user or a customer.",
            "examples": [
              {
                "id": 93
              }
            ]
          },
          "auth_customer_identity": {
            "description": "Identity of the authenticated customer, if any, in the context of a message sent on a channel that does not require authentication such as email, SMS or Gorgias chat.This attribute is used to differentiate messages sent by unauthenticated and authenticated customers.",
            "$ref": "#/components/schemas/TicketMessageAuthCustomerIdentity"
          },
          "integration_id": {
            "description": "ID of the integration that either received or sent the message.",
            "examples": [
              28643
            ],
            "title": "integration  id",
            "type": "integer"
          },
          "intents": {
            "items": {
              "$ref": "#/components/schemas/TicketMessageIntent"
            },
            "title": "intents",
            "type": "array"
          },
          "rule_id": {
            "description": "ID of the rule which sent the message, if any.",
            "examples": [
              89465
            ],
            "title": "rule  id",
            "type": "integer"
          },
          "from_agent": {
            "description": "Whether the message was sent by your company to a customer, or the opposite.",
            "examples": [
              true
            ],
            "title": "from  agent",
            "type": "boolean"
          },
          "receiver": {
            "description": "The primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\".",
            "examples": [
              {
                "id": 8
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          },
          "subject": {
            "description": "The subject of the message.",
            "examples": [
              "Re:Refund request"
            ],
            "title": "subject",
            "type": "string"
          },
          "body_text": {
            "description": "The full text version of the body of the message, if any.",
            "examples": [
              "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        "
            ],
            "title": "body  text",
            "type": "string"
          },
          "body_html": {
            "description": "The full HTML version of the body of the message, if any.",
            "examples": [
              "Hello,<br><br>\n\n            I can't place an order on your site, it says: I don't have enough credit.<br>\n            How can I add some credits?<br><br>\n\n            Cheers,<br>\n            John Doe\n            "
            ],
            "title": "body  html",
            "type": "string"
          },
          "body_url": {
            "description": "The URL to download the archived body of the email message. Empty until the body is archived, 30 days after it was sent or received. Only applies to email messages that have stripped bodies.",
            "title": "body  url",
            "type": "string"
          },
          "stripped_text": {
            "description": "The text version of the body of the message without email signatures and previous replies.",
            "examples": [
              null
            ],
            "title": "stripped  text",
            "type": "string"
          },
          "stripped_html": {
            "description": "The HTML version of the body of the message without email signatures and previous replies.",
            "examples": [
              null
            ],
            "title": "stripped  html",
            "type": "string"
          },
          "stripped_signature": {
            "title": "stripped  signature",
            "type": "string"
          },
          "attachments": {
            "description": "A list of files attached to the message.",
            "examples": [
              []
            ],
            "title": "attachments",
            "items": {
              "$ref": "#/components/schemas/TicketMessageAttachment"
            },
            "type": "array"
          },
          "macros": {
            "description": "A list of macros.",
            "examples": [
              []
            ],
            "title": "macros",
            "items": {
              "$ref": "#/components/schemas/TicketMessageMacro"
            },
            "type": "array"
          },
          "actions": {
            "description": "A list of actions executed before the message was sent. These actions are set by macros.",
            "examples": [
              []
            ],
            "title": "actions",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "headers": {
            "description": "Message headers. Used for email messages.",
            "examples": [
              {
                "My-Header": "foo"
              }
            ],
            "title": "headers",
            "type": "object"
          },
          "imported": {
            "description": "Whether the message was created by a historical import.",
            "examples": [
              false
            ],
            "title": "imported",
            "type": "boolean"
          },
          "meta": {
            "description": "Metadata associated with the message.\n\nYou can use this field to store structured information (key-value data) about the message.\n\nReserved keys:\n\n- `current_page`: The page from where the user is currently chatting.\n- `relevant_content_indexes`: Indexes containing relevant text of the message.\n- `is_quick_reply`: Whether the message is a \"quick reply\".\n- `campaigns`: ID of the chat campaign the message is replying to.\n- `campaigns_id`: ID of the chat campaign that sent this message.\n- `self_service_flow`: An object containing metadata of the self-service flow associated to the message.\n",
            "examples": [
              {}
            ],
            "title": "meta"
          },
          "created_datetime": {
            "description": "When the message was created.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "processed_datetime": {
            "description": "When the message was processed by Gorgias. Differs from `created_datetime` which refers to the external service.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "title": "processed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the message was deleted.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          },
          "sent_datetime": {
            "description": "When the message was sent. If omitted, the message will be sent by Gorgias.",
            "title": "sent  datetime",
            "format": "date-time",
            "type": "string"
          },
          "failed_datetime": {
            "description": "When the message failed to be sent. Messages that couldn't be sent can be resend.",
            "examples": [
              null
            ],
            "title": "failed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "opened_datetime": {
            "description": "When the message was opened by the primary receiver.",
            "examples": [
              "2019-07-05T15:22:46.472436"
            ],
            "title": "opened  datetime",
            "format": "date-time",
            "type": "string"
          },
          "last_sending_error": {
            "description": "Details of the last error encountered when Gorgias attempted to send the message.",
            "examples": [
              null
            ],
            "$ref": "#/components/schemas/TicketMessageSendingError"
          },
          "is_retriable": {
            "description": "It determines if the message can be retried or not.",
            "title": "is  retriable",
            "type": "boolean"
          },
          "replied_by": {
            "description": "The message designated as a response to the current message. This field is temporary and only provided to the web app.",
            "title": "replied  by",
            "$ref": "#/components/schemas/TicketMessageRepliedByOrTo"
          },
          "replied_to": {
            "description": "The message designated as replied by the current message. This field is temporary and only provided to the web app.",
            "title": "replied  to",
            "$ref": "#/components/schemas/TicketMessageRepliedByOrTo"
          }
        },
        "required": [
          "id",
          "uri",
          "message_id",
          "ticket_id",
          "external_id",
          "channel",
          "via",
          "source",
          "sender",
          "auth_customer_identity",
          "integration_id",
          "intents",
          "rule_id",
          "from_agent",
          "receiver",
          "subject",
          "body_text",
          "body_html",
          "body_url",
          "stripped_text",
          "stripped_html",
          "stripped_signature",
          "attachments",
          "actions",
          "imported",
          "meta",
          "created_datetime",
          "processed_datetime",
          "sent_datetime",
          "failed_datetime",
          "opened_datetime",
          "last_sending_error",
          "is_retriable"
        ],
        "title": "ticket message",
        "type": "object"
      },
      "TicketMessageAttachment": {
        "properties": {
          "url": {
            "description": "The URL to access to the attached file.",
            "examples": [
              "https://gorgias.io/attachments/file.pdf"
            ],
            "title": "url",
            "type": "string"
          },
          "name": {
            "description": "The name of the file.",
            "examples": [
              "file.pdf"
            ],
            "title": "name",
            "type": "string"
          },
          "size": {
            "description": "The size of the file, in bytes.",
            "examples": [
              784554
            ],
            "title": "size",
            "type": "integer"
          },
          "content_type": {
            "description": "The MIME type of the file.",
            "examples": [
              "application/pdf"
            ],
            "title": "content  type",
            "type": "string"
          },
          "public": {
            "description": "Whether or not the attachment can be accessed.",
            "examples": [
              true
            ],
            "title": "public",
            "type": "boolean"
          },
          "extra": {
            "description": "Extra information for custom content type attachment",
            "examples": [
              {}
            ],
            "title": "extra"
          }
        },
        "required": [
          "url",
          "content_type"
        ],
        "title": "ticket message attachment",
        "type": "object"
      },
      "TicketMessageAuthCustomerIdentity": {
        "additionalProperties": false,
        "properties": {
          "service": {
            "$ref": "#/components/schemas/TicketMessageAuthCustomerIdentityService",
            "description": "The service/channel used to authenticate the customer. E.g.: email, phone, shopify"
          },
          "identifier": {
            "description": "The ID of the customer related to the service. E.g.: email address, phone number, Shopify customer ID, etc.",
            "title": "identifier",
            "type": "string"
          }
        },
        "required": [
          "service",
          "identifier"
        ],
        "title": "ticket message auth customer identity",
        "type": "object"
      },
      "TicketMessageAuthCustomerIdentityService": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "The ID of the service the identity belongs to.",
            "title": "id",
            "type": "string"
          },
          "name": {
            "description": "The name of the service the identity belongs to.",
            "title": "name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ticket message auth customer identity service",
        "type": "object"
      },
      "TicketMessageIntent": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "The intention the message probably has, example: discount/request",
            "examples": [
              "discount/request"
            ],
            "title": "name",
            "type": "string"
          },
          "rejected": {
            "description": "Whether or not the intent was rejected",
            "title": "rejected",
            "type": "boolean"
          },
          "is_user_feedback": {
            "description": "Whether or not the intent comes from a user feedback",
            "title": "is  user  feedback",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "rejected",
          "is_user_feedback"
        ],
        "title": "ticket message intent",
        "type": "object"
      },
      "TicketMessageMacro": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "exclusiveMinimum": 0,
            "title": "id",
            "type": "integer"
          }
        },
        "required": [
          "id"
        ],
        "title": "ticket message macro",
        "type": "object"
      },
      "TicketMessageRepliedByOrTo": {
        "additionalProperties": false,
        "properties": {
          "integration_id": {
            "description": "ID of the integration which created the message.",
            "examples": [
              28643
            ],
            "title": "integration  id",
            "type": "integer"
          },
          "message_id": {
            "description": "ID of the message in Gorgias.",
            "examples": [
              1234
            ],
            "title": "message  id",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the message was created.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "body_text": {
            "description": "The full text version of the body of the message, if any.",
            "examples": [
              "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        "
            ],
            "title": "body  text",
            "type": "string"
          },
          "source": {
            "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
            "examples": [
              {
                "from": {
                  "address": "sender@gorgias.io",
                  "id": 7,
                  "name": "Sender Doe"
                },
                "to": [
                  {
                    "address": "receiver@gorgias.io",
                    "id": 8,
                    "name": "Receiver Doe"
                  }
                ],
                "type": "email"
              }
            ],
            "$ref": "#/components/schemas/TicketMessageSource"
          },
          "customer": {
            "description": "The customer who sent the message.",
            "examples": [
              {
                "id": 93
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          },
          "user": {
            "description": "The agent who sent the message.",
            "examples": [
              {
                "id": 95
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          }
        },
        "required": [
          "integration_id",
          "message_id",
          "created_datetime",
          "body_text",
          "source",
          "customer",
          "user"
        ],
        "title": "ticket message replied by or to",
        "type": "object"
      },
      "TicketMessageSendingError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "title": "error",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "ticket message sending error",
        "type": "object"
      },
      "TicketMessageSourceAddress": {
        "properties": {
          "name": {
            "title": "name",
            "type": "string"
          },
          "address": {
            "title": "address",
            "type": "string"
          }
        },
        "title": "ticket message source address",
        "type": "object"
      },
      "TicketMessageSource": {
        "properties": {
          "type": {
            "description": "Describes a more detailed channel information of how the message was sent/received. Either the slug of a non-legacy channel or one of aircall,api,app,chat,chat-contact-form,chat-offline-capture,contact-form,email,facebook-comment,facebook-message,facebook-messenger,facebook-post,facebook-mention-post,facebook-mention-comment,facebook,facebook-review,facebook-review-comment,form,help-center,helpdesk,instagram-ad-comment,instagram-ad-media,instagram-comment,instagram-mention-comment,instagram-media,instagram-mention-media,instagram,instagram-direct-message,internal-note,ottspott-call,phone,rule,self_service,shopify,sms,system-message,twilio,yotpo-review,yotpo-review-public-comment,yotpo-review-private-comment,twitter-tweet,twitter-quoted-tweet,twitter-mention-tweet,twitter-direct-message,help-center-contact-form,whatsapp-message.",
            "title": "type",
            "type": "string"
          },
          "to": {
            "description": "A list of To addresses. To and From are usually present for most channel types.",
            "title": "to",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "cc": {
            "description": "A list of CC addresses. Only present in an email context.",
            "title": "cc",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "bcc": {
            "description": "A list of BCC addresses. Only present in an email context.",
            "title": "bcc",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "from": {
            "description": "A single From address. To and From are usually present for most channel types.",
            "$ref": "#/components/schemas/TicketMessageSourceAddress"
          },
          "extra": {
            "title": "extra"
          }
        },
        "required": [
          "type"
        ],
        "title": "ticket message source",
        "type": "object"
      },
      "TicketMessageUserOrCustomer": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "id",
            "type": "integer"
          },
          "email": {
            "title": "email",
            "type": "string"
          },
          "name": {
            "title": "name",
            "type": "string"
          },
          "firstname": {
            "title": "firstname",
            "type": "string"
          },
          "lastname": {
            "title": "lastname",
            "type": "string"
          },
          "meta": {
            "title": "meta"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "firstname",
          "lastname",
          "meta"
        ],
        "title": "ticket message user or customer",
        "type": "object"
      },
      "TicketMeta": {
        "title": "ticket meta"
      },
      "TicketReplyOption": {
        "additionalProperties": false,
        "properties": {
          "answerable": {
            "title": "answerable",
            "type": "boolean"
          },
          "reason": {
            "title": "reason",
            "type": "string"
          },
          "integrations": {
            "title": "integrations",
            "items": {
              "$ref": "#/components/schemas/TicketReplyOptionIntegration"
            },
            "type": "array"
          }
        },
        "required": [
          "answerable"
        ],
        "title": "ticket reply option",
        "type": "object"
      },
      "TicketReplyOptionIntegration": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "id",
            "type": "integer"
          },
          "name": {
            "title": "name",
            "type": "string"
          },
          "address": {
            "title": "address",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "address"
        ],
        "title": "ticket reply option integration",
        "type": "object"
      },
      "TicketSatisfactionSurvey": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the survey.",
            "examples": [
              1234
            ],
            "title": "id",
            "type": "integer"
          },
          "customer_id": {
            "description": "The ID of the customer who filled the survey.",
            "examples": [
              120
            ],
            "title": "customer  id",
            "type": "integer"
          },
          "ticket_id": {
            "description": "The ID of the ticket the survey is associated with.",
            "examples": [
              12
            ],
            "title": "ticket  id",
            "type": "integer"
          },
          "sent_datetime": {
            "description": "When the survey was sent. If is not set it means that it was not sent yet.",
            "examples": [
              "2019-11-23T15:59:41.966927"
            ],
            "title": "sent  datetime",
            "format": "date-time",
            "type": "string"
          },
          "scored_datetime": {
            "description": "When the survey was filled by the customer.",
            "examples": [
              "2019-11-25T15:59:41.966927"
            ],
            "title": "scored  datetime",
            "format": "date-time",
            "type": "string"
          },
          "should_send_datetime": {
            "description": "When the survey should be sent. If not set then the survey will not be sent by Gorgias.",
            "examples": [
              "2019-11-23T15:59:41.966927"
            ],
            "title": "should  send  datetime",
            "format": "date-time",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the survey was created.",
            "examples": [
              "2019-11-16T15:59:41.966927"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "score": {
            "description": "The level of satisfaction. Scores range from 1 to 5.",
            "examples": [
              2
            ],
            "title": "score",
            "maximum": 5,
            "minimum": 1,
            "type": "integer"
          },
          "body_text": {
            "description": "The comment sent by the customer.",
            "examples": [
              "Such speed, much pertinent."
            ],
            "title": "body  text",
            "maxLength": 1000,
            "type": "string"
          },
          "meta": {
            "description": "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.",
            "examples": [
              {
                "externalData": {
                  "id": 1234
                }
              }
            ],
            "title": "meta",
            "type": "object"
          }
        },
        "required": [
          "id",
          "customer_id",
          "ticket_id",
          "sent_datetime",
          "scored_datetime",
          "should_send_datetime",
          "created_datetime",
          "score",
          "body_text",
          "meta"
        ],
        "title": "ticket satisfaction survey",
        "type": "object"
      },
      "TicketSummary": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "description": "The content of the AI summary.",
            "examples": [
              "The customer is asking for a refund."
            ],
            "title": "content",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the ticket was summarized by AI for the first time.",
            "examples": [
              "2020-01-27T10:42:21.932637"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the ticket was summarized by AI for the last time.",
            "examples": [
              "2020-01-27T10:42:21.932637"
            ],
            "format": "date-time",
            "title": "updated  datetime",
            "type": "string"
          },
          "triggered_by": {
            "description": "The id of the user who triggered the summary generation, if triggered manually.",
            "examples": [
              1
            ],
            "title": "triggered  by",
            "type": "integer"
          }
        },
        "required": [
          "content",
          "created_datetime",
          "updated_datetime",
          "triggered_by"
        ],
        "title": "ticket summary",
        "type": "object"
      },
      "TicketTag": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the tag",
            "title": "id",
            "type": "integer"
          },
          "name": {
            "description": "Name of the tag. Tags' names are case sensitive.",
            "examples": [
              "urgent"
            ],
            "title": "name",
            "type": "string"
          },
          "decoration": {
            "description": "Information related to the style of the tag.",
            "examples": [
              {
                "color": "#F58D86"
              }
            ],
            "$ref": "#/components/schemas/TicketTagDecoration"
          }
        },
        "required": [
          "id",
          "name",
          "decoration"
        ],
        "title": "ticket tag",
        "type": "object"
      },
      "TicketTagDecoration": {
        "properties": {
          "color": {
            "description": "The color of the tag (Hex color code).",
            "examples": [
              "#F58D86"
            ],
            "title": "color",
            "type": "string"
          }
        },
        "title": "ticket tag decoration",
        "type": "object"
      },
      "TicketUser": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "ID of the user.",
            "examples": [
              3924
            ],
            "title": "id",
            "type": "integer"
          },
          "email": {
            "description": "Email address of the user. `password_confirmation` field must be provided to change the email.",
            "examples": [
              "steve@company.com"
            ],
            "title": "email",
            "type": "string"
          },
          "name": {
            "description": "Full name of the user.",
            "examples": [
              "Steve Frazelli"
            ],
            "title": "name",
            "type": "string"
          },
          "firstname": {
            "description": "First name of the user.",
            "examples": [
              "Steve"
            ],
            "title": "firstname",
            "type": "string"
          },
          "lastname": {
            "description": "Last name of the user.",
            "examples": [
              "Frazeli"
            ],
            "title": "lastname",
            "type": "string"
          },
          "meta": {
            "description": "Data associated with the user.",
            "examples": [
              {
                "avatar_url": "https://avatars.example.com/steve-profile.jpeg",
                "position": "engineer"
              }
            ],
            "title": "meta"
          },
          "bio": {
            "description": "Short biography of the user.",
            "examples": [
              "Full stack developer at Gorgias"
            ],
            "title": "bio",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "firstname",
          "lastname",
          "meta",
          "bio"
        ],
        "title": "ticket user",
        "type": "object"
      },
      "Ticket": {
        "additionalProperties": false,
        "description": "A ticket is a conversation between your support agents and one of your customers.\nIt 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).",
        "properties": {
          "id": {
            "description": "ID of the ticket.",
            "examples": [
              123
            ],
            "title": "id",
            "type": "integer"
          },
          "uri": {
            "description": "URI of the ticket.",
            "title": "uri",
            "type": "string"
          },
          "external_id": {
            "description": "External ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.",
            "examples": [
              "RETURN#4213"
            ],
            "title": "external  id",
            "type": "string"
          },
          "events": {
            "deprecated": true,
            "description": "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.",
            "examples": [
              [
                {
                  "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"
                  }
                }
              ]
            ],
            "items": {
              "$ref": "#/components/schemas/TicketEvent"
            },
            "title": "events",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/TicketStatus",
            "default": "open",
            "description": "Ticket status is used for managing the lifecycle of the ticket",
            "examples": [
              "open"
            ]
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyChannelSlug"
              },
              {
                "type": "string"
              }
            ],
            "description": "The channel used to initiate the conversation with the customer.",
            "examples": [
              "email"
            ],
            "title": "channel"
          },
          "via": {
            "$ref": "#/components/schemas/TicketVia",
            "description": "How the first message of the ticket has been received or sent from Gorgias.",
            "examples": [
              "email"
            ]
          },
          "from_agent": {
            "description": "Whether the first message of the ticket was sent by your company to a customer, or the opposite.",
            "title": "from  agent",
            "type": "boolean"
          },
          "spam": {
            "description": "Whether the ticket is considered as spam or not.",
            "examples": [
              false
            ],
            "title": "spam",
            "type": "boolean"
          },
          "imported": {
            "description": "Whether the ticket was created by a historical import.",
            "examples": [
              false
            ],
            "title": "imported",
            "type": "boolean"
          },
          "customer": {
            "$ref": "#/components/schemas/TicketCustomer",
            "description": "The customer linked to the ticket.",
            "examples": [
              {
                "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": {
            "description": "The agent assigned to this ticket.",
            "examples": [
              {
                "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"
              }
            ],
            "$ref": "#/components/schemas/TicketUser"
          },
          "language": {
            "description": "The language primarily used in the ticket.\nThe 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.",
            "examples": [
              "fr"
            ],
            "title": "language",
            "type": "string"
          },
          "subject": {
            "description": "The subject of the ticket.",
            "examples": [
              "Can I get a refund?"
            ],
            "title": "subject",
            "type": "string"
          },
          "summary": {
            "description": "The summary of the ticket.",
            "examples": [
              {
                "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"
              }
            ],
            "$ref": "#/components/schemas/TicketSummary"
          },
          "meta": {
            "description": "Extra metadatas about the ticket.",
            "examples": [
              {}
            ],
            "$ref": "#/components/schemas/TicketMeta"
          },
          "tags": {
            "description": "[Tags](#the-tag-object) linked to the ticket.",
            "examples": [
              [
                {
                  "decoration": {
                    "color": "#F58D86"
                  },
                  "name": "urgent"
                }
              ]
            ],
            "items": {
              "$ref": "#/components/schemas/TicketTag"
            },
            "title": "tags",
            "type": "array"
          },
          "custom_fields": {
            "description": "The custom fields associated with the ticket.",
            "title": "custom  fields",
            "additionalProperties": {
              "$ref": "#/components/schemas/TicketCustomFieldValue"
            },
            "type": "object"
          },
          "messages": {
            "description": "Messages of the ticket.",
            "items": {
              "$ref": "#/components/schemas/TicketMessage"
            },
            "title": "messages",
            "type": "array"
          },
          "created_datetime": {
            "description": "When the ticket was created.",
            "examples": [
              "2019-07-05T14:42:00.384938"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "processed_datetime": {
            "description": "When the ticket was processed by Gorgias. Differs from `created_datetime` which refers to the external service.",
            "examples": [
              "2019-07-05T14:42:00.384938"
            ],
            "title": "processed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "opened_datetime": {
            "description": "When the ticket was opened for the first time by a user.",
            "examples": [
              "2019-07-05T15:22:46.472436"
            ],
            "title": "opened  datetime",
            "format": "date-time",
            "type": "string"
          },
          "last_received_message_datetime": {
            "description": "When the last customer's message was sent.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "title": "last  received  message  datetime",
            "format": "date-time",
            "type": "string"
          },
          "last_message_datetime": {
            "description": "When the last message was sent.",
            "examples": [
              "2020-02-01T19:12:32.432197"
            ],
            "title": "last  message  datetime",
            "format": "date-time",
            "type": "string"
          },
          "updated_datetime": {
            "description": "When the ticket was lastly updated.",
            "examples": [
              "2020-01-27T10:42:21.932637"
            ],
            "title": "updated  datetime",
            "format": "date-time",
            "type": "string"
          },
          "closed_datetime": {
            "description": "When the ticket was closed.",
            "examples": [
              null
            ],
            "title": "closed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "trashed_datetime": {
            "description": "When the ticket was moved to the trash.",
            "examples": [
              null
            ],
            "title": "trashed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "snooze_datetime": {
            "description": "When the ticket will be re-opened.",
            "examples": [
              null
            ],
            "title": "snooze  datetime",
            "format": "date-time",
            "type": "string"
          },
          "satisfaction_survey": {
            "description": "The satisfaction survey linked to the ticket.",
            "examples": [
              {
                "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
              }
            ],
            "$ref": "#/components/schemas/TicketSatisfactionSurvey"
          },
          "reply_options": {
            "additionalProperties": {
              "$ref": "#/components/schemas/TicketReplyOption"
            },
            "title": "reply  options",
            "type": "object"
          },
          "is_unread": {
            "description": "Whether the ticket is unread for you.",
            "examples": [
              true
            ],
            "title": "is  unread",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "uri",
          "external_id",
          "events",
          "channel",
          "via",
          "from_agent",
          "spam",
          "imported",
          "customer",
          "assignee_user",
          "language",
          "subject",
          "meta",
          "tags",
          "messages",
          "created_datetime",
          "processed_datetime",
          "opened_datetime",
          "last_received_message_datetime",
          "last_message_datetime",
          "updated_datetime",
          "closed_datetime",
          "trashed_datetime",
          "snooze_datetime",
          "satisfaction_survey",
          "reply_options",
          "is_unread"
        ],
        "title": "ticket",
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "The username will be the email address of your Gorgias account and the password will be your API key."
      }
    }
  }
}
````