curl --request POST \
--url https://api.chatsailer.com/v1/deals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"status": "open",
"value": 123,
"visibility": "company"
}
'import requests
url = "https://api.chatsailer.com/v1/deals"
payload = {
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"status": "open",
"value": 123,
"visibility": "company"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pipeline_id: 'pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
stage_id: 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
title: '<string>',
contact_id: 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
custom_fields: {},
expected_close_date: '2023-11-07T05:31:56Z',
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
probability: 50,
status: 'open',
value: 123,
visibility: 'company'
})
};
fetch('https://api.chatsailer.com/v1/deals', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pipeline_id' => 'pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'stage_id' => 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'title' => '<string>',
'contact_id' => 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'custom_fields' => [
],
'expected_close_date' => '2023-11-07T05:31:56Z',
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'probability' => 50,
'status' => 'open',
'value' => 123,
'visibility' => 'company'
]),
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"
payload := strings.NewReader("{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.chatsailer.com/v1/deals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\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",
"lost_justification": "<string>",
"lost_reason": "<string>",
"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": {},
"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>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Create a deal
Creates a deal in a pipeline stage.
pipeline_id and stage_id must belong together — list GET /v1/pipelines for a valid pair. At least one of contact_id or organization_id is required: a deal with neither is with nobody.
curl --request POST \
--url https://api.chatsailer.com/v1/deals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"status": "open",
"value": 123,
"visibility": "company"
}
'import requests
url = "https://api.chatsailer.com/v1/deals"
payload = {
"pipeline_id": "pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"stage_id": "stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"title": "<string>",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"custom_fields": {},
"expected_close_date": "2023-11-07T05:31:56Z",
"organization_id": "org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"owner_id": "usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"probability": 50,
"status": "open",
"value": 123,
"visibility": "company"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pipeline_id: 'pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
stage_id: 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
title: '<string>',
contact_id: 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
custom_fields: {},
expected_close_date: '2023-11-07T05:31:56Z',
organization_id: 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
owner_id: 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
probability: 50,
status: 'open',
value: 123,
visibility: 'company'
})
};
fetch('https://api.chatsailer.com/v1/deals', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pipeline_id' => 'pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'stage_id' => 'stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'title' => '<string>',
'contact_id' => 'con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'custom_fields' => [
],
'expected_close_date' => '2023-11-07T05:31:56Z',
'organization_id' => 'org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'owner_id' => 'usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4',
'probability' => 50,
'status' => 'open',
'value' => 123,
'visibility' => 'company'
]),
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"
payload := strings.NewReader("{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.chatsailer.com/v1/deals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pipeline_id\": \"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"stage_id\": \"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"title\": \"<string>\",\n \"contact_id\": \"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"custom_fields\": {},\n \"expected_close_date\": \"2023-11-07T05:31:56Z\",\n \"organization_id\": \"org_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"owner_id\": \"usr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4\",\n \"probability\": 50,\n \"status\": \"open\",\n \"value\": 123,\n \"visibility\": \"company\"\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",
"lost_justification": "<string>",
"lost_reason": "<string>",
"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": {},
"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>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A workspace API token. Create one in Settings → API. Send it as Authorization: Bearer sk_live_....
Query Parameters
Comma-separated relationships to inline in the response. Unexpanded relations are still identified by their *_id field.
"organization,owner"
Body
Body for POST /v1/deals.
pipeline_id and stage_id are both required and must belong together —
list GET /v1/pipelines to get a valid pair. At least one of contact_id
or organization_id must be set: a deal with neither is with nobody.
Unique identifier for a pipeline.
^pipe_[0-9a-f]{32}$"pipe_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a stage.
^stg_[0-9a-f]{32}$"stg_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Required; a nameless deal is not useful.
1Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_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 <= 100Temperature/score of an opportunity.
cold, warm, hot Status of an opportunity in the sales pipeline.
open, won, lost CRM record visibility levels; resolved live against the owner's current teams.
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"
Governs who sees this record in the Sailer UI. API tokens are workspace-scoped and are not filtered by it.
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.
Name of the reason, when status is lost.
"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.
Temperature/score of an opportunity.
cold, warm, hot When the deal last moved between stages.
Status of an opportunity in the sales pipeline.
open, won, lost Show child attributes
Show child attributes
Monetary value. The workspace sets the currency.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$