{
  "data": {
    "id": 101,
    "url": "https://www.example.com/tickets/101",
    "external_id": "EXT1001",
    "events": [
      {
        "idcreated_datetime": "2024-08-22T10:00:00Z",
        "data": {
          "action": "Ticket Created",
          "details": "Initial creation of the ticket"
        },
        "type": "Creation",
        "user": {
          "id": 2001,
          "firstname": "Alice",
          "lastname": "Johnson",
          "name": "Alice Johnson",
          "email": "alice.johnson@example.com"
        },
        "uri": "https://www.example.com/events/1001"
      }
    ],
    "status": "Open",
    "channel": "Email",
    "via": "Web",
    "from_agent": false,
    "is_unread": true,
    "spam": null,
    "customer": {
      "id": 501,
      "channels": [
        {
          "id": 1,
          "type": "Email",
          "address": "customer501@example.com",
          "preferred": true,
          "created_datetime": "2024-01-01T12:00:00Z",
          "updated_datetime": "2024-01-02T12:00:00Z",
          "deleted_datetime": null,
          "user": {
            "id": 501,
            "name": "John Doe"
          },
          "customer": {
            "id": 501,
            "name": "John Doe"
          }
        }
      ],
      "email": "customer501@example.com",
      "external_id": "CUST1001",
      "firstname": "John",
      "integrations": {
        "CRM": {
          "customer_level": "Gold"
        }
      },
      "external_data": [
        {
          "loyalty_points": 1200
        }
      ],
      "ecommerce_data": {
        "last_purchase": {
          "date": "2024-01-10",
          "amount": 300
        }
      },
      "lastname": "Doe",
      "meta": null,
      "name": "John Doe",
      "note": "High value customer"
    },
    "assignee_user": {
      "id": 301,
      "email": "agent301@example.com",
      "name": "Sarah Parker",
      "firstname": "Sarah",
      "lastname": "Parker",
      "meta": {
        "sso": "sso-agent-link",
        "profile_picture_url": "https://www.example.com/images/agent301.jpg"
      }
    },
    "language": "en",
    "subject": "Support Request",
    "meta": {
      "priority": "high",
      "category": "technical"
    },
    "tags": [
      {
        "id": 1,
        "name": "Urgent",
        "uri": "https://www.example.com/tags/urgent",
        "decoration": {
          "color": "#FF0000"
        }
      }
    ],
    "custom_fields": null,
    "messages": [
      {
        "id": 201,
        "attachments": [
          {
            "url": "https://www.example.com/attachments/guide.pdf",
            "name": "UserGuide.pdf",
            "size": 1024,
            "content_type": "application/pdf",
            "public": true,
            "extra": "Attachment with additional details"
          }
        ],
        "body_html": "<p>Please see the attached user guide for more information.</p>",
        "body_text": "Please see the attached user guide for more information.",
        "channel": "Email",
        "created_datetime": "2024-08-22T10:05:00Z",
        "external_id": null,
        "failed_datetime": null,
        "from_agent": true,
        "integration_id": 101,
        "last_sending_error": null,
        "message_id": "MSG2001",
        "receiver": {
          "id": 501,
          "email": "customer501@example.com",
          "name": "John Doe",
          "firstname": "John",
          "lastname": "Doe",
          "meta": null
        },
        "rule_id": 101,
        "sender": {
          "id": 301,
          "email": "agent301@example.com",
          "name": "Sarah Parker",
          "firstname": "Sarah",
          "lastname": "Parker",
          "meta": null
        },
        "sent_datetime": "2024-08-22T10:05:00Z",
        "source": {
          "type": "email",
          "to": [
            {
              "name": "John Doe",
              "address": "customer501@example.com"
            }
          ],
          "cc": [],
          "bcc": [],
          "from": {
            "name": "Sarah Parker",
            "address": "agent301@example.com"
          }
        },
        "stripped_html": "<p>Please see the attached user guide for more information.</p>",
        "stripped_text": "Please see the attached user guide for more information.",
        "subject": "User Guide",
        "ticket_id": 101,
        "via": "Email",
        "uri": "https://www.example.com/messages/201"
      }
    ],
    "created_datetime": "2024-08-22T10:00:00Z",
    "opened_datetime": "2024-08-22T10:01:00Z",
    "last_received_message_datetime": "2024-08-22T10:04:00Z",
    "last_message_datetime": "2024-08-22T10:05:00Z",
    "updated_datetime": "2024-08-22T10:06:00Z",
    "closed_datetime": null,
    "trashed_datetime": null,
    "snooze_datetime": null,
    "satisfaction_survey": {
      "id": 401,
      "body_text": "Please rate our service.",
      "created_datetime": "2024-08-22T10:30:00Z",
      "customer_id": 501,
      "meta": null,
      "score": null,
      "scored_datetime": null,
      "sent_datetime": null,
      "should_send_datetime": "2024-08-23T10:30:00Z",
      "ticket_id": 101
    },
    "reply_options": "Reply, Forward, Archive"
  }
}