Use the calls engagement API to log and manage calls on CRM records.
POST
request to /crm/v3/objects/calls
.
In the request body, add call details in a properties object. You can also add an associations object to associate your new call with an existing record (e.g.,contacts, companies).
Field | Description |
---|---|
hs_timestamp | Required. This field marks the call’s time of creation and determines where the call sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. |
hs_call_body | The description of the call, including any notes that you want to add. |
hs_call_callee_object_id | The ID of the HubSpot record associated with the call. This will be the recipient of the call for OUTBOUND calls, or the dialer of the call for INBOUND calls. |
hs_call_callee_object_type | The type of the object to which the call’s associated record belongs (e.g., specifies if the record is a contact or company). This will be the object of the recipient for OUTBOUND calls, or the object of the dialer for INBOUND calls. |
hs_call_direction | The direction of the call from the perspective of the HubSpot user. If the user is the call recipient, the direction should be set to INBOUND . If the user initiated the call, the direction should be set to OUTBOUND . |
hs_call_disposition | The outcome of the call. To set the call disposition, you need to use the internal GUID value. If your account has set up custom call outcomes, you can find their disposition GUIDs using this API. The default HubSpot outcome labels and their internal values are:
|
hs_call_duration | The duration of the call in milliseconds. |
hs_call_from_number | The phone number that the call was made from. |
hs_call_recording_url | The URL that stores the call recording. URLS to .mp3 or .wav files can be played back on CRM records. Only HTTPS, secure URLs will be accepted. |
hs_call_status | The status of the call. The statuses are BUSY , CALLING_CRM_USER , CANCELED , COMPLETED , CONNECTING , FAILED , IN_PROGRESS , NO_ANSWER , QUEUED , and RINGING . |
hs_call_title | The title of the call. |
hs_call_source | The source of the call. This is not required, but it is required to leverage the recording and transcriptions pipeline. If the property is set, it must be set to INTEGRATIONS_PLATFORM . |
hs_call_to_number | The phone number that received the call. |
hubspot_owner_id | The ID of the owner associated with the call. This field determines the user listed as the call creator on the record timeline. |
hs_activity_type | The type of call. The options are based on the call types set in your HubSpot account. |
hs_attachment_ids | The IDs of the call’s attachments. Multiple attachment IDs are separated by a semi-colon. |
Field | Description |
---|---|
to | The record you want to associate with the call, specified by its unique id value. |
types | The type of the association between the call and the record. Include the associationCategory and associationTypeId . Default association type IDs are listed here, or you can retrieve the value for custom association types (i.e. labels) via the associations API. |
GET
request to /crm/v3/objects/calls/{callId}
. You can include the following parameters in the request URL:
Parameter | Description |
---|---|
properties | A comma separated list of the properties to be returned. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a call doesn’t have a value, it will be returned as null . |
associations | A comma separated list of object types to retrieve associated IDs for. Any specified associations that don’t exist will not be returned in the response. Learn more about the associations API. |
GET
request to /crm/v3/objects/calls
. You can include the following parameters in the request URL:
Parameter | Description |
---|---|
limit | The maximum number of results to display per page. |
properties | A comma separated list of the properties to be returned. If a requested property isn’t defined, it won’t be included in the response. If a requested property is defined but a call doesn’t have a value, it will be returned as null . |
callId
which you can use to retrieve, update, and delete the call.
hs_call_recording_url
property. If your account has access to inbound calling, to differentiate between calls that were completed and recorded vs. inbound calls with a voicemail, include the following properties in your request: hs_call_status
and hs_call_has_voicemail
.
If a call has a voicemail, the hs_call_status
value will be missed
, and the hs_call_has_voicemail
value will be true
. The hs_call_has_voicemail
value will be false
for an inbound call where no voicemail was left, or null
if the call has a status other than missed.
PATCH
request to /crm/v3/objects/calls/{callId}
.
In the request body, include the call properties that you want to update:
PUT
request to /crm/v3/objects/calls/{callId}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
. The request URL contains the following fields:
Field | Description |
---|---|
callId | The ID of the call. |
toObjectType | The type of object that you want to associate the call with (e.g., contact or company) |
toObjectId | The ID of the record that you want to associate the call with. |
associationTypeId | A unique identifier to indicate the association type between the call and the other object. The ID can be represented numerically or in snake case (e.g., call_to_contact ). You can retrieve the value through the associations API. |
https://api.hubspot.com/crm/v3/objects/calls/17591596434/associations/contact/104901/194
DELETE
request to the same URL as above:
/crm/v3/objects/calls/{callId}/associations/{toObjectType}/{toObjectId}/{associationTypeId}
id
in the hs_pinned_engagement_id
field when creating or updating a record via the object APIs. Learn more about using the companies,contacts, deals, tickets, and custom objects APIs.
DELETE
request to /crm/v3/objects/calls/{callId}
.
Learn more about deleting calls by checking out the reference documentation.