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

# Unipile: List Messages

> List messages across all chats of the connected accounts, with account, sender, and date filters. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List messages across all chats of the connected accounts, with account, sender, and date filters.

> [!NOTE]
>
> Tool ID: `unipile_list_messages`

## Run this action

This action has conditional or dynamic inputs. A static example cannot describe these inputs reliably.

Read the live contract before you execute this action:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline describe unipile_list_messages --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe unipile_list_messages --json` for the complete live contract.

## Input reference

Returns a list of messages. Some optional parameters are available to filter the results.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.cursor` | `string` | No | — | A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved. Minimum length: 1. |
| `payload.before` | `string` | No | — | A filter to target items created before the datetime (exclusive). Must be an ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). Pattern: `^[1-2]\d&#123;3&#125;-[0-1]\d-[0-3]\dT\d&#123;2&#125;:\d&#123;2&#125;:\d&#123;2&#125;.\d&#123;3&#125;Z$`. |
| `payload.after` | `string` | No | — | A filter to target items created after the datetime (exclusive). Must be an ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). Pattern: `^[1-2]\d&#123;3&#125;-[0-1]\d-[0-3]\dT\d&#123;2&#125;:\d&#123;2&#125;:\d&#123;2&#125;.\d&#123;3&#125;Z$`. |
| `payload.limit` | `integer` | No | — | A limit for the number of items returned in the response. The value can be set between 1 and 250. Minimum: 1. Maximum: 250. |
| `payload.sender_id` | `string` | No | — | A filter to target messages received from a certain sender. The id of the sender targeted. |
| `payload.account_id` | `string` | No | — | A filter to target messages received in a certain linked account. The id of the account targeted. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a list of messages. Some optional parameters are available to filter the results.",
    "properties": {
      "cursor": {
        "type": "string",
        "description": "A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved.",
        "minLength": 1
      },
      "before": {
        "type": "string",
        "description": "A filter to target items created before the datetime (exclusive). Must be an ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ).",
        "pattern": "^[1-2]\\d{3}-[0-1]\\d-[0-3]\\dT\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
      },
      "after": {
        "type": "string",
        "description": "A filter to target items created after the datetime (exclusive). Must be an ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ).",
        "pattern": "^[1-2]\\d{3}-[0-1]\\d-[0-3]\\dT\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
      },
      "limit": {
        "type": "integer",
        "description": "A limit for the number of items returned in the response. The value can be set between 1 and 250.",
        "minimum": 1,
        "maximum": 250
      },
      "sender_id": {
        "type": "string",
        "description": "A filter to target messages received from a certain sender. The id of the sender targeted."
      },
      "account_id": {
        "type": "string",
        "description": "A filter to target messages received in a certain linked account. The id of the account targeted."
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"MessageList"` | Yes | — | Allowed: `MessageList`. |
| `result.data.items` | `array` | Yes | — | — |
| `result.data.items[].object` | `"Message"` | Yes | — | Allowed: `Message`. |
| `result.data.items[].message_id` | `string` | No | — | A unique identifier. Minimum length: 1. |
| `result.data.items[].provider_id` | `string` | Yes | — | — |
| `result.data.items[].sender_id` | `string` | Yes | — | — |
| `result.data.items[].text` | `string \| null` | Yes | — | — |
| `result.data.items[].attachments` | `array` | Yes | — | — |
| `result.data.items[].attachments[].id` | `string` | Yes | — | — |
| `result.data.items[].attachments[].file_size` | `number` | No | — | — |
| `result.data.items[].attachments[].unavailable` | `boolean` | Yes | — | — |
| `result.data.items[].attachments[].mimetype` | `string` | No | — | — |
| `result.data.items[].attachments[].url` | `string` | No | — | — |
| `result.data.items[].attachments[].url_expires_at` | `number` | No | — | — |
| `result.data.items[].attachments[].type` | `"img"` | Yes | — | — |
| `result.data.items[].attachments[].size` | `object` | Yes | — | — |
| `result.data.items[].attachments[].size.width` | `number` | Yes | — | — |
| `result.data.items[].attachments[].size.height` | `number` | Yes | — | — |
| `result.data.items[].attachments[].sticker` | `boolean` | Yes | — | — |
| `result.data.items[].attachments[].gif` | `boolean` | Yes | — | — |
| `result.data.items[].attachments[].duration` | `number` | No | — | — |
| `result.data.items[].attachments[].voice_note` | `boolean` | Yes | — | — |
| `result.data.items[].attachments[].file_name` | `string` | Yes | — | — |
| `result.data.items[].attachments[].starts_at` | `number \| null` | Yes | — | — |
| `result.data.items[].attachments[].expires_at` | `number \| null` | Yes | — | — |
| `result.data.items[].attachments[].time_range` | `number \| null` | Yes | — | — |
| `result.data.items[].attachments[].post` | `object` | No | — | — |
| `result.data.items[].attachments[].post.url` | `string` | Yes | — | — |
| `result.data.items[].attachments[].post.author` | `string` | No | — | — |
| `result.data.items[].attachments[].post.author_id` | `string` | No | — | — |
| `result.data.items[].attachments[].post.author_messaging_id` | `string` | No | — | — |
| `result.data.items[].attachments[].post.description` | `string` | No | — | — |
| `result.data.items[].attachments[].story` | `object` | No | — | — |
| `result.data.items[].attachments[].story.url` | `string` | Yes | — | — |
| `result.data.items[].attachments[].story.author` | `string` | No | — | — |
| `result.data.items[].attachments[].cta` | `object` | No | — | — |
| `result.data.items[].attachments[].cta.text` | `string` | Yes | — | — |
| `result.data.items[].attachments[].cta.type` | `string` | Yes | — | — |
| `result.data.items[].attachments[].cta.url` | `string` | No | — | — |
| `result.data.items[].attachments[].link` | `object` | No | — | — |
| `result.data.items[].attachments[].link.text` | `string` | Yes | — | — |
| `result.data.items[].attachments[].link.url` | `string` | Yes | — | — |
| `result.data.items[].attachments[].link.title` | `string` | Yes | — | — |
| `result.data.items[].attachments[].link.summary` | `string` | Yes | — | — |
| `result.data.items[].attachments[].link.image_url` | `string` | Yes | — | — |
| `result.data.items[].attachments[].video_call` | `object` | No | — | — |
| `result.data.items[].attachments[].video_call.type` | `string` | Yes | — | — |
| `result.data.items[].attachments[].video_call.description` | `string` | Yes | — | — |
| `result.data.items[].attachments[].video_call.duration` | `number` | Yes | — | — |

The table shows the first 50 fields. Use the live contract below for every field.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe unipile_list_messages --json`.

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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