---
title: "Message"
description: "The `Message` entity."
section: "Reference"
group: "Types"
order: 149
---

## Definition

```ts
interface Message {
  id: string;
  threadId: string;
  authorParticipantId: string;
  content: Array<{ [x: string]: unknown; type: string }>;
  runId: string | null;
  createdAt: string;
}
```

## Fields

| Field                 | Type                                             | Notes                                                                                    |
| --------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| `id`                  | `string`                                         | `readonly` `required`                                                                    |
| `threadId`            | `string`                                         | `required` — Thread this message belongs to.                                             |
| `authorParticipantId` | `string`                                         | `required` — Participant (user / agent / system) that authored the message.              |
| `content`             | `Array<{ [x: string]: unknown; type: string; }>` | `required` — Ordered array of UIMessage parts (text, function calls, attachments, etc.). |
| `runId`               | `string \| null`                                 | `required` — Run that produced this message; null for user-authored messages.            |
| `createdAt`           | `string`                                         | `readonly` `required` — ISO-8601 timestamp of creation.                                  |
