> ## Documentation Index
> Fetch the complete documentation index at: https://docs.periskope.app/llms.txt
> Use this file to discover all available pages before exploring further.

# The Ticket Object

> The Ticket Info Object represents a ticket on Periskope.

> This object represents a detailed ticket along with its related chat and message details on Periskope.

<ResponseExample>
  ```json The Ticket Object theme={null}
  {
    "chat": {
      "org_id": "2997xx64-89bf-48d3-9a22-b314fxx017e5",
      "org_phone": "91900438XXXX@c.us",
      "chat_id": "919X836X025X090@Xc.us",
      "members": {
          "918527184400@c.us": {
              "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
              "chat_id": "919537851844@c.us",
              "is_admin": true,
              "org_phone": "918527184400@c.us",
              "contact_id": "918527184400@c.us",
              "is_internal": true,
              "contact_name": "Support",
              "contact_color": "#B4876E",
              "contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us.jpg?timestamp=1737690126280",
              "is_super_admin": true
          },
          "919537851844@c.us": {
              "org_id": "2997dd64-89bf-48d3-9a22-b314fca017e5",
              "chat_id": "919537851844@c.us",
              "is_admin": true,
              "org_phone": "918527184400@c.us",
              "contact_id": "919537851844@c.us",
              "is_internal": false,
              "contact_name": "BK Local1",
              "contact_color": "#B4876E",
              "contact_image": "https://storage.googleapis.com/periskope-images/2997dd64-89bf-48d3-9a22-b314fca017e5%2F919537851844%40c.us.jpg?timestamp=1737689973340",
              "is_super_admin": true
          }
      },
      "is_muted": false,
      "chat_name": "Demo Chat",
      "chat_type": "chat",
      "chat_image": "/storage/image.jpeg",
      "created_at": "2025-01-26T02:30:50+00:00",
      "chat_labels": "label1, label2",
      "invite_link": "https://chat.whatsapp.com/invite/BZcwk7oCxxVIhExxxcmKxN"
      "custom_properties": {
        "Property1": "opXtion1",
        "Property2": "opXtion1",
        "Property3": "opXtion1"
      },
      "group_description": null
    },
    "message": {
      "body": "hello",
      "chat_id": "X919836025090@c.us",
      "org_phone": "X91900438XXXX@c.us",
      "timestamp": "2024-05-13T17:27:15+00:00",
      "media_path": "/path/to/media",
      "message_id": "true_91983602XXXX@c.us_3EB0DAB631F7E58XXXXE0C",
      "sender_name": "Periskope Central",
      "performed_by": "demo@email.com",
      "sender_phone": "91900438XXXX"
    },
    "ticket": {
      "org_id": "2997xx64-89bf-48d3-9a22-b314fxx017e5",
      "status": "open",
      "subject": "Sample Ticket Subject",
      "assignee": "assignee@example.com",
      "due_date": "2024-06-15T12:00:00+00:00",
      "priority": 2,
      "closed_at": "2024-06-14T12:00:00+00:00",
      "closed_by": "closedby@example.com",
      "raised_by": "raisedby@example.com",
      "ticket_id": "TICKET-12345",
      "created_at": "2024-05-24T08:30:00+00:00",
      "is_deleted": false,
      "assigned_by": "manager@example.com",
      "ticket_labels": "label1, label2",
      "quoted_message_id": "3EB0DAB631F7E580EAAE0C"
      "ticket_custom_properties": {
            "property-1": "value-1",
            "property-2": "value-2",
            "property-3": "value-3"
        },
      "first_assigned_at" : null
    },
    "attached_messages": [{
      "body": "hello",
      "chat_id": "X919836025090@c.us",
      "org_phone": "X91900438XXXX@c.us",
      "timestamp": "2024-05-13T17:27:15+00:00",
      "media_path": "/path/to/media",
      "message_id": "true_91983602XXXX@c.us_3EB0DAB631F7E58XXXXE0C",
      "sender_name": "Periskope Central",
      "performed_by": "demo@email.com",
      "sender_phone": "91900438XXXX"
    },{
      "body": "attached message 1",
      "chat_id": "X919836025090@c.us",
      "org_phone": "X91900438XXXX@c.us",
      "timestamp": "2024-05-13T17:27:15+00:00",
      "media_path": "/path/to/media",
      "message_id": "true_91983602XXXX@c.us_3EB0DAB631F7E58XXXXE0C",
      "sender_name": "Periskope Central",
      "performed_by": "demo@email.com",
      "sender_phone": "91900438XXXX"
    }]
  }
  ```
</ResponseExample>

## Attributes

<ParamField path="chat" type="object">
  <Expandable>
    <ParamField path="org_id" type="string">
      The unique identifier of the organization.
    </ParamField>

    <ParamField path="org_phone" type="string">
      The phone number of the organization.
    </ParamField>

    <ParamField path="chat_id" type="string">
      The unique identifier of the chat.
    </ParamField>

    <ParamField path="members" type="object">
      A map of members in the chat, keyed by WhatsApp ID (format: `       {phone_number}@c.us`).

      <Expandable>
        <ParamField path="org_id" type="string">
          The unique identifier of the organization that owns the WhatsApp
          account.
        </ParamField>

        <ParamField path="chat_id" type="string">
          The unique identifier of the WhatsApp chat.
        </ParamField>

        <ParamField path="is_admin" type="boolean">
          Indicates if the member has admin privileges in the chat.
        </ParamField>

        <ParamField path="org_phone" type="string">
          The WhatsApp ID of the organization's account (format: `{phone_number}
                              @c.us`).
        </ParamField>

        <ParamField path="contact_id" type="string">
          The WhatsApp ID of the member (format: `{phone_number}@c.us`).
        </ParamField>

        <ParamField path="is_internal" type="boolean">
          Indicates if the member is an internal user of the organization.
        </ParamField>

        <ParamField path="contact_name" type="string">
          The display name of the member.
        </ParamField>

        <ParamField path="contact_color" type="string">
          The hex color code assigned to the member in Periskope's UI.
        </ParamField>

        <ParamField path="contact_image" type="string">
          The URL of the member's profile image.
        </ParamField>

        <ParamField path="is_super_admin" type="boolean">
          Indicates if the member has super admin privileges in the chat.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="is_muted" type="boolean">
      Indicates if notifications for this chat are muted.
    </ParamField>

    <ParamField path="chat_name" type="string">
      The name of the chat.
    </ParamField>

    <ParamField path="chat_type" type="string">
      The type of the chat.
    </ParamField>

    <ParamField path="chat_image" type="string">
      The image URL of the chat.
    </ParamField>

    <ParamField path="created_at" type="string">
      The ISO 8601 formatted timestamp when the chat was created.
    </ParamField>

    <ParamField path="chat_labels" type="string">
      Comma-separated labels associated with the chat.
    </ParamField>

    <ParamField path="invite_link" type="string">
      The invite link of the chat.
    </ParamField>

    <ParamField path="custom_properties" type="object">
      Additional custom properties of the chat. Key-value map for the custom
      properties associated with the chat.
    </ParamField>

    <ParamField path="group_description" type="string">
      The description text for group chats.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="ticket" type="object">
  <Expandable>
    <ParamField path="org_id" type="string">
      The unique identifier of the organization.
    </ParamField>

    <ParamField path="status" type="string">
      The status of the ticket.
    </ParamField>

    <ParamField path="subject" type="string">
      The subject of the ticket.
    </ParamField>

    <ParamField path="assignee" type="string">
      The email address of the assignee.
    </ParamField>

    <ParamField path="due_date" type="string">
      The due date of the ticket.
    </ParamField>

    <ParamField path="priority" type="number">
      The priority of the ticket.
    </ParamField>

    <ParamField path="closed_at" type="string">
      The date when the ticket was closed.
    </ParamField>

    <ParamField path="closed_by" type="string">
      The email address of the user who closed the ticket.
    </ParamField>

    <ParamField path="raised_by" type="string">
      The email address of the user who raised the ticket.
    </ParamField>

    <ParamField path="ticket_id" type="string">
      The unique identifier of the ticket.
    </ParamField>

    <ParamField path="created_at" type="string">
      The creation date of the ticket.
    </ParamField>

    <ParamField path="is_deleted" type="boolean">
      Is set to `true` if ticket is deleted. It is `false` otherwise.
    </ParamField>

    <ParamField path="ticket_labels" type="string">
      Comma-separated labels associated with the ticket.
    </ParamField>

    <ParamField path="assigned_by" type="string">
      The email address of the user who assigned the ticket.
    </ParamField>

    <ParamField path="quoted_message_id" type="string">
      The unique identifier of the quoted message.
    </ParamField>

    <ParamField path="ticket_custom_properties" type="object">
      Additional custom properties of the ticket. Key-value map for the custom
      properties associated with the ticket.
    </ParamField>

    <ParamField path="first_assigned_at" type="string">
      The date when the ticket was first assigned.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="message" type="object">
  <Expandable>
    <ParamField path="body" type="string">
      The text of the message.
    </ParamField>

    <ParamField path="chat_id" type="string">
      The unique identifier of the chat.
    </ParamField>

    <ParamField path="org_phone" type="string">
      The phone number of the organization.
    </ParamField>

    <ParamField path="timestamp" type="string">
      The timestamp of the message.
    </ParamField>

    <ParamField path="media_path" type="string">
      The media path of the message.
    </ParamField>

    <ParamField path="message_id" type="string">
      The unique identifier of the message.
    </ParamField>

    <ParamField path="sender_name" type="string">
      The name of the sender.
    </ParamField>

    <ParamField path="performed_by" type="string">
      The email address of the user who performed the action.
    </ParamField>

    <ParamField path="sender_phone" type="string">
      The phone number of the sender.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="attached_messages" type="array">
  An array of messages attached to the ticket.

  <Expandable>
    <ParamField path="body" type="string">
      The text of the message.
    </ParamField>

    <ParamField path="chat_id" type="string">
      The unique identifier of the chat.
    </ParamField>

    <ParamField path="org_phone" type="string">
      The phone number of the organization.
    </ParamField>

    <ParamField path="timestamp" type="string">
      The timestamp of the message.
    </ParamField>

    <ParamField path="media_path" type="string">
      The media path of the message.
    </ParamField>

    <ParamField path="message_id" type="string">
      The unique identifier of the message.
    </ParamField>

    <ParamField path="sender_name" type="string">
      The name of the sender.
    </ParamField>

    <ParamField path="performed_by" type="string">
      The email address of the user who performed the action.
    </ParamField>

    <ParamField path="sender_phone" type="string">
      The phone number of the sender.
    </ParamField>
  </Expandable>
</ParamField>
