The 2Chat connector lets your AI agent act in each user's 2Chat account. Each user connects their own 2Chat API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.
- Tools
- 60
- What they doRead · write · destructive
- 34 · 20 · 634 read20 write6 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the 2Chat connection
In AgentKit > Connections, create a 2Chat connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'twochat'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize 2Chat:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'twochat_call_history_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "twochat"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize 2Chat:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="twochat_call_history_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their 2Chat credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooltwochat_call_getGet the full details of one phone call.Read-onlyGet Call Details
Get the full details of one phone call. Returns call metadata, cost breakdown and agent information. Use twochat_call_history_list to find call UUIDs.
Inputs
call_uuidstringrequired- Call record UUID (starts with CDR). Example: CDR8b3e7a1f-6c94-4d52-ae17-5f2b9d4c8e63.
twochat_call_history_listList the phone calls made or received through your 2Chat virtual numbers.Read-onlyList Call History
List the phone calls made or received through your 2Chat virtual numbers. Returns call records with uuid, direction, numbers, duration, status and cost. Use twochat_call_get for one call's full details.
Inputs
directionstring- Only inbound or outbound calls. Any direction when empty. Example: outbound.one of
inboundoutbound from_numberstring- Inbound calls: only calls from this number. Example: +12124557899.
page_numberinteger- Page number to return. Example: 0.
to_numberstring- Outbound calls: only calls to this number. Example: +12124557899.
twochat_call_price_getGet the estimated per-minute price of calling a phone number.Read-onlyGet Call Price
Get the estimated per-minute price of calling a phone number. Returns the destination and price per minute. Use this before placing calls to a new country.
Inputs
phone_numberstringrequired- Destination phone number in international format. Example: +595984153762.
twochat_contact_getGet one 2Chat contact by UUID.Read-onlyGet Contact
Get one 2Chat contact by UUID. Returns the contact's uuid, first_name, last_name, channel_uuid, profile_pic_url and last_updated. Use twochat_contacts_search or twochat_contacts_list to find UUIDs.
Inputs
contact_uuidstringrequired- Contact UUID (starts with CON), from twochat_contacts_list or twochat_contacts_search. Example: CON58147f7c-3756-4ca1-893c-c3360342b424.
twochat_contacts_listList the contacts in your 2Chat account, page by page.Read-onlyList Contacts
List the contacts in your 2Chat account, page by page. Returns contacts with uuid, first_name, last_name, channel_uuid, profile_pic_url and details (phones, emails, addresses). Use this to browse. Use twochat_contacts_search to find a contact by name or number.
Inputs
channel_uuidstring- Only contacts linked to this connected number (WPN...). Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
page_numberinteger- Page number to return, starting at 0. Example: 0.
results_per_pageinteger- Contacts per page, from 1 to 100. Example: 20.
twochat_contacts_searchSearch your 2Chat contacts by name or phone number.Read-onlySearch Contacts
Search your 2Chat contacts by name or phone number. Returns matching contacts with uuid, names, channel_uuid, last_updated and details. Use this to find a contact's UUID. Use twochat_conversations_search to search message text.
Inputs
querystringrequired- Name or phone digits to look for, such as Kate Smith or 5550147. Example: Kate.
channel_uuidstring- Only contacts linked to this connected number (WPN...). Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
results_per_pageinteger- Contacts per page, from 1 to 50. Defaults to 10. Example: 20.
twochat_conversation_assignment_getGet the user and the team a conversation is assigned to.Read-onlyGet Conversation Assignment
Get the user and the team a conversation is assigned to. Returns the assigned user and team, or null for each when unassigned. Use this before reassigning.
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
twochat_conversations_searchSearch all conversations by contact name, phone number and message text, as the live chat search does.Read-onlySearch Conversations
Search all conversations by contact name, phone number and message text, as the live chat search does. Returns contacts (matching conversations) and messages (matching messages, newest first, with highlights), each with its session_key. Use this to find a session_key for the conversation tools.
Inputs
qstringrequired- Search term of at least 2 characters. Example: invoice.
contacts_limitinteger- Maximum contact matches, from 1 to 50. Defaults to 20. Example: 20.
page_numberinteger- Zero-based page of the messages group. Defaults to 0. Example: 0.
results_per_pageinteger- Messages per page, from 1 to 100. Defaults to 20. Example: 20.
twochat_scheduled_messages_listList the scheduled WhatsApp messages still waiting to be sent, across all numbers.Read-onlyList Scheduled Messages
List the scheduled WhatsApp messages still waiting to be sent, across all numbers. Returns pending scheduled messages with uuid, numbers, text, next send time and recurrence. Use this to find a uuid to cancel or send now.
Inputs
This tool takes no inputs.
twochat_sms_channels_listList the SMS numbers connected to your 2Chat account.Read-onlyList SMS Channels
List the SMS numbers connected to your 2Chat account. Returns channels with uuid (SMS...), phone number and status. Use this to get a channel UUID for the SMS conversation tools.
Inputs
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
results_per_pageinteger- Channels per page, from 1 to 200. Defaults to 200. Example: 20.
twochat_sms_conversations_listList the conversations on an SMS channel, one per contact with its latest message, newest first.Read-onlyList SMS Conversations
List the conversations on an SMS channel, one per contact with its latest message, newest first. Returns contacts with their latest message. Use twochat_sms_messages_list for a full thread.
Inputs
channel_uuidstringrequired- UUID of the SMS channel (starts with SMS), from twochat_sms_channels_list. Example: SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13.
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
results_per_pageinteger- Conversations per page, from 1 to 200. Defaults to 20. Example: 20.
twochat_sms_message_getGet one SMS message by UUID (inbound starts with SMI, outbound with SMO).Read-onlyGet SMS Message
Get one SMS message by UUID (inbound starts with SMI, outbound with SMO). Returns the message's direction, numbers, text, status and timestamps. Use twochat_sms_messages_list to find UUIDs.
Inputs
message_uuidstringrequired- SMS message UUID. Example: SMI4f2a1c33-7b6e-4d9a-8c12-9f0e1a2b3c4d.
twochat_sms_messages_listGet the SMS thread between an SMS channel and a contact, inbound and outbound, oldest to newest.Read-onlyList SMS Messages
Get the SMS thread between an SMS channel and a contact, inbound and outbound, oldest to newest. Returns messages with uuid, direction, text and timestamps. Pass the earliest timestamp as before_ts to page back in time.
Inputs
channel_uuidstringrequired- UUID of the SMS channel (starts with SMS), from twochat_sms_channels_list. Example: SMS9a3f1c20-4e7b-4d8a-9c61-2f5b8d0a4e13.
contact_numberstringrequired- The contact's phone number in international format. Example: +447700900123.
before_tsinteger- Unix timestamp in seconds: only messages older than this. Example: 1718790043.
results_per_pageinteger- Messages to return, from 1 to 200. Defaults to 50. Example: 20.
twochat_teams_listList the teams of your 2Chat account.Read-onlyList Account Teams
List the teams of your 2Chat account. Returns each team's uuid and name. Use this to get a team_uuid for twochat_conversation_assign_team.
Inputs
This tool takes no inputs.
twochat_users_listList the active users of your 2Chat account.Read-onlyList Account Users
List the active users of your 2Chat account. Returns each user's uuid, first_name, last_name and email. Use this to get a user_uuid for twochat_conversation_assign_user or note mentions.
Inputs
This tool takes no inputs.
twochat_waba_conversation_messages_listList the messages between your WABA number and one contact, newest first.Read-onlyList WABA Conversation Messages
List the messages between your WABA number and one contact, newest first. Returns messages with uuid, direction, text, template, status and timestamps, plus has_more. Keep paging while has_more is true.
Inputs
from_numberstringrequired- Your WABA number in international format. Example: +15550001111.
to_numberstringrequired- The contact's number in international format. Example: +5215512345432.
include_errorboolean- Set true to add each message's last delivery status and failure reason. Example: false.
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
results_per_pageinteger- Messages per page, from 1 to 200. Defaults to 50. Example: 20.
twochat_waba_conversation_window_getCheck whether the 24-hour customer service window is open between your WABA number and a contact.Read-onlyCheck WABA Conversation Window
Check whether the 24-hour customer service window is open between your WABA number and a contact. Returns whether the window is open and when it closes. Use this to decide between free-form text and a template in twochat_waba_message_send.
Inputs
from_numberstringrequired- Your WABA number in international format. Example: +15550001111.
to_numberstringrequired- The contact's number in international format. Example: +15552223333.
twochat_waba_conversations_listList the conversations of a WABA number, most recently active first.Read-onlyList WABA Conversations
List the conversations of a WABA number, most recently active first. Returns conversations with contact, session_key and latest activity. Use twochat_waba_conversation_messages_list for one contact's messages.
Inputs
channel_uuidstringrequired- UUID of your WABA number (starts with WAN), from twochat_whatsapp_numbers_list. Example: WAN95841312-b54d-46e3-b0bc-6414f4a5296b.
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
phone_numberstring- Only contacts whose number contains these 3 to 20 digits. Example: 123456.
results_per_pageinteger- Conversations per page, from 1 to 200. Defaults to 10. Example: 20.
twochat_waba_template_getGet one WABA template with its approval status, the variables it needs and an example send body.Read-onlyGet WABA Template
Get one WABA template with its approval status, the variables it needs and an example send body. Returns the template's components, status, variables and example_payload. Use this before twochat_waba_message_send to fill params correctly.
Inputs
template_uuidstringrequired- Template UUID (starts with TMP). Example: TMP1b44a079-c75c-4403-bc8f-a75c4ce5cd23.
fields_formatstring- Set flat to also get a fields array with one form field per variable. Example: flat.one of
flat
twochat_waba_templates_listList the WhatsApp Business API message templates of one of your WABA numbers.Read-onlyList WABA Templates
List the WhatsApp Business API message templates of one of your WABA numbers. Returns templates with uuid, name, language, category and approval status. Use this to get a template_uuid for twochat_waba_message_send.
Inputs
phone_numberstringrequired- Your WABA number in international format. Example: +5215512345432.
limitinteger- Templates per page, from 10 to 200. Defaults to 10. Example: 50.
pageinteger- Zero-based page. Defaults to 0. Example: 0.
twochat_webhooks_listList all webhook subscriptions configured on your 2Chat account.Read-onlyList Webhooks
List all webhook subscriptions configured on your 2Chat account. Returns subscriptions with uuid, event name, hook URL, channel and status. Use this to find a webhook UUID for twochat_webhook_delete.
Inputs
This tool takes no inputs.
twochat_whatsapp_conversation_messages_listList the messages between your connected WhatsApp number and one contact, newest first.Read-onlyList WhatsApp Conversation Messages
List the messages between your connected WhatsApp number and one contact, newest first. Returns messages with uuid, session_key, direction, text, media and timestamps. Use twochat_whatsapp_messages_list for all contacts.
Inputs
from_numberstringrequired- Your connected WhatsApp number, in international format. Example: +595981048477.
remote_numberstringrequired- The contact's phone number in international format. Example: +595981111111.
page_numberinteger- Page of older messages to return, starting at 0. Example: 0.
twochat_whatsapp_conversations_listList the conversations on a connected WhatsApp number, most recent first, 10 per page.Read-onlyList WhatsApp Conversations
List the conversations on a connected WhatsApp number, most recent first, 10 per page. Returns conversations with session_key, contact, last message and timestamps. Use this to poll for new messages or find a session_key.
Inputs
channel_uuidstringrequired- UUID of the connected WhatsApp number (starts with WPN), from twochat_whatsapp_numbers_list. Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
page_numberinteger- Zero-based page number. Defaults to 0. Example: 0.
phone_numberstring- Only conversations whose contact number contains these 3 to 20 digits. Example: 123456.
twochat_whatsapp_group_getGet a WhatsApp group's details and participants.Read-onlyGet WhatsApp Group
Get a WhatsApp group's details and participants. Returns the group's name, description and participants with their phone numbers and admin roles. Use twochat_whatsapp_groups_list to find the group UUID.
Inputs
group_uuidstringrequired- WhatsApp group UUID (starts with WAG), from twochat_whatsapp_groups_list. Example: WAG45b0f301-9203-4660-8b57-b51a6c2742a5.
twochat_whatsapp_group_messages_listList the messages of a WhatsApp group your connected number is in, newest first, 50 per page.Read-onlyList WhatsApp Group Messages
List the messages of a WhatsApp group your connected number is in, newest first, 50 per page. Returns messages with uuid, sender, text, media and timestamps. Use twochat_whatsapp_groups_list to find the group UUID.
Inputs
group_uuidstringrequired- WhatsApp group UUID (starts with WAG), from twochat_whatsapp_groups_list. Example: WAG45b0f301-9203-4660-8b57-b51a6c2742a5.
page_numberinteger- Page of older messages to return, starting at 0. Example: 0.
twochat_whatsapp_groups_listList the WhatsApp groups a connected number is a participant of.Read-onlyList WhatsApp Groups
List the WhatsApp groups a connected number is a participant of. Returns groups with uuid (WAG...), name and details. Use this to get a group UUID.
Inputs
from_numberstringrequired- Your connected WhatsApp number, in international format. Example: +595981048477.
twochat_whatsapp_message_getGet one WhatsApp message sent or received through 2Chat.Read-onlyGet WhatsApp Message
Get one WhatsApp message sent or received through 2Chat. Returns the message's uuid, text, media, direction, status and timestamps. Use the session_key and uuid returned when the message was sent or listed.
Inputs
message_uuidstringrequired- Message UUID (starts with MSG). Example: MSG205dec10-523d-4ab3-b739-fd56e7cdeba2.
session_keystringrequired- Session key of the conversation the message belongs to. Example: WW-WPN66037eca-9ad1-4c96-9eff-526a90a48c77-5215511112222@c.us.
twochat_whatsapp_messages_listList the messages sent and received on a connected WhatsApp number, newest first, 100 per page.Read-onlyList WhatsApp Messages
List the messages sent and received on a connected WhatsApp number, newest first, 100 per page. Returns messages with uuid, session_key, direction, text, media, sender and timestamps. Use twochat_whatsapp_conversation_messages_list for one contact's messages.
Inputs
from_numberstringrequired- Your connected WhatsApp number, in international format. Example: +595981048477.
page_numberinteger- Page of older messages to return, starting at 0. Example: 0.
twochat_whatsapp_number_checkCheck whether a phone number has a WhatsApp account, using one of your connected numbers.Read-onlyCheck Number on WhatsApp
Check whether a phone number has a WhatsApp account, using one of your connected numbers. Returns whether the number is on WhatsApp and, with extra_information, profile details. Use this before messaging a new number. Checking in bulk can get your number banned.
Inputs
from_numberstringrequired- Your WhatsApp number connected to 2Chat, in international format. Example: +595981048477.
number_to_checkstringrequired- Phone number to check, in international format. Example: +17137157533.
extra_informationboolean- Set true to also return WhatsApp profile details. Costs 2 API credits instead of 1. Example: false.
twochat_whatsapp_number_getGet one connected WhatsApp number by its UUID.Read-onlyGet WhatsApp Number
Get one connected WhatsApp number by its UUID. Returns the number's uuid, phone number, name, status and settings. Use twochat_whatsapp_number_status_get for its connection events.
Inputs
channel_uuidstringrequired- UUID of the connected WhatsApp number (starts with WPN), from twochat_whatsapp_numbers_list. Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
twochat_whatsapp_number_status_getGet the connection status and latest connection events of a connected WhatsApp number.Read-onlyGet WhatsApp Number Status
Get the connection status and latest connection events of a connected WhatsApp number. Returns the status and recent events. Use this to check a number is connected before sending.
Inputs
channel_uuidstringrequired- UUID of the connected WhatsApp number (starts with WPN), from twochat_whatsapp_numbers_list. Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
twochat_whatsapp_numbers_listList the WhatsApp numbers connected to 2Chat.Read-onlyList WhatsApp Numbers
List the WhatsApp numbers connected to 2Chat. Returns numbers with uuid (WPN...), phone number, name, connection status and settings. Use this to get channel UUIDs and from_number values.
Inputs
page_numberinteger- Page number to return. Example: 0.
results_per_pageinteger- Numbers per page. Defaults to 50. Example: 20.
statusstring- Filter by connection status. Defaults to all. Example: connected.one of
connecteddisconnectedall
twochat_contact_createCreate a contact in your 2Chat directory, and on a connected WhatsApp account when channel_uuid is set.WriteCreate Contact
Create a contact in your 2Chat directory, and on a connected WhatsApp account when channel_uuid is set. Returns the new contact with uuid, names, channel_uuid and details. Create a contact before messaging a new number to lower the risk of WhatsApp bans.
Inputs
contact_detailarrayrequired- Contact details, each with a type and a value. Types: PH phone, WAPH phone with WhatsApp, E email, A postal address. Use international format for phones. Example: [{"type": "WAPH", "value": "+12125550147"}, {"type": "E", "value": "kate@example.com"}]
first_namestringrequired- Contact's first name. Example: Kate.
channel_uuidstring- UUID of a connected WhatsApp number (WPN...). When set, the contact is also saved on that WhatsApp account. Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
last_namestring- Contact's last name. Example: Smith.
profile_pic_urlstring- Public URL of the contact's picture. Example: https://example.com/kate.jpg.
twochat_contact_updateUpdate a 2Chat contact's names, picture, linked WhatsApp number or details.WriteUpdate Contact
Update a 2Chat contact's names, picture, linked WhatsApp number or details. Returns the updated contact. When channel_uuid is set the contact is also created or updated on that WhatsApp account.
- Idempotent
Inputs
contact_uuidstringrequired- Contact UUID (starts with CON), from twochat_contacts_list or twochat_contacts_search. Example: CON58147f7c-3756-4ca1-893c-c3360342b424.
channel_uuidstring- UUID of a connected WhatsApp number (WPN...). When set, the contact is also saved on that WhatsApp account. Example: WPN66037eca-9ad1-4c96-9eff-526a90a48c77.
contact_detailarray- Contact details, each with a type and a value. Types: PH phone, WAPH phone with WhatsApp, E email, A postal address. Use international format for phones. Example: [{"type": "WAPH", "value": "+12125550147"}, {"type": "E", "value": "kate@example.com"}]
first_namestring- Contact's first name. Example: Kate.
last_namestring- Contact's last name. Example: Smith.
profile_pic_urlstring- Public URL of the contact's picture. Example: https://example.com/kate.jpg.
twochat_conversation_assign_teamAssign a conversation to a team, replacing the previous team.WriteAssign Conversation to Team
Assign a conversation to a team, replacing the previous team. Every team member can then open it. Returns the new assignment. Use twochat_teams_list for the team_uuid.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
team_uuidstringrequired- UUID of a team, from twochat_teams_list. Example: VUGa71c3e09-8b52-4f0d-9d1e-5c6b2f8e4a10.
twochat_conversation_assign_userAssign a conversation to a user of your account, replacing the previous user.WriteAssign Conversation to User
Assign a conversation to a user of your account, replacing the previous user. The team assignment stays. Returns the new assignment. Use twochat_users_list for the user_uuid.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
user_uuidstringrequired- UUID of an active user, from twochat_users_list. Example: USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521.
twochat_conversation_note_createAdd an internal note to a conversation, visible only to your team in the live chat and never sent to the contact.WriteAdd Conversation Note
Add an internal note to a conversation, visible only to your team in the live chat and never sent to the contact. Mentioned users are notified. Returns the created note. Write each mentioned user's UUID in the text where the mention should appear.
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
textstringrequired- The note, up to 2000 characters of plain text. Example: The customer asked for an invoice. USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521 can you send it?.
mentionsarray- UUIDs of users to mention, up to 20, from twochat_users_list. Example: ["USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521"]
twochat_conversation_tag_addPut an existing tag on a conversation.WriteAdd Tag to Conversation
Put an existing tag on a conversation. Nothing changes if it already has the tag. Returns the conversation's tags. Use twochat_tag_create with session_key to create and add a tag in one call.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
tag_uuidstringrequired- Tag UUID (starts with TAG), from twochat_tags_list or twochat_tag_create. Example: TAGd37f22fa-fe01-4a90-b57d-7e83ccc6a05a.
twochat_conversation_tag_removeTake a tag off one conversation; the tag stays in the account.WriteRemove Tag from Conversation
Take a tag off one conversation; the tag stays in the account. Returns the conversation's remaining tags. Use twochat_tag_delete to delete the tag everywhere.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
tag_uuidstringrequired- Tag UUID (starts with TAG), from twochat_tags_list or twochat_tag_create. Example: TAGd37f22fa-fe01-4a90-b57d-7e83ccc6a05a.
twochat_conversation_unassign_teamRemove the assigned team from a conversation; the user stays.WriteUnassign Conversation Team
Remove the assigned team from a conversation; the user stays. Returns the current assignment. Use twochat_conversation_unassign_user to remove the user.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
twochat_conversation_unassign_userRemove the assigned user from a conversation; the team stays.WriteUnassign Conversation User
Remove the assigned user from a conversation; the team stays. Returns the current assignment. Use twochat_conversation_unassign_team to remove the team.
- Idempotent
Inputs
session_keystringrequired- The conversation's session_key, from twochat_conversations_search, twochat_whatsapp_conversations_list or a message. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
twochat_scheduled_message_send_nowSend a pending scheduled WhatsApp message right away.WriteSend Scheduled Message Now
Send a pending scheduled WhatsApp message right away. For a series, later sends are counted from now. Returns the scheduled message with next_send_at_utc set to now. Only messages with status pending can be sent now.
Inputs
uuidstringrequired- UUID of the scheduled message (starts with EST). Example: EST83feed3c-4f8d-446b-8cbc-4efcc14ef901.
twochat_sms_sendSend an SMS text from one of your 2Chat SMS numbers.WriteSend SMS
Send an SMS text from one of your 2Chat SMS numbers. A2P messages to US numbers are not supported. Returns the sent message's details. Messages over 160 characters are split and billed per segment.
Inputs
from_numberstringrequired- Your 2Chat SMS number in international format. Example: +17137157533.
textstringrequired- Message text. Example: Hello from 2Chat!.
to_numberstringrequired- Recipient phone number in international format. Example: +442079460958.
twochat_tag_createCreate a conversation tag, or get the existing one with that name, and optionally put it on a conversation.WriteCreate Tag
Create a conversation tag, or get the existing one with that name, and optionally put it on a conversation. Returns the tag with uuid, name and color. Safe to call whenever you need a tag. Use twochat_tag_update to set its color.
- Idempotent
Inputs
namestringrequired- Tag name, up to 100 characters. Matching ignores case. Example: Hot lead.
session_keystring- A conversation to put the tag on. Example: WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176.
twochat_tag_updateRename a tag or change its color everywhere it is used.WriteUpdate Tag
Rename a tag or change its color everywhere it is used. Send at least one of name or color. Returns the updated tag. Use twochat_tags_list to find the tag UUID.
- Idempotent
Inputs
tag_uuidstringrequired- Tag UUID (starts with TAG), from twochat_tags_list or twochat_tag_create. Example: TAGd37f22fa-fe01-4a90-b57d-7e83ccc6a05a.
colorstring- Hex color as #RRGGBB. Example: #378ADD.
namestring- New name, up to 100 characters. Example: Qualified lead.
twochat_waba_message_sendSend a WhatsApp Business API message: an approved template (to start a conversation or after 24 hours) or a free-form text within the 24-hour window.WriteSend WABA Message
Send a WhatsApp Business API message: an approved template (to start a conversation or after 24 hours) or a free-form text within the 24-hour window. Returns the sent message's details. Send template_uuid with params, or text, not both. Use twochat_waba_template_get to see a template's variables and twochat_waba_conversation_window_get to check the window.
Inputs
from_numberstringrequired- Your WABA number in international format. Example: +5215512345432.
to_numberstringrequired- Recipient number in international format. Example: +595981048477.
paramsobject- Template variable values: body (values for the body placeholders, in order), header (text header values), header_media_url and header_media_filename (media headers) and button (dynamic URL button value). Send {} when the template has no variables. Example: {"body": ["Ana", "Tuesday 10:00"]}
template_uuidstring- UUID of an APPROVED template (starts with TMP), from twochat_waba_templates_list. Example: TMP1b44a079-c75c-4403-bc8f-a75c4ce5cd23.
textstring- Free-form text, up to 4096 characters. Only delivered while the 24-hour window is open. Example: Thanks for your message, we will reply shortly.
twochat_webhook_subscribeSubscribe a URL to a 2Chat event (WhatsApp, WhatsApp Business API or phone call) so 2Chat POSTs each event to it.WriteSubscribe to Webhook Event
Subscribe a URL to a 2Chat event (WhatsApp, WhatsApp Business API or phone call) so 2Chat POSTs each event to it. Returns the new webhook subscription with its uuid. Use twochat_webhooks_list to review and twochat_webhook_delete to remove subscriptions.
Inputs
event_namestringrequired- The event to subscribe to. Example: whatsapp.message.received.one of
whatsapp.message.receivedwhatsapp.message.sentwhatsapp.message.newwhatsapp.order.receivedwhatsapp.call.receivedwhatsapp.call.madewhatsapp.conversation.newwhatsapp.audio.transcribedwhatsapp.message.reactionwhatsapp.message.editedwhatsapp.message.deletedwhatsapp.group.message.receivedwhatsapp.group.message.reactionwhatsapp.group.joinwhatsapp.group.leavewhatsapp.group.removewhatsapp.message.receipt.sentwhatsapp.message.receipt.not-sentwhatsapp.message.receipt.receivedwhatsapp.message.receipt.readwhatsapp.number.statuswhatsapp.waba.message.sentwhatsapp.waba.message.receivedwhatsapp.waba.message.order.receivedwhatsapp.waba.message.receipt.sentwhatsapp.waba.message.receipt.receivedwhatsapp.waba.message.receipt.readwhatsapp.waba.message.failedwhatsapp.waba.template.status.updatedcall.status.updatecall.incoming.completedcall.outbound.completed hook_urlstringrequired- Public URL that 2Chat calls when the event happens. Example: https://example.com/hooks/2chat.
on_numberstring- Your connected number the event should fire for, in international format. Example: +595981048477.
time_periodstring- Only for whatsapp.conversation.new: how long without messages before a conversation counts as new. Defaults to all-time. Example: day.one of
all-timehourdayweekmonthyear to_group_uuidstring- Only for group events: fire only for this group UUID (WAG...). Defaults to any group. Example: WAG768beeef-2b96-4bc7-9b7f-045078568723.
twochat_whatsapp_group_createCreate a WhatsApp group from your connected number with up to 10 initial participants.WriteCreate WhatsApp Group
Create a WhatsApp group from your connected number with up to 10 initial participants. WhatsApp limits how many groups a number can create per day. Returns the new group with its uuid. Use twochat_whatsapp_group_participants_add to add more people afterwards.
Inputs
from_numberstringrequired- Your WhatsApp number connected to 2Chat, in international format. Example: +595981048477.
namestringrequired- Group name. Example: Customer onboarding.
participantsarrayrequired- Phone numbers to add, in international format, up to 10. Example: ["+17137157533", "+18647351567"]
descriptionstring- Group description. Example: Questions about getting started.
twochat_whatsapp_group_description_setSet the description text of a WhatsApp group.WriteSet WhatsApp Group Description
Set the description text of a WhatsApp group. Returns success. Your number must be allowed to edit the group's info.
- Idempotent
Inputs
descriptionstringrequired- The new description. Example: Questions about getting started.
from_numberstringrequired- Your WhatsApp number connected to 2Chat, in international format. Example: +595981048477.
group_uuidstringrequired- WhatsApp group UUID (starts with WAG), from twochat_whatsapp_groups_list. Example: WAG45b0f301-9203-4660-8b57-b51a6c2742a5.
twochat_whatsapp_group_participants_addAdd up to 10 phone numbers to a WhatsApp group.WriteAdd WhatsApp Group Participants
Add up to 10 phone numbers to a WhatsApp group. Returns the result for each participant. Create the contacts first with twochat_contact_create to lower the ban risk.
- Idempotent
Inputs
from_numberstringrequired- Your WhatsApp number connected to 2Chat, in international format. Example: +595981048477.
group_uuidstringrequired- WhatsApp group UUID (starts with WAG), from twochat_whatsapp_groups_list. Example: WAG45b0f301-9203-4660-8b57-b51a6c2742a5.
participantsarrayrequired- Phone numbers to add, in international format, up to 10. Example: ["+447700176576", "+17137157533"]
twochat_whatsapp_message_scheduleSchedule a WhatsApp message from a WhatsApp Web or WABA number to be sent later, once or on a recurring schedule.WriteSchedule WhatsApp Message
Schedule a WhatsApp message from a WhatsApp Web or WABA number to be sent later, once or on a recurring schedule. Returns the scheduled message with uuid, status and next send time. Send text or url. For recurring messages set repeat_unit and ends_type.
Inputs
from_numberstringrequired- Your 2Chat number that sends the message, in international format. Example: +595981048477.
send_atstringrequired- When to send, as YYYY-MM-DD HH:MM in timezone. Must be in the future; for a series this is the first send. Example: 2026-12-01 09:00.
to_numberstringrequired- Recipient phone number in international format. Example: +447700900461.
ends_datestring- When ends_type is date: last moment a send may go out, as YYYY-MM-DD HH:MM in timezone. Example: 2026-12-31 23:59.
ends_occurrencesinteger- When ends_type is occurrences: total sends including the first. Example: 4.
ends_typestring- Recurring only: never, occurrences (after ends_occurrences sends) or date (until ends_date). Example: occurrences.one of
neveroccurrencesdate repeat_everyinteger- Send every this many units, for example 2 with weekly for every other week. Defaults to 1. Example: 1.
repeat_unitstring- Makes the message recurring: minute, hourly, daily, weekly, monthly or yearly. Requires ends_type. Example: weekly.one of
minutehourlydailyweeklymonthlyyearly textstring- Message text. Send text or url. Example: Reminder: your appointment is tomorrow at 10:00.
timezonestring- IANA time zone for send_at and ends_date. Defaults to the account's time zone. Example: America/New_York.
urlstring- Public URL of a media file to attach. Send text or url. Example: https://example.com/files/menu.pdf.
twochat_whatsapp_message_sendSend a WhatsApp text, media or location message from your connected number to a phone number, a username ID or a group.WriteSend WhatsApp Message
Send a WhatsApp text, media or location message from your connected number to a phone number, a username ID or a group. Returns the sent message's uuid and session_key. Set exactly one of to_number, to_remote_id or to_group_uuid. Use twochat_whatsapp_message_schedule to send later.
Inputs
from_numberstringrequired- Your WhatsApp number connected to 2Chat that sends the message, in international format. Example: +595981048477.
pinobject- A location pin to send: latitude and longitude are required, name, address and url optional. Example: {"latitude": "-25.7752926", "longitude": "-56.647703", "name": "Our store", "address": "Some address 123"}
textstring- Message text. Also used as the caption of a media file. Example: Hi Kate, your order has shipped.
to_group_uuidstring- UUID of a WhatsApp group to send to (WAG...), from twochat_whatsapp_groups_list. Example: WAG768beeef-2b96-4bc7-9b7f-045078568723.
to_numberstring- Recipient phone number in international format. Example: +5215512345432.
to_remote_idstring- Recipient username ID when there is no phone number, such as 123123123123@lid. Example: 123123123123@lid.
urlstring- Public URL of an image, video, audio or PDF file to attach. Example: https://example.com/files/invoice.pdf.
twochat_contact_deleteDelete a contact from your 2Chat directory.DestructiveDelete Contact
Delete a contact from your 2Chat directory. Returns success. Use twochat_contacts_search to find the UUID first.
- Idempotent
Inputs
contact_uuidstringrequired- Contact UUID (starts with CON), from twochat_contacts_list or twochat_contacts_search. Example: CON58147f7c-3756-4ca1-893c-c3360342b424.
twochat_scheduled_message_cancelCancel a scheduled WhatsApp message, or stop a recurring series.DestructiveCancel Scheduled Message
Cancel a scheduled WhatsApp message, or stop a recurring series. This cannot be undone. Returns success. Use twochat_scheduled_messages_list to find the uuid.
- Idempotent
Inputs
uuidstringrequired- UUID of the scheduled message (starts with EST). Example: EST6cc93513-1706-4ffc-a69e-174572d860dd.
twochat_tag_deleteDelete a tag from your account and from every conversation that has it.DestructiveDelete Tag
Delete a tag from your account and from every conversation that has it. This cannot be undone. Returns success. Use twochat_conversation_tag_remove to take a tag off only one conversation.
- Idempotent
Inputs
tag_uuidstringrequired- Tag UUID (starts with TAG), from twochat_tags_list or twochat_tag_create. Example: TAGd37f22fa-fe01-4a90-b57d-7e83ccc6a05a.
twochat_webhook_deleteDelete a webhook subscription.DestructiveDelete Webhook
Delete a webhook subscription. Returns success. Use twochat_webhooks_list to find the webhook UUID (starts with WHK).
- Idempotent
Inputs
webhook_uuidstringrequired- Webhook UUID (starts with WHK). Example: WHK530c9d58-2259-4ce2-82a8-1941f3a60665.
twochat_whatsapp_group_participants_removeRemove up to 10 participants from a WhatsApp group.DestructiveRemove WhatsApp Group Participants
Remove up to 10 participants from a WhatsApp group. Returns the result for each participant. Use twochat_whatsapp_group_get to see current participants.
- Idempotent
Inputs
from_numberstringrequired- Your WhatsApp number connected to 2Chat, in international format. Example: +595981048477.
group_uuidstringrequired- WhatsApp group UUID (starts with WAG), from twochat_whatsapp_groups_list. Example: WAG45b0f301-9203-4660-8b57-b51a6c2742a5.
participantsarrayrequired- Phone numbers to remove, in international format, up to 10. Example: ["+447700176576", "+17137157533"]
twochat_whatsapp_message_deleteDelete a message from 2Chat and from WhatsApp, if it was sent up to 60 hours ago.DestructiveDelete WhatsApp Message
Delete a message from 2Chat and from WhatsApp, if it was sent up to 60 hours ago. In groups only admins can delete others' messages. Returns success. Use twochat_whatsapp_message_get to check the message first.
- Idempotent
Inputs
message_uuidstringrequired- Message UUID (starts with MSG). Example: MSG205dec10-523d-4ab3-b739-fd56e7cdeba2.
session_keystringrequired- Session key of the conversation the message belongs to. Example: WW-WPN66037eca-9ad1-4c96-9eff-526a90a48c77-5215511112222@c.us.
No tools match.