> ## 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.

# Sybill: List Messages

> Find emails and CRM messages in Sybill by participant email, thread, source such as gmail or hubspot_crm, or date. Includes SDK V2 examples, schemas, and cost.

Find emails and CRM messages in Sybill by participant email, thread, source such as gmail or hubspot\_crm, or date.

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

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'sybill_list_messages',
  {
    "sourceId": "source_123",
    "remoteId": "remote_123",
    "threadId": "thread_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run sybill_list_messages --input '{
  "sourceId": "source_123",
  "remoteId": "remote_123",
  "threadId": "thread_123"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "messages": [
      {
        "messageId": "123e4567-e89b-42d3-a456-426614174000",
        "sourceId": "source_123",
        "remoteId": "remote_123",
        "threadId": "thread_123",
        "sender": {
          "name": "Example",
          "email": "jane.doe@example.com"
        },
        "recipients": [
          {}
        ],
        "bodyPreview": "example",
        "createdAt": "2026-01-15T12:00:00Z"
      }
    ],
    "pagination": {
      "nextCursor": "cursor_123",
      "hasMore": false
    }
  }
}
```

Use `deepline describe sybill_list_messages --json` for the latest machine-readable contract.

## Input reference

List organization-visible messages from native or custom sources. Requires the **Export** permission (`read` scope). Private messages owned by individual users are excluded. Results use cursor-based pagination.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.sourceId` | `string` | No | — | Maximum length: 255. |
| `payload.remoteId` | `string` | No | — | Maximum length: 512. |
| `payload.threadId` | `string` | No | — | Maximum length: 512. |
| `payload.participantEmail` | `string` | No | — | Maximum length: 255. |
| `payload.createdAfter` | `string` | No | — | Maximum length: 64. |
| `payload.createdBefore` | `string` | No | — | Maximum length: 64. |
| `payload.cursor` | `string` | No | — | Maximum length: 512. |
| `payload.limit` | `integer` | No | `50` | Minimum: 1. Maximum: 50. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "List organization-visible messages from native or custom sources. Requires the **Export** permission (`read` scope). Private messages owned by individual users are excluded. Results use cursor-based pagination.",
    "properties": {
      "sourceId": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 255
      },
      "remoteId": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 512
      },
      "threadId": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 512
      },
      "participantEmail": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 255
      },
      "createdAfter": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 64
      },
      "createdBefore": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 64
      },
      "cursor": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 512
      },
      "limit": {
        "type": "integer",
        "default": 50,
        "minimum": 1,
        "maximum": 50
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Paginated list response. Cursor-based pagination. |
| `result.data.messages` | `array` | Yes | — | — |
| `result.data.messages[].messageId` | `string` | Yes | — | Format: `uuid`. |
| `result.data.messages[].sourceId` | `string` | Yes | — | — |
| `result.data.messages[].remoteId` | `string \| null` | Yes | — | — |
| `result.data.messages[].threadId` | `string \| null` | Yes | — | — |
| `result.data.messages[].subject` | `string \| null` | No | — | — |
| `result.data.messages[].sender` | `object \| null` | Yes | — | A message participant — sender or one of the recipients. |
| `result.data.messages[].sender.name` | `string \| null` | No | — | — |
| `result.data.messages[].sender.email` | `string \| null` | No | — | — |
| `result.data.messages[].recipients` | `array` | Yes | — | — |
| `result.data.messages[].recipients[].name` | `string \| null` | No | — | — |
| `result.data.messages[].recipients[].email` | `string \| null` | No | — | — |
| `result.data.messages[].bodyPreview` | `string` | Yes | — | — |
| `result.data.messages[].createdAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.pagination` | `object` | Yes | — | Cursor-based pagination metadata returned alongside list responses. All public-API list endpoints emit the same shape: pass `next_cursor` back as the `cursor` query parameter to fetch the next page. check `has_more` to know whether more pages exist. |
| `result.data.pagination.nextCursor` | `string \| null` | No | — | — |
| `result.data.pagination.hasMore` | `boolean` | No | `false` | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Paginated list response. Cursor-based pagination.",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Trimmed message returned by the list API. ``source_id`` is polymorphic — either a UUID (for public-API ingested messages) or a reserved native string (``gmail``, ``outlook``, ``zoho_mail``, ``salesforce_crm``, ``hubspot_crm``, ``pipedrive_crm``, ``dynamics_crm``, ``zoho_crm``).",
              "properties": {
                "messageId": {
                  "type": "string",
                  "format": "uuid"
                },
                "sourceId": {
                  "type": "string"
                },
                "remoteId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "threadId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "subject": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sender": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "A message participant — sender or one of the recipients.",
                  "properties": {
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "recipients": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "A message participant — sender or one of the recipients.",
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "bodyPreview": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "messageId",
                "sourceId",
                "remoteId",
                "threadId",
                "sender",
                "recipients",
                "bodyPreview",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "description": "Cursor-based pagination metadata returned alongside list responses. All public-API list endpoints emit the same shape: pass ``next_cursor`` back as the ``cursor`` query parameter to fetch the next page; check ``has_more`` to know whether more pages exist.",
            "properties": {
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hasMore": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "messages",
          "pagination"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## 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

* [Connect integrations](https://deepline.com/docs/integrations.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.