curl --request PATCH \
--url https://api.example.com/activities/{activity_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"summary": "<string>",
"body": "<string>",
"contact_id": "<string>",
"deal_id": "<string>"
}
'import requests
url = "https://api.example.com/activities/{activity_id}"
payload = {
"type": "<string>",
"summary": "<string>",
"body": "<string>",
"contact_id": "<string>",
"deal_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
summary: '<string>',
body: JSON.stringify('<string>'),
contact_id: '<string>',
deal_id: '<string>'
})
};
fetch('https://api.example.com/activities/{activity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/activities/{activity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'summary' => '<string>',
'body' => '<string>',
'contact_id' => '<string>',
'deal_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/activities/{activity_id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/activities/{activity_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/activities/{activity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update an Activity
Edit an activity’s content (type/subject/body/contact_id) and deal link.
deal_id changes route through rpc_link_activity_to_deal (account validation + backfill + last_activity_at bump); everything else is a direct column PATCH.
curl --request PATCH \
--url https://api.example.com/activities/{activity_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"summary": "<string>",
"body": "<string>",
"contact_id": "<string>",
"deal_id": "<string>"
}
'import requests
url = "https://api.example.com/activities/{activity_id}"
payload = {
"type": "<string>",
"summary": "<string>",
"body": "<string>",
"contact_id": "<string>",
"deal_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
summary: '<string>',
body: JSON.stringify('<string>'),
contact_id: '<string>',
deal_id: '<string>'
})
};
fetch('https://api.example.com/activities/{activity_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/activities/{activity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'summary' => '<string>',
'body' => '<string>',
'contact_id' => '<string>',
'deal_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/activities/{activity_id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/activities/{activity_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/activities/{activity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"summary\": \"<string>\",\n \"body\": \"<string>\",\n \"contact_id\": \"<string>\",\n \"deal_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}null clears a column (e.g. unlinking a contact), an omitted field is left untouched entirely. At least one field must be present, or the request fails with 422.
System-generated activities are read-only: stage-change/audit rows (any type outside note/call/meeting/email/task) and provider-synced rows (any source outside manual/import — e.g. calendar, gmail, outlook, slack, teams from a connected Pipedream integration) can’t be edited, and this endpoint returns 403. A null source is treated as user-created.
deal_id is handled specially: a change routes through the same validated RPC as Link an activity to a deal (so the account-match check, account backfill, and deals.last_activity_at bump all still apply), not a raw column write. If the activity is already linked to a different deal, it’s unlinked first and then relinked to the new one. Every other field (type, summary → subject, body, contact_id) is a direct PostgREST column patch.
{"id": "<activity_id>"} — not the updated row. Re-GET the activity if you need the fresh state back.Auth
Requires a CRM manage scope and an active organization on the token. Any*:manage scope qualifies — in practice contacts:manage, deals:manage, companies:manage, or activities:manage.
Response
| Field | Type | Description |
|---|---|---|
id | string (uuid) | The activity’s id. |
Errors
| Status | Cause |
|---|---|
403 Forbidden | Activity is system-generated (non-user type or source) and can’t be edited. |
404 Not Found | Activity doesn’t exist in this org; or, if deal_id is being changed, the new deal doesn’t exist. |
409 Conflict | Only reachable under a race: the router always unlinks the activity’s current deal before relinking to the new one, so the RPC’s “already linked to a different deal” check should not normally fire from this endpoint. |
422 Unprocessable Entity | No fields present in the body; or the new deal’s account conflicts with the activity’s account. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The activity's id to update.
Body
Partial edit of an activity's content and associations.
Only fields present in the request are patched — an explicit null clears
the column (e.g. unlinking a deal/contact), while an omitted field is left
untouched.
New activity type; omit to leave unchanged.
New subject line; omit to leave unchanged, maps to the subject column.
New body text; omit to leave unchanged.
New contact link, or null to clear it; omit to leave unchanged.
New deal link, or null to unlink; omit to leave unchanged, routed through the link-deal RPC.
Response
Successful Response
The response is of type Response Update Activity Activities Activity Id Patch · object.