latestOpenAPI 3.1.02026-08-233001841.3 MB

0dcf3303e9d7

activities.whatsapp_messages

Create a WhatsAppMessage activity

external_whatsapp_message_id must be the ID of the message inside WhatsApp. You can filter by this field to find messages in Close to update or delete based on updates or deletions in WhatsApp.

message_markdown must be the body of the message in the WhatsApp Markdown format. The message_html read-only field will return the HTML representation of this message.

To include an attachment, you must first upload the file to Close using the Files API. Then, add an object to the attachments array with the following fields: url, filename, and content_type. The url should be the URL provided in the download.url field of the response from the Files API. It must begin with https://app.close.com/go/file/.

integration_link (optional) is a URL string that can be provided by the integration partner creating the WhatsApp message. This can be used to link back to the message in the external system.

response_to_id (optional) is the Close activity ID of another WhatsApp message activity (not the WhatsApp native message ID) that this message is replying to. This field creates a thread relationship between messages, allowing you to track conversation flow and message replies within WhatsApp threads. The ID must be a valid WhatsApp message activity ID in Close (e.g., acti_...).

Only WhatsApp Markdown messages and file attachments are supported. No support is provided for Polls, Events, Locations, etc.

Important: The total size of all attachments for a single WhatsApp message activity cannot exceed 25MB.

When creating a new WhatsApp message with the direction set to incoming, you can pass the query parameter send_to_inbox with the value of true to create a corresponding Inbox Notification for the message.

post/activity/whatsapp_message/

Query parameters

send_to_inboxboolean

Request body

activity_atstring date-time required
contact_idstring required
direction'incoming' | 'outgoing' required

Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.

external_whatsapp_message_idstring required
integration_linkstring uri nullable
lead_idstring required
local_phonestring required
message_markdownstring required
remote_phonestring required
response_to_idstring nullable
user_idstring nullable

Response

Successful response

_typestring required
activity_atstring date-time nullable required
contact_idstring nullable required
created_bystring nullable required
created_by_namestring nullable
date_createdstring date-time required
date_updatedstring date-time required
direction'incoming' | 'outgoing' required

Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.

external_whatsapp_message_idstring required
idstring required
integration_linkstring nullable required
integration_namestring nullable required
lead_idstring nullable required
local_phonestring required
local_phone_formattedstring required
message_htmlstring required
message_markdownstring required
organization_idstring required
remote_phonestring required
remote_phone_formattedstring required
response_to_idstring nullable required
sequence_idstring nullable
sequence_namestring nullable
sequence_subscription_idstring nullable
source'ui' | 'api' | 'import' | 'clipper' | 'email' | 'suggestion' | 'segment-integration' | 'customerio-integration' | 'calendly-integration' | 'ai' | 'whatsapp' | 'webform' required
textstring required
updated_bystring nullable required
updated_by_namestring nullable
user_idstring nullable required
user_namestring nullable
usersstring[] required