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

# Get All Tickets

> Get all customer tickets from the database

Retrieve a list of all customer tickets stored in the database.

### Response

Returns an array of ticket objects. Each ticket contains the customer information and conversation details that led to its creation.

<ResponseField name="tickets" type="array">
  Array of ticket objects, each containing:

  <Expandable title="properties">
    <ResponseField name="ticket_id" type="string">Unique identifier for the ticket</ResponseField>
    <ResponseField name="conversation_id" type="string">ID of the conversation that created this ticket</ResponseField>

    <ResponseField name="customer_info" type="object">
      <Expandable title="properties">
        <ResponseField name="name" type="string">Customer's name</ResponseField>
        <ResponseField name="phone" type="string">Contact phone number</ResponseField>
        <ResponseField name="address" type="string">Service address</ResponseField>
        <ResponseField name="issue" type="string">Description of the issue</ResponseField>
        <ResponseField name="role" type="string">Customer's role (optional)</ResponseField>
        <ResponseField name="priority" type="string">Ticket priority (optional)</ResponseField>
        <ResponseField name="type" type="string">Request type (optional)</ResponseField>
        <ResponseField name="date_time" type="string">When the ticket was created</ResponseField>
        <ResponseField name="submission_date_time" type="string">When the ticket was submitted</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="status" type="string">Current status of the ticket</ResponseField>
    <ResponseField name="created_at" type="string">Timestamp when the ticket was created</ResponseField>
    <ResponseField name="updated_at" type="string">Timestamp of last ticket update</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl 'https://api.clever.nivara.io/tickets'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "tickets": [
      {
        "ticket_id": "ticket_123",
        "conversation_id": "conv_123abc456def",
        "customer_info": {
          "name": "John Smith",
          "phone": "+1234567890",
          "address": "123 Main St, City",
          "issue": "Heating system not working",
          "role": "tenant",
          "priority": "high",
          "type": "maintenance",
          "date_time": "2024-03-21T10:30:00Z",
          "submission_date_time": "2024-03-21T10:35:00Z"
        },
        "status": "open",
        "created_at": "2024-03-21T10:35:00Z",
        "updated_at": "2024-03-21T10:35:00Z"
      },
      {
        "ticket_id": "ticket_456",
        "conversation_id": "conv_789xyz012uvw",
        "customer_info": {
          "name": "Jane Doe",
          "phone": "+0987654321",
          "address": "456 Oak Ave, Town",
          "issue": "Water leak in bathroom",
          "role": "owner",
          "priority": "urgent",
          "type": "plumbing",
          "date_time": "2024-03-21T11:00:00Z",
          "submission_date_time": "2024-03-21T11:05:00Z"
        },
        "status": "in_progress",
        "created_at": "2024-03-21T11:05:00Z",
        "updated_at": "2024-03-21T11:10:00Z"
      }
    ]
  }
  ```
</ResponseExample>
