> ## 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: Start New Chat

> Send a first message to a person on LinkedIn, including InMail, or WhatsApp from your connected account, starting a new chat.

Send a first message to a person on LinkedIn, including InMail, or WhatsApp from your connected account, starting a new chat.

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

## 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(
  'unipile_start_new_chat',
  {
    "account_id": "123456789",
    "attendees_ids": [
      "attendees_123"
    ],
    "text": "example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_start_new_chat --input '{
  "account_id": "123456789",
  "attendees_ids": [
    "attendees_123"
  ],
  "text": "example"
}' --json
```

## 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": {
    "object": "ChatStarted",
    "chat_id": "chat_123",
    "message_id": "message_123"
  }
}
```

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

## Input reference

Start a new chat with specified attendees or send to an existing chat. If the chat exists, it will be reused.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.account_id` | `string` | Yes | — | Connected account ID to send from |
| `payload.attendees_ids` | `array` | Yes | — | Provider internal IDs of recipients Minimum items: 1. |
| `payload.text` | `string` | Yes | — | Message text |
| `payload.subject` | `string` | No | — | Group chat title (optional) |
| `payload.linkedin` | `object` | No | — | — |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Start a new chat with specified attendees or send to an existing chat. If the chat exists, it will be reused.",
    "properties": {
      "account_id": {
        "type": "string",
        "description": "Connected account ID to send from"
      },
      "attendees_ids": {
        "type": "array",
        "description": "Provider internal IDs of recipients",
        "minItems": 1,
        "items": {
          "type": "string"
        }
      },
      "text": {
        "type": "string",
        "description": "Message text"
      },
      "subject": {
        "type": "string",
        "description": "Group chat title (optional)"
      },
      "linkedin": {
        "type": "object",
        "properties": {
          "api": {
            "type": "string",
            "description": "LinkedIn API type",
            "enum": [
              "classic",
              "recruiter",
              "sales_navigator"
            ]
          },
          "inmail": {
            "type": "boolean",
            "description": "Send as InMail (requires Premium)"
          }
        },
        "additionalProperties": false
      }
    },
    "required": [
      "account_id",
      "attendees_ids",
      "text"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"ChatStarted"` | No | — | Allowed: `ChatStarted`. |
| `result.data.chat_id` | `string \| null` | No | — | Unipile ID of the new or existing chat |
| `result.data.message_id` | `string \| null` | No | — | Unipile ID of the first message |
| `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": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "ChatStarted"
            ]
          },
          "chat_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unipile ID of the new or existing chat"
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unipile ID of the first message"
          }
        },
        "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

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


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