PATCH
/deals/:deal_id/notes/:note_id/Update deal note
You can update a specific note connected to a specific deal.
| Attributes | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | yes | A unique identifier for the deal which is given by User.com automatically. |
| note_id | integer | yes | A unique identifier for the note which is given by User.com automatically. |
| note | string | yes | A text of the note. |
Request
- CURL
- JavaScript
- PHP
- Python
curl -X PATCH -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"note": "updated content"
}' "https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/:note_id/"
var data = JSON.stringify({
"note": "updated content"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/:note_id/");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");
xhr.setRequestHeader("accept", "*/*; version=2");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
<?php
$request = new HttpRequest();
$request->setUrl('https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/:note_id/');
$request->setMethod(HTTP_METH_PATCH);
$request->setHeaders(array(
'content-type' => 'application/json',
'authorization' => 'Token <your_64_char_api_key>'
));
$request->setBody('{
"note": "updated content"
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/:note_id/"
payload = "{\n \"note\": \"updated content\" \n}"
headers = {
'authorization': "Token <your_64_char_api_key>",
'Accept': "*/*; version=2",
'content-type': "application/json"
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)
Response
{
"id": 27791,
"note": "updated content",
"author": 382
}