# Update activity

You can update an existing activity.

PATCH /activities/:id/

Attributes Type Required Description
id string yes A unique identifier for the user which is given by User.com automatically.
custom_id string no The unique identifier for the activity which is provided by the client.
activity_type integer no A unique identifier of any activity type given by User.com automatically.
assigned_to integer no A unique identifier for the agent which is given by User.com automatically.
company integer no A unique identifier for the company which is given by User.com automatically.
created_at string no A creation date of an activity.
created_by integer no A unique identifier of an agent who created an activity.
deal integer no A unique identifier for the deal which is given by User.com automatically.
description string no A description of the activity.
done boolean no A flag informing if the activity is finished or not.
done_date string no Date when activity was done.
datetime string no A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
duration integer no A time needed to complete the activity.
name string yes The main title of the activity.
updated_at string no A date of last activity update.
person integer no A unique identifier for the user which is given by User.com automatically.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
curl -X POST -H "Authorization: Token <your_64_char_api_key> " -H "Content-Type: application/json" -d '{
      "name": "Updated name",
      "description": "updated description" }'
      "https://<your_app_subdomain>.user.com/api/public/activities/:id/"

# Response

  {
      "id": 2695,
      "activity_type": 25946,
      "name": "Updated name",
      "datetime": "2017-07-25T14:14:08.612000Z",
      "duration": 15,
      "description": "Updated description",
      "assigned_to": 5725,
      "deal": 2788,
      "person": null,
      "company": null,
      "done": false,
      "done_date": null,
      "created_by": 5567,
      "created_at": "2017-07-14T14:40:01.543675Z",
      "updated_at": "2017-07-28T14:52:08.972076Z"
  }