Can't create a call via API

I’m trying to create a call object via the API, using POST to endpoint /crm/v3/objects/calls, but I keep getting error pointing to missing timestamp, but it’s not missing, and I can’t see what is the issue is. Any help?

Here is the request:

{

“hs_call_body”: “”,

“hs_call_direction”: “OUTBOUND”,

“hs_call_duration”: 1800000,

“hs_call_title”: “Test”,

“hs_timestamp”: 1668602707000,

“hubspot_owner_id”: “214698412”

}

and the response:

{

“status”: “error”,

“message”: “Error creating CALL. Some required properties were not set.”,

“correlationId”: “d07786b9-d32e-4b17-ad3b-433fe574684f”,

“context”: {

“properties”: [

“hs_timestamp”

]

},

“category”: “VALIDATION_ERROR”

}

Hi, @MVänninen :waving_hand: Is this still occurring for you? Do you get the same error when you try creating a call from the endpoint example here? — POST /crm/v3/objects/calls

My quick test —

Request

curl --request POST \
 --url https://api.hubapi.com/crm/v3/objects/calls \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 --header 'content-type: application/json' \
 --data '{
 "properties": {
 "hs_timestamp": "1668602707000",
 "hs_call_title": "Discovery call 3",
 "hubspot_owner_id": "198670650",
 "hs_call_body": " Decision maker out, will call back tomorrow",
 "hs_call_duration": "3800",
 "hs_call_from_number": "(857)Ï829 5489",
 "hs_call_to_number": "(509) 999 9999",
 "hs_call_recording_url": "https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919116b2d22",
 "hs_call_status": "COMPLETED"
 }
}'

Response

HTTP 201

{
 "id": "28019426131",
 "properties": {
 "hs_all_accessible_team_ids": "12073943",
 "hs_all_owner_ids": "198670650",
 "hs_all_team_ids": "12073943",
 "hs_body_preview": "Decision maker out, will call back tomorrow",
 "hs_body_preview_html": "<html>\n <head></head>\n <body>\n Decision maker out, will call back tomorrow\n </body>\n</html>",
 "hs_body_preview_is_truncated": "false",
 "hs_call_body": " Decision maker out, will call back tomorrow",
 "hs_call_duration": "3800",
 "hs_call_from_number": "(857)Ï829 5489",
 "hs_call_recording_url": "https://api.twilio.com/2010-04-01/Accounts/AC890b8e6fbe0d989bb9158e26046a8dde/Recordings/RE3079ac919116b2d22",
 "hs_call_status": "COMPLETED",
 "hs_call_title": "Discovery call 3",
 "hs_call_to_number": "(509) 999 9999",
 "hs_createdate": "2022-11-17T22:47:06.092Z",
 "hs_lastmodifieddate": "2022-11-17T22:47:06.092Z",
 "hs_object_id": "28019426131",
 "hs_timestamp": "2022-11-16T12:45:07Z",
 "hs_user_ids_of_all_owners": "10233975",
 "hubspot_owner_assigneddate": "2022-11-17T22:47:06.092Z",
 "hubspot_owner_id": "198670650",
 "hubspot_team_id": "12073943"
 },
 "createdAt": "2022-11-17T22:47:06.092Z",
 "updatedAt": "2022-11-17T22:47:06.092Z",
 "archived": false
}

Thank you! — Jaycee

Yes, still getting the same error, even when using the example from the documentation.

Right, so the issue was with missing properties element. Thats what was missing.