Quick tipDeveloperSales HubSmart CRM

Log an SMS to a HubSpot contact's timeline with the API: the association you cannot skip

The API returned 201 and the SMS was nowhere on the contact. It had been created, attached to nothing.

Subscription
All tiers with CRM API access
Permissions
Private app with communications and contacts scopes
Time
6 min · Intermediate
Last verified

Short answer

An SMS on a HubSpot timeline is a communication record. Create it with POST /crm/v3/objects/communications, set hs_communication_channel_type to SMS, give it hs_timestamp, and associate it to the contact in the same request with associationTypeId 81. Without the association block the call still returns 201, and the record sits attached to nothing.

1. The request

POST /crm/v3/objects/communications
{
  "properties": {
    "hs_communication_channel_type": "SMS",
    "hs_communication_logged_from": "CRM",
    "hs_communication_body": "Running 10 minutes late",
    "hs_timestamp": "2026-09-21T23:58:00Z"
  },
  "associations": [{
    "to": { "id": "CONTACT_ID" },
    "types": [{ "associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 81 }]
  }]
}

I confirmed 81 as communication to contact by reading the association labels endpoint for communications and contacts rather than guessing. The same channel property also takes WHATS_APP and LINKEDIN_MESSAGE.

Record activity More menu showing Log SMS, Log a LinkedIn message and Log a WhatsApp message
The same record type users log by hand from the More menu (1).

2. The failure that looks like success

Leave out associations and HubSpot still creates the record and returns 201. It just is not on any timeline. If your integration "works" and nobody can find the messages, check this first.

3. Matching the contact by phone

We run this from an automation tool: a webhook receives the SMS, a search finds the contact by phone, then an API call creates the communication. Two limits we hit:

  • Exact match. The search uses an exact equals filter, so 4695551234 does not find +14695551234 or (469) 555-1234. Normalize both sides. See phone formats hiding duplicates.
  • No contact, no log. When the search finds nobody, the scenario stops and nothing is logged. Add a branch that records unmatched messages somewhere you will see them.

Sources

New field notes by email

One email when a new article publishes.

Still stuck?

If this did not fix it, the problem is probably specific to your setup. Book a call and we will look at it together.

Book a call with Sam