Create a WhatsAppMessage activity

View as Markdown
`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](/resources/files/). 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](/resources/files/). 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.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:)>.

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

send_to_inboxbooleanOptional

Request

This endpoint expects an object.
activity_atdatetimeRequired
contact_idstringRequired
directionenumRequired

This is the former EmailDirection. Any activity that has a concept of direction (in or out) should be using this enum. For historical reasons, this is different from PhoneActivityDirection but at some point PhoneActivityDirection should be deprecated and replaced with CommunicationDirection.

Allowed values:
external_whatsapp_message_idstringRequired
lead_idstringRequired
local_phonestringRequired
message_markdownstringRequired
remote_phonestringRequired
attachmentslist of objectsOptional
response_to_idstring or nullOptional
user_idstring or nullOptional

Response

Successful response
_typestring
activity_atdatetime or null
contact_idstring or null
created_bystring or null
date_createddatetime
date_updateddatetime
directionenum

This is the former EmailDirection. Any activity that has a concept of direction (in or out) should be using this enum. For historical reasons, this is different from PhoneActivityDirection but at some point PhoneActivityDirection should be deprecated and replaced with CommunicationDirection.

Allowed values:
external_whatsapp_message_idstring
idstring
integration_namestring or null
lead_idstring or null
local_phonestring
local_phone_formattedstring
message_htmlstring
message_markdownstring
organization_idstring
remote_phonestring
remote_phone_formattedstring
response_to_idstring or null
sourceenum
textstring
updated_bystring or null
user_idstring or null
userslist of strings
attachmentslist of objects
created_by_namestring or null
sequence_idstring or null
sequence_namestring or null
sequence_subscription_idstring or null
updated_by_namestring or null
user_namestring or null

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error