curl --request PATCH \
--url https://api.chatsailer.com/v1/deals/{deal_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "crm-48213",
"lost_justification": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tag_ids": [
"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
],
"title": "<string>",
"value": 123
}
'import requests
url = "https://api.chatsailer.com/v1/deals/{deal_id}"
payload = {
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "crm-48213",
"lost_justification": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tag_ids": ["tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"],
"title": "<string>",
"value": 123
}
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({
contact_id: 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
custom_fields: {},
expected_close_date: '2023-11-07T05:31:56Z',
external_id: 'crm-48213',
lost_justification: '<string>',
lost_reason_id: 'lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
probability: 50,
stage_id: 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
tag_ids: ['tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'],
title: '<string>',
value: 123
})
};
fetch('https://api.chatsailer.com/v1/deals/{deal_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.chatsailer.com/v1/deals/{deal_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([
'contact_id' => 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'custom_fields' => [
],
'expected_close_date' => '2023-11-07T05:31:56Z',
'external_id' => 'crm-48213',
'lost_justification' => '<string>',
'lost_reason_id' => 'lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'probability' => 50,
'stage_id' => 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'tag_ids' => [
'tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'
],
'title' => '<string>',
'value' => 123
]),
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.chatsailer.com/v1/deals/{deal_id}"
payload := strings.NewReader("{\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\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.chatsailer.com/v1/deals/{deal_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/deals/{deal_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 \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"lost_justification": "<string>",
"lost_reason": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "deal",
"organization": {
"created_at": "2023-11-07T05:31:56Z",
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"custom_fields": {},
"external_id": "<string>",
"object": "organization",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"website": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 123,
"score": "cold",
"stage_changed_at": "2023-11-07T05:31:56Z",
"status": "open",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"value": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Update a deal
Only the fields you send change. Send null to clear one; omit it to leave it alone. custom_fields merges the same way.
To move a deal between stages prefer POST /v1/deals/{deal_id}/stage, which resolves the stage inside this deal’s own pipeline and so cannot land it in another one.
curl --request PATCH \
--url https://api.chatsailer.com/v1/deals/{deal_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "crm-48213",
"lost_justification": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tag_ids": [
"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
],
"title": "<string>",
"value": 123
}
'import requests
url = "https://api.chatsailer.com/v1/deals/{deal_id}"
payload = {
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "crm-48213",
"lost_justification": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tag_ids": ["tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"],
"title": "<string>",
"value": 123
}
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({
contact_id: 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
custom_fields: {},
expected_close_date: '2023-11-07T05:31:56Z',
external_id: 'crm-48213',
lost_justification: '<string>',
lost_reason_id: 'lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
probability: 50,
stage_id: 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
tag_ids: ['tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'],
title: '<string>',
value: 123
})
};
fetch('https://api.chatsailer.com/v1/deals/{deal_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.chatsailer.com/v1/deals/{deal_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([
'contact_id' => 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'custom_fields' => [
],
'expected_close_date' => '2023-11-07T05:31:56Z',
'external_id' => 'crm-48213',
'lost_justification' => '<string>',
'lost_reason_id' => 'lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'probability' => 50,
'stage_id' => 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'tag_ids' => [
'tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4'
],
'title' => '<string>',
'value' => 123
]),
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.chatsailer.com/v1/deals/{deal_id}"
payload := strings.NewReader("{\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\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.chatsailer.com/v1/deals/{deal_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/deals/{deal_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 \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"external_id\": \"crm-48213\",\n \"lost_justification\": \"<string>\",\n \"lost_reason_id\": \"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"tag_ids\": [\n \"tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\"\n ],\n \"title\": \"<string>\",\n \"value\": 123\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"lost_justification": "<string>",
"lost_reason": "<string>",
"lost_reason_id": "lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "deal",
"organization": {
"created_at": "2023-11-07T05:31:56Z",
"id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "private",
"custom_fields": {},
"external_id": "<string>",
"object": "organization",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"website": "<string>"
},
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner": {
"id": "<string>",
"kind": "user",
"name": "<string>",
"object": "owner"
},
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 123,
"score": "cold",
"stage_changed_at": "2023-11-07T05:31:56Z",
"status": "open",
"tags": [
{
"id": "tag_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"name": "<string>",
"color": "<string>",
"object": "tag"
}
],
"value": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "invalid_request_error",
"detail": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"documentation_url": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Authorizations
A workspace API token (sk_live_...) or an OAuth access token (oat_live_...). Create workspace tokens in Settings > API. Send either as Authorization: Bearer <token>.
Headers
A unique value (a UUID works) that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the original response instead of acting twice; the same key with a different body is a 409 idempotency_key_reused.
255Path Parameters
Unique identifier for a deal.
^deal_[0-9a-f]{32}$"deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Query Parameters
Comma-separated relationships to inline in the response, e.g. organization. Unexpanded relations are still identified by their *_id field.
"organization"
Body
Body for PATCH /v1/deals/{deal_id}.
Only the fields you send change. Send null to clear one; omit it to leave
it alone. To move a deal between stages prefer POST /v1/deals/{id}/stage,
which resolves a stage within the deal's own pipeline and cannot land it in
another one.
Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Your own id for this record, e.g. its id in your system. Unique per workspace and resource; send null to clear it.
1 - 255"crm-48213"
Free-text detail on the loss. Optional; only accepted when the deal is lost, already or by status: lost in this same request.
Unique identifier for a lost reason.
^lrsn_[0-9a-f]{32}$"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for an organization.
^org_[0-9a-f]{32}$"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for an user.
^usr_[0-9a-f]{32}$"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
0 <= x <= 100How warm a deal is.
cold, warm, hot Unique identifier for a stage.
^stg_[0-9a-f]{32}$"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Whether a deal is still open, won or lost.
open, won, lost The complete set of tags this deal should carry, from GET /v1/tags?resource=deal. Replaces the current set: send [] to remove every tag, omit the field to leave tags unchanged.
Unique identifier for a tag.
^tag_[0-9a-f]{32}$Who in the workspace can see a record: only its owner, the owner's team, the team and its sub-teams, or everyone.
private, team, team_and_subteams, company Response
Successful Response
A negotiation in a pipeline, with a contact and/or an organization.
Unique identifier for a deal.
^deal_[0-9a-f]{32}$"deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a pipeline.
^pipe_[0-9a-f]{32}$"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a stage.
^stg_[0-9a-f]{32}$"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Who in the workspace can see this record. A workspace token sees every record regardless; an OAuth token sees what the person who authorized it can see.
private, team, team_and_subteams, company Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Every custom field defined on deals in this workspace, keyed by field key and typed from its definition. Unset fields are null.
Your own id for this record, when you set one.
Free-text detail on the loss, when status is lost.
Name of the reason, when status is lost.
Unique identifier for a lost reason.
^lrsn_[0-9a-f]{32}$"lrsn_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
"deal"Populated only when organization is in expand.
Show child attributes
Show child attributes
Unique identifier for an organization.
^org_[0-9a-f]{32}$"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Whoever is responsible for this deal — a teammate or an AI agent. Always populated when the deal has an owner.
Show child attributes
Show child attributes
Unique identifier for an user.
^usr_[0-9a-f]{32}$"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Close probability override, 0-100. null means the deal inherits its current stage's default — read the stage to see it.
How warm a deal is.
cold, warm, hot When the deal last moved between stages.
Whether a deal is still open, won or lost.
open, won, lost Show child attributes
Show child attributes
Monetary value. The workspace sets the currency.