Call API: hs_call_callee_object_type_id does not exists

When I create a call through the API by adding the parameter hs_call_callee_object_type_id=CONTACT in order to associate the call with a contact, I get an error and cannot create the call.

Example of API call:

curl --request POST --url https://api.hubapi.com/crm/v3/objects/calls --header ‘authorization: Bearer MY_TOKEN ’ --header ‘content-type: application/json’ --data ’ {“properties”: {“hs_timestamp”: “1718755200000”, “hs_call_body”: “Incoming call”, “hs_call_callee_object_type_id”:“CONTACT”, “hs_call_callee_object_id”:“317112”, “hs_call_direction”: “INBOUND”, “hs_call_disposition” : “f240bbac-87c9-4f6e-bf70-924b57d47db7”, “hs_call_duration”: “7000”, “hs_call_from_number”: “751000342”, “hs_call_status”: “COMPLETED”, “hs_call_title”: “Incoming call”, “hs_call_source”: “INTEGRATIONS_PLATFORM”, “hs_call_to_number”: “851040942”, “hubspot_owner_id”: “47892150”}}’

Result:

{“status”:“error”,“message”:"Property values ​​were not valid: [{\“isValid\”:false,\“message\”:\“Property \\\“hs_call_callee_object_type_id\\\” does not exists\”,\“error\”:\“PROPERTY_DOESNT_EXIST\”,\“name\”:\“hs_call_callee_object_type_id\”,\“localizedErrorMessage\”:\"The property \\\“hs_call_callee_object_type_id\\\” does not exist\ “,\“portalId\”:6109494}]”,“correlationId”:“2e3162f3-a8fc-46a5-a1c6-4346a8bb4fa5”,“category”:“VALIDATION_ERROR”}

Hi antoniolao,
The curl request below works for me, make sure instead of using “hs_call_callee_object_type_id” use this “hs_call_callee_object_type” and second thing to ensure the the contact id you are passing in the request must be exists.

curl --location ‘https://api.hubapi.com/crm/v3/objects/calls’ \

--header ‘authorization: Bearer pat********************9’ \

--header ‘content-type: application/json’ \

--data '{

"properties": {

    "hs\_timestamp": "1718755200000",

    "hs\_call\_body": "Incoming call",

     "hs\_call\_callee\_object\_type": "CONTACT",

    "hs\_call\_callee\_object\_id": 25431089318,

    "hs\_call\_direction": "INBOUND",

    "hs\_call\_disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7",

    "hs\_call\_duration": "7000",

    "hs\_call\_from\_number": "751000342",

    "hs\_call\_status": "COMPLETED",

    "hs\_call\_title": "Incoming call",

    "hs\_call\_source": "INTEGRATIONS\_PLATFORM",

    "hs\_call\_to\_number": "851040942"

}

}’

Now it no longer returns an error, but the call is not assigned to the contact

set this parameter “hubspot_owner_id” with existing owner id, I hope it will work.

That is not the solution, this is assigned to the owner but not to the contact.

In the end I solved it this way:

1º I create the call as indicated above

2º I assign the call to the contact as follows:

curl --request PUT --url https://api.hubapi.com/crm/v3/objects/calls/{callId}/associations/contacts/{contactId}/call_to_contact --header ‘authorization: Bearer MY_TOKEN’ -- header ‘content-type: application/json’