Skip to main content
POST/activities/

Create activity

You can create an activity. You can also set up any custom attribute of your choice. If a specified custom attribute doesn't exist yet it will be created.

AttributesTypeRequiredDescription
custom_idstringnoThe unique identifier for the activity which is provided by the client.
activity_typeintegeryesA unique identifier of any activity type given by User.com automatically.
assigned_tointegernoA unique identifier for the agent which is given by User.com automatically.
company_idintegernoA unique identifier for the company which is given by User.com automatically.
deal_idintegernoA unique identifier for the deal which is given by User.com automatically.
descriptionstringnoA description of the activity.
donebooleannoA flag informing if the activity is finished or not.
due_datestringyesA date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
durationintegernoA time needed to complete the activity.
namestringyesThe main title of the activity.
user_idintegernoA unique identifier for the user which is given by User.com automatically.

Request​

curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"activity_type": 25946,
"name": "My new activity",
"datetime": "2017-07-25T14:14:08.612000Z"
}' "https://<your_app_subdomain>.user.com/api/public/activities/"

Response​

{
"id": 1200,
"activity_type": 1,
"name": "string",
"datetime": "2019-08-24T14:15:22Z",
"duration": 2147483648,
"description": "string",
"assigned_to": 1,
"deal": 0,
"person": 0,
"company": 0,
"done": true,
"done_date": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"custom_id": "my_custom_id"
}