Skip to main content
PATCH/activities/:id/

Update activity

You can update an existing activity. Only the fields you send change; an empty body returns the activity as it is. created_at, created_by, updated_at and done_date are read-only: values sent for them are ignored, and so are fields that aren't in the table.

Attributes

Optional unless marked required

idintegerrequired
ID of the activity, in the path.
custom_idstring
Your own ID for the activity. Unique: another activity can't have the same one.
activity_typeinteger
ID of the activity type, from Get activity types.
assigned_tointeger
ID of the agent the activity is assigned to.
company_idinteger
ID of the company the activity is linked to.
deal_idinteger
ID of the deal the activity is linked to.
descriptionstring
Description of the activity.
doneboolean
Whether the activity is done. true sets done_date, false clears it.
due_datestring
When the activity is due, ISO 8601. A date in the past is accepted.
durationinteger
Time needed for the activity. A negative value is accepted.
namestring
Name of the activity. Can't be empty or null.
user_idinteger
ID of the contact the activity is linked to.

Request​

curl -X PATCH "https://<your_app_subdomain>.user.com/api/public/activities/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Onboarding call (rescheduled)",
"done": true
}'

Response examples​

{
"id": 14,
"activity_type": 6,
"name": "Onboarding call (rescheduled)",
"due_date": "2026-11-10T13:40:17Z",
"duration": 30,
"description": "Walk through the first campaign setup.",
"assigned_to": null,
"deal_id": null,
"user_id": 1884,
"company_id": null,
"done": true,
"done_date": "2026-11-09T13:40:19.088135Z",
"created_by": 1,
"created_at": "2026-11-09T13:40:18.141486Z",
"updated_at": "2026-11-09T13:40:19.103687Z",
"custom_id": null
}

A 400 names every field that was rejected, each with its messages. The ones you're most likely to see:

MessageWhen
This field may not be blank. / This field may not be null.name is empty or null.
Invalid pk "123" - object does not exist.No record has that ID: activity_type, assigned_to (agent), user_id, deal_id or company_id.
Incorrect type. Expected pk value, received str.An ID field got a string.
Datetime has wrong format. Use one of these formats instead: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z].due_date isn't an ISO 8601 date and time.
A valid integer is required.duration isn't a whole number.
Must be a valid boolean.done isn't true or false.
activity with this custom id already exists.Another activity already has that custom_id.

The 404 comes back when no activity has that ID.

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the activity which is given by User automatically.
activity_typeinteger
A unique identifier of any activity type given by User automatically.
namestring
An activity name.
due_datestring (date-time)
When the activity is due, ISO 8601 (for example 2026-11-21T10:00:00Z). A date in the past is accepted.
durationinteger
Time needed for the activity. 15 when not sent. Not checked beyond being a whole number: a negative value is accepted.
descriptionstring
A description of the activity.
assigned_tointegernullable
A unique identifier for the agent which is given by User automatically.
deal_idintegernullable
A unique identifier for the deal which is given by User automatically.
user_idintegernullable
ID of the contact the activity is linked to. null when there's none, also after the contact is deleted.
company_idintegernullable
A unique identifier for the company which is given by User automatically.
doneboolean
Whether the activity is done. false when not sent.
done_datestring (date-time)nullable
When the activity was marked as done: set when done becomes true, cleared when it becomes false. Read-only.
created_byinteger
A unique identifier of an agent who created an activity.
created_atstring (date-time)
A creation date of an activity.
updated_atstring (date-time)
A date of last activity update.
custom_idstringnullable
Your own ID for the activity. Unique: another activity can't have the same one.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.