Help for API v2 usage

Hello
Dear all,

I am trying to use /v2/activities to add one

Here is the payload :

{
‘subject’: ‘my subject’,
‘type’: ‘call’,
‘owner_id’: 123456,
‘participants’: [{‘person_id’: 3, ‘primary’: True}],
‘due_date’: ‘2026-08-11’,
‘due_time’: ‘09:51:00’,
‘done’: False,
‘note’: “my note”,
‘duration’: ‘00:02:00’
}

What can be wrong ?

I keep getting the following error :
{‘success’: False, ‘error’: ‘Validation failed: due_time: This value is not a valid datetime.; duration: This value is not valid.’, ‘code’: ‘ERR_SCHEMA_VALIDATION_FAILED’}

Could someone please enlighten me ?

Thank you for your help

Hi Bruno,

It looks like the precision for both due_time and duration is limited to minutes.

You could try dropping the seconds from due_time, for example, using 09:51 instead of 09:51:00.

I also noticed that for duration, you may need to calculate the total number of hours if the duration is longer than one day.

Hope that helps!

Hello Tommy.
Thank you very much. I will try your suggestions and post the result here !
Have a good day