# 2chat

2Chat provides a programmable API for integrating WhatsApp and other text channels, enabling developers to send and receive messages, manage groups, and automate workflows.

- **Category:** communication
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 5
- **Triggers:** 0
- **Slug:** `_2CHAT`
- **Version:** 20260211_00

## Tools

### Create Contact

**Slug:** `_2CHAT_CREATE_CONTACT`

Tool to create a new contact in your 2Chat account. Use after gathering and verifying first name and at least one contact detail (email, phone, or address).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `last_name` | string | No | Last name of the new contact |
| `first_name` | string | Yes | First name of the new contact |
| `contact_detail` | array | Yes | A list of contact detail entries; at least one entry is required |
| `profile_pic_url` | string | No | Publicly accessible URL of the contact's profile picture |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get API Usage Info

**Slug:** `_2CHAT_GET_API_USAGE_INFO`

Tool to retrieve current API usage and account information. Use when you need to monitor your remaining quotas before sending more requests.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Contacts

**Slug:** `_2CHAT_LIST_CONTACTS`

Tool to list all contacts in your 2Chat account. Use when you need to retrieve your contact list after confirming your account connection.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page_number` | integer | No | Zero-indexed page number to retrieve. |
| `channel_uuid` | string | No | Optional. Used to filter contacts by connected number UUID. |
| `results_per_page` | integer | No | Number of results returned per page. Must be between 1 and 50. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Webhook Subscriptions

**Slug:** `_2CHAT_LIST_WEBHOOKS`

List all configured webhook subscriptions for WhatsApp and phone call events. Use this when you need to audit, review, or retrieve UUIDs of your active webhook subscriptions. Returns details including webhook UUID, event type, channel UUID, callback URL, and creation timestamp.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Test API Key

**Slug:** `_2CHAT_TEST_API_KEY`

Tool to validate your API key and retrieve account info. Use when confirming credentials before performing other operations.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
