POST/ deals/ :deal_id/ notes/
Create deal note
You can create a note for a deal.
Attributes
Optional unless marked required
- deal_id
- A unique identifier for the deal which is given by User automatically.
- agent_id
- A unique identifier of an agent who is the author of a note.
- note
- A text of the note.
- created_at
- A datetime of the note creation given in the UNIX format.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X POST "https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"note": "Asked about annual billing; follow up next week."
}'
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/",
{
method: "POST",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
"Content-Type": "application/json",
},
body: JSON.stringify({
note: "Asked about annual billing; follow up next week.",
}),
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"note" => "Asked about annual billing; follow up next week.",
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.post(
"https://<your_app_subdomain>.user.com/api/public/deals/:deal_id/notes/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
json={
"note": "Asked about annual billing; follow up next week.",
},
)
print(response.json())
Response examples
- 201 Created
- 400 Bad Request
{
"id": 9,
"note": "Asked about annual billing; follow up next week.",
"agent_id": 1,
"created_at": "2026-11-10T08:37:40.458327Z"
}
{"note": ["This field is required."],"created_at": ["Datetime has wrong format. Use one of these formats instead: YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]."]}Response fields
Fields returned in the 201 Created response body.
- id
- ID of the note.
- note
- A text of the note.
- agent_id
- A unique identifier of an agent who is the author of a note.
- created_at
- A creation date of a note.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.