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

# messageThread

> Fetch a message thread by its id. Null when no thread in the store has that id.

**Required scopes:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

## Arguments

**id** `ID!` *required*

The thread's `id`.

## Returns

**messageThread** `[MessageThread](/docs/api-reference/v3/reference/support/message-thread)`

A conversation on one channel, such as an email thread. Each channel's threads are their own type.

**fields**

**channel** `[MessageChannel!](/docs/api-reference/v3/reference/support/message-channel)` *required*

The channel the thread is on.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the thread started.

**id** `ID!` *required*

The id of this thread.

**messages** `[MessageConnection!](/docs/api-reference/v3/pagination)` *required*

Every message on the thread, oldest first, including internal notes. A thread can span several tickets, so this can hold messages no one ticket has.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns messages after it.

**before** `String`

Backward pagination cursor — returns messages before it.

**first** `Int`

Forward pagination: returns the first N messages (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N messages (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[MessageEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[Message!](/docs/api-reference/v3/reference/support/message)` *required*

The item at this edge.

**nodes** `[\[Message!\]!](/docs/api-reference/v3/reference/support/message)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**authorType** `[MessageAuthorType!](/docs/api-reference/v3/reference/support/message-author-type)` *required*

Who wrote the message.

**channel** `[MessageChannel!](/docs/api-reference/v3/reference/support/message-channel)` *required*

The channel the message is on.

**content** `String`

The message as plain text. Null for a message with no text, such as an image.

**customer** `[Customer](/docs/api-reference/v3/reference/customers/customer)`

The customer who wrote it. Null unless `authorType` is CUSTOMER, and null when their record was deleted.

**Requires:** [`customers_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-customers_read)

**id** `ID!` *required*

The id of this message.

**inReplyTo** `[Message](/docs/api-reference/v3/reference/support/message)`

The message this one replies to. Null when it isn't a reply, or that message is hidden.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**sentAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the message was sent or received.

**teamMember** `[TeamMember](/docs/api-reference/v3/reference/common/team-member)`

The team member who wrote it. Null unless `authorType` is TEAM\_MEMBER, and null when they've left the team.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**thread** `[MessageThread](/docs/api-reference/v3/reference/support/message-thread)`

The thread the message is on. Null when the thread is on a channel the API doesn't expose.

**Requires:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**Possible types:** [`ChatThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/chat-thread), [`ContactFormThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/contact-form-thread), [`EmailThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/email-thread), [`SmsThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/sms-thread), [`SocialThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/social-thread), [`VoiceThread`](https://developers.redo.com/docs/api-reference/v3/reference/support/voice-thread)

## Example

```graphql theme={null}
query {
  messageThread(id: "...") {
    channel
    createdAt
    id
    messages {
      nodes {
        authorType
        channel
        content
        id
        sentAt
      }
      pageInfo { hasNextPage endCursor }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.