For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomepageProduct HelpLog inTry for Free
Developers HomeAPI ReferenceMCP
Developers HomeAPI ReferenceMCP
  • Getting Started
    • Introduction
    • Authentication with API Keys
    • Authentication with OAuth
    • API Clients
    • Pagination
    • Specifying Fields
    • Filter Parameters
    • HTTP Response Codes
    • Rate Limits
    • Timezone Offsets
    • Rich Text Fields
    • Changelog
  • CRM Core
    • Leads
    • Contacts
    • Opportunities
    • Tasks
    • Files
    • Custom Objects
    • Comments
  • Activities
    • Activities
    • Notes
    • Calls
    • Emails
    • Email Threads
    • WhatsApp Messages
      • GETList or filter all WhatsAppMessage activities
      • POSTCreate a WhatsAppMessage activity
      • GETGet a single WhatsAppMessage activity
      • PUTUpdate a WhatsAppMessage activity
      • DELDelete a WhatsAppMessage activity
    • Meetings
    • Custom Activities
    • Creations
    • Form Submissions
    • Lead Status Changes
    • Opportunity Status Changes
    • Lead Merges
    • Task Completions
  • Events & Webhooks
    • Webhooks
    • Events
  • Search & Reporting
    • Advanced Filtering
    • Smart Views
    • Reporting
  • Automation & Bulk Actions
    • Sequences (Workflows)
    • Bulk Actions
    • Exports
    • AI Field Enrichment
  • CRM Configuration
    • Custom Fields
    • Custom Activity Types
    • Custom Object Types
    • Pipelines
    • Opportunity Statuses
    • Lead Statuses
    • Integration Links
    • Forms
  • Communication Configuration
    • Email Templates
    • SMS Templates
    • Outcomes
    • Playbooks
    • Scheduling Links Guide
    • Scheduling Links
    • Connected Accounts
    • Send As
    • Unsubscribed Emails
    • Phone Numbers
    • Blocked Phone Numbers
    • Dialers
  • Users & Organizations
    • Users
    • Organizations
    • Memberships
    • Roles
    • Groups
Close

Product

OverviewCommunicationAutomationIntegrationsReportingSMSCallingSecurityForms

Pricing & Use Cases

PricingClose vs Other CRMsCustomer Stories

Resources

Sales BlogSales ResourcesSales GuidesWebinarsOn-Demand DemoSales Tools

Company

AboutCareersPartner with CloseBrand GuidelinesTermsPrivacyGDPRCCPA

Get Help

+1-833-GO-CLOSEHelp CenterDownload the Close AppProduct UpdatesSystem Status
LogoLogo
HomepageProduct HelpLog inTry for Free
ActivitiesWhatsApp Messages

Create a WhatsAppMessage activity

||View as Markdown|
POST
https://api.close.com/api/v1/activity/whatsapp_message/
POST
/api/v1/activity/whatsapp_message/
$curl -X POST https://api.close.com/api/v1/activity/whatsapp_message/ \
> -H "Content-Type: application/json" \
> -u "<CLOSE_API_KEY>:" \
> -d '{
> "activity_at": "2016-10-03T16:06:11.167000+00:00",
> "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
> "direction": "outgoing",
> "external_whatsapp_message_id": "1234567890",
> "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
> "local_phone": "16503334444",
> "message_markdown": "test",
> "remote_phone": "18183004000",
> "integration_link": "https://example.com/messages/1234567890",
> "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
> "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH"
>}'
1{
2 "_type": "WhatsAppMessage",
3 "activity_at": "2016-10-03T16:06:11.167000+00:00",
4 "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
5 "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
6 "date_created": "2016-10-03T16:06:11.167000+00:00",
7 "date_updated": "2016-10-03T16:06:11.167000+00:00",
8 "direction": "outgoing",
9 "external_whatsapp_message_id": "1234567890",
10 "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp",
11 "integration_link": "https://example.com/messages/1234567890",
12 "integration_name": "API",
13 "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb",
14 "local_phone": "+16503334444",
15 "local_phone_formatted": "+1 650-333-444",
16 "message_html": "<p>test</p>",
17 "message_markdown": "test",
18 "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
19 "remote_phone": "+18183004000",
20 "remote_phone_formatted": "+1 818-300-4000",
21 "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
22 "source": "api",
23 "text": "test",
24 "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
25 "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
26 "users": [],
27 "attachments": [],
28 "created_by_name": "Tobias Fuenke",
29 "updated_by_name": "Tobias Fuenke",
30 "user_name": "Tobias Fuenke"
31}
`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](https://developer.close.com/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](https://developer.close.com/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.
Was this page helpful?
Previous

List or filter all WhatsAppMessage activities

Next

Get a single WhatsAppMessage activity

Built with

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.

Authentication

AuthorizationBasic
Use your API key as the username and leave the password empty.
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

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

Allowed values:
external_whatsapp_message_idstringRequired
lead_idstringRequired
local_phonestringRequired
message_markdownstringRequired
remote_phonestringRequired
attachmentslist of objectsOptional
integration_linkstring or nullOptionalformat: "uri"1-2083 characters
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

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

Allowed values:
external_whatsapp_message_idstring
idstring
integration_linkstring or null
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