APIs & Integrations

antoniolao
Member

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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"}

0 Upvotes
1 Accepted solution
antoniolao
Solution
Member

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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_conta... --header 'authorization: Bearer MY_TOKEN' -- header 'content-type: application/json'

View solution in original post

0 Upvotes
4 Replies 4
AliFawadHassan
Participant

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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.



--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"
    }
}'

 

0 Upvotes
antoniolao
Member

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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

0 Upvotes
AliFawadHassan
Participant

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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

0 Upvotes
antoniolao
Solution
Member

Call API: hs_call_callee_object_type_id does not exists

SOLVE

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_conta... --header 'authorization: Bearer MY_TOKEN' -- header 'content-type: application/json'

0 Upvotes