# Understanding Glue thread types

In Glue, everything begins with a **Thread** — the core container for messages, participants, and activity.\
All conversations, whether a direct message, group chat, or topic-based discussion, are built on this same primitive.

Every message belongs to a Thread, and its **ThreadType** defines the context. These types aren’t just technical details: they also shape how the conversation appears in the app. Different types have their own interfaces, optimized for their purpose, and may even appear in separate sections so users can tell them apart at a glance.

This shared structure keeps things consistent for developers while giving the platform room to support different behaviors and evolve over time.

## Thread Types

The `ThreadType` enum defines the different kinds of conversations supported in Glue. Each type controls how recipients are treated, how the thread behaves over time, and how it is displayed in the Glue interface.

```graphql
enum ThreadType {
  thread # or named?
  chat
}
```

{% hint style="info" %}
`ThreadType` is **mutable by the system**. For example, a `thread` may evolve into a `chat` if the thread is converted into a group later.&#x20;
{% endhint %}

***

### `thread`

A subject-based discussion designed to have a clear lifecycle.

* For topic-oriented conversations that benefit from focus and closure.
* Can be opened with a subject line and later closed when the discussion is complete.
* Behaves like the “classic” threaded model

<details>

<summary>Sample Response Payload of a Standard Thread</summary>

```graphql
{
  "data": {
    "thread": {
      "id": "thr_2hTJ4DGsxUAeEhKOyJ2PMePFL0c",
      "subject": "Project: Omega Initiative"
      "threadType": "thread",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "usr_2rdDJjsN0n5HONuOusUoNcdu26X",
              "name": "Charlie Davis"
            }
          },
          {
            "node": {
              "id": "grp_2tuREOmMXCuwA9GDHhJf9CaHaaa",
              "name": "Product Team",
            }
          },
          {
            "node": {
              "id": "usr_2rdAe3Iuh2i92zy9Rq2xsWBQ59u",
              "name": "Diana Wilson"
            }
          }
        ]
      }
    }
  }
}
```

</details>

***

### `chat`

A persistent chat for a single group or between two users ("DM").

* Always associated with either a single user (a DM) or a single group (a group chat)
* Not tied to a specific subject
* Recipients can't be added or removed, and the thread cannot be closed
* Used for ongoing conversations between a set of recipients

{% hint style="info" %}
The recipient ID of a `chat` cannot change, it is either the single user or the group. While the recipient ID is locked, group membership remains dynamic. For example, if a user joins or leaves the group, the chat automatically reflects the updated membership.
{% endhint %}

<details>

<summary>Sample Response Payload of a DM</summary>

```graphql
{
  "data": {
    "thread": {
      "id": "thr_2PtTG7GFSgcgwfpeDOBGEQtyB24",
      "threadType": "chat",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "usr_1h3c43PfmSQpPb0CXwRJUYs0ker",
              "name": "Alice Johnson"
            }
          },
          {
            "node": {
              "id": "usr_2mHVPy5LlHYPs2zHcwm56M85J3h",
              "name": "Bob Smith"
            }
          }
        ]
      }
    }
  }
}
```

</details>

<details>

<summary>Sample Response Payload of a Group Chat</summary>

```graphql
{
  "data": {
    "thread": {
      "id": "thr_2rdAeYdtPPUOMQx5MgeeUkw9Yar",
      "threadType": "chat",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "grp_2hSyORgf8VqMLg0ADIvTi9oY6Nk",
              "name": "Engineering Team",
              "description": "Core engineering team discussions"
            }
          }
        ]
      }
    }
  }
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glue.ai/developers/graphql-api/understanding-glue-thread-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
